| Copyright | © Clément Delafargue 2021 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | clement@delafargue.name |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Auth.Biscuit.Proto
Description
Haskell data structures mapping the biscuit protobuf definitions
Synopsis
- data Biscuit = Biscuit {}
- data SignedBlock = SignedBlock {
- block :: Required 1 (Value ByteString)
- nextKey :: Required 2 (Message PublicKey)
- signature :: Required 3 (Value ByteString)
- externalSig :: Optional 4 (Message ExternalSig)
- version :: Optional 5 (Value Int32)
- data PublicKey = PublicKey {
- algorithm :: Required 1 (Enumeration Algorithm)
- key :: Required 2 (Value ByteString)
- data Algorithm = Ed25519
- data ExternalSig = ExternalSig {}
- data Proof
- = ProofSecret (Required 1 (Value ByteString))
- | ProofSignature (Required 2 (Value ByteString))
- data Block = Block {}
- data Scope
- data ScopeType
- newtype Fact = Fact {}
- data Rule = Rule {}
- data CheckKind
- data Check = Check {}
- data Predicate = Predicate {}
- data Term
- = TermVariable (Required 1 (Value Int64))
- | TermInteger (Required 2 (Value Int64))
- | TermString (Required 3 (Value Int64))
- | TermDate (Required 4 (Value Int64))
- | TermBytes (Required 5 (Value ByteString))
- | TermBool (Required 6 (Value Bool))
- | TermTermSet (Required 7 (Message TermSet))
- | TermNull (Required 8 (Message Empty))
- | TermTermArray (Required 9 (Message TermArray))
- | TermTermMap (Required 10 (Message TermMap))
- newtype Expression = Expression {}
- newtype TermSet = TermSet {}
- newtype TermArray = TermArray {}
- newtype TermMap = TermMap {}
- data MapKey
- data MapEntry = MapEntry {}
- data Empty = Empty {
- data Op
- data OpUnary = OpUnary {}
- data UnaryKind
- data OpBinary = OpBinary {
- kind :: Required 1 (Enumeration BinaryKind)
- ffiName :: Optional 2 (Value Int64)
- data BinaryKind
- = LessThan
- | GreaterThan
- | LessOrEqual
- | GreaterOrEqual
- | Equal
- | Contains
- | Prefix
- | Suffix
- | Regex
- | Add
- | Sub
- | Mul
- | Div
- | And
- | Or
- | Intersection
- | Union
- | BitwiseAnd
- | BitwiseOr
- | BitwiseXor
- | NotEqual
- | HeterogeneousEqual
- | HeterogeneousNotEqual
- | LazyAnd
- | LazyOr
- | All
- | Any
- | Get
- | BinaryFfi
- | TryOr
- data OpClosure = OpClosure {}
- data ThirdPartyBlockContents = ThirdPartyBlockContents {
- payload :: Required 1 (Value ByteString)
- externalSig :: Required 2 (Message ExternalSig)
- data ThirdPartyBlockRequest = ThirdPartyBlockRequest {}
- getField :: HasField a => a -> FieldType a
- putField :: HasField a => FieldType a -> a
- decodeBlockList :: ByteString -> Either String Biscuit
- decodeBlock :: ByteString -> Either String Block
- encodeBlockList :: Biscuit -> ByteString
- encodeBlock :: Block -> ByteString
- decodeThirdPartyBlockRequest :: ByteString -> Either String ThirdPartyBlockRequest
- decodeThirdPartyBlockContents :: ByteString -> Either String ThirdPartyBlockContents
- encodeThirdPartyBlockRequest :: ThirdPartyBlockRequest -> ByteString
- encodeThirdPartyBlockContents :: ThirdPartyBlockContents -> ByteString
Documentation
Constructors
| Biscuit | |
Instances
| Generic Biscuit Source # | |
| Show Biscuit Source # | |
| Decode Biscuit Source # | |
| Encode Biscuit Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Biscuit Source # | |
Defined in Auth.Biscuit.Proto type Rep Biscuit = D1 ('MetaData "Biscuit" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "Biscuit" 'PrefixI 'True) ((S1 ('MetaSel ('Just "rootKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Optional 1 (Value Int32))) :*: S1 ('MetaSel ('Just "authority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Message SignedBlock)))) :*: (S1 ('MetaSel ('Just "blocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 3 (Message SignedBlock))) :*: S1 ('MetaSel ('Just "proof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 4 (Message Proof)))))) | |
data SignedBlock Source #
Constructors
| SignedBlock | |
Fields
| |
Instances
Constructors
| PublicKey | |
Fields
| |
Instances
| Generic PublicKey Source # | |
| Show PublicKey Source # | |
| Decode PublicKey Source # | |
| Encode PublicKey Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep PublicKey Source # | |
Defined in Auth.Biscuit.Proto type Rep PublicKey = D1 ('MetaData "PublicKey" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "PublicKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "algorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration Algorithm))) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Value ByteString))))) | |
Constructors
| Ed25519 |
Instances
| Bounded Algorithm Source # | |
| Enum Algorithm Source # | |
Defined in Auth.Biscuit.Proto Methods succ :: Algorithm -> Algorithm # pred :: Algorithm -> Algorithm # fromEnum :: Algorithm -> Int # enumFrom :: Algorithm -> [Algorithm] # enumFromThen :: Algorithm -> Algorithm -> [Algorithm] # enumFromTo :: Algorithm -> Algorithm -> [Algorithm] # enumFromThenTo :: Algorithm -> Algorithm -> Algorithm -> [Algorithm] # | |
| Show Algorithm Source # | |
data ExternalSig Source #
Constructors
| ExternalSig | |
Instances
| Generic ExternalSig Source # | |
Defined in Auth.Biscuit.Proto Associated Types type Rep ExternalSig :: Type -> Type # | |
| Show ExternalSig Source # | |
Defined in Auth.Biscuit.Proto Methods showsPrec :: Int -> ExternalSig -> ShowS # show :: ExternalSig -> String # showList :: [ExternalSig] -> ShowS # | |
| Decode ExternalSig Source # | |
Defined in Auth.Biscuit.Proto | |
| Encode ExternalSig Source # | |
Defined in Auth.Biscuit.Proto Methods encode :: ExternalSig -> Put # | |
| type Rep ExternalSig Source # | |
Defined in Auth.Biscuit.Proto type Rep ExternalSig = D1 ('MetaData "ExternalSig" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "ExternalSig" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Value ByteString))) :*: S1 ('MetaSel ('Just "publicKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Message PublicKey))))) | |
Constructors
| ProofSecret (Required 1 (Value ByteString)) | |
| ProofSignature (Required 2 (Value ByteString)) |
Instances
| Generic Proof Source # | |
| Show Proof Source # | |
| Decode Proof Source # | |
| Encode Proof Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Proof Source # | |
Defined in Auth.Biscuit.Proto type Rep Proof = D1 ('MetaData "Proof" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "ProofSecret" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Value ByteString)))) :+: C1 ('MetaCons "ProofSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Value ByteString))))) | |
Constructors
| Block | |
Instances
Instances
| Generic Scope Source # | |
| Show Scope Source # | |
| Decode Scope Source # | |
| Encode Scope Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Scope Source # | |
Defined in Auth.Biscuit.Proto type Rep Scope = D1 ('MetaData "Scope" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "ScType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration ScopeType)))) :+: C1 ('MetaCons "ScBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Value Int64))))) | |
Constructors
| ScopeAuthority | |
| ScopePrevious |
Instances
| Bounded ScopeType Source # | |
| Enum ScopeType Source # | |
Defined in Auth.Biscuit.Proto Methods succ :: ScopeType -> ScopeType # pred :: ScopeType -> ScopeType # fromEnum :: ScopeType -> Int # enumFrom :: ScopeType -> [ScopeType] # enumFromThen :: ScopeType -> ScopeType -> [ScopeType] # enumFromTo :: ScopeType -> ScopeType -> [ScopeType] # enumFromThenTo :: ScopeType -> ScopeType -> ScopeType -> [ScopeType] # | |
| Show ScopeType Source # | |
Constructors
| Rule | |
Instances
| Generic Rule Source # | |
| Show Rule Source # | |
| Decode Rule Source # | |
| Encode Rule Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Rule Source # | |
Defined in Auth.Biscuit.Proto type Rep Rule = D1 ('MetaData "Rule" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) ((S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message Predicate))) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 2 (Message Predicate)))) :*: (S1 ('MetaSel ('Just "expressions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 3 (Message Expression))) :*: S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 4 (Message Scope)))))) | |
Instances
| Bounded CheckKind Source # | |
| Enum CheckKind Source # | |
Defined in Auth.Biscuit.Proto Methods succ :: CheckKind -> CheckKind # pred :: CheckKind -> CheckKind # fromEnum :: CheckKind -> Int # enumFrom :: CheckKind -> [CheckKind] # enumFromThen :: CheckKind -> CheckKind -> [CheckKind] # enumFromTo :: CheckKind -> CheckKind -> [CheckKind] # enumFromThenTo :: CheckKind -> CheckKind -> CheckKind -> [CheckKind] # | |
| Show CheckKind Source # | |
Constructors
| Check | |
Instances
| Generic Check Source # | |
| Show Check Source # | |
| Decode Check Source # | |
| Encode Check Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Check Source # | |
Defined in Auth.Biscuit.Proto type Rep Check = D1 ('MetaData "Check" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "Check" 'PrefixI 'True) (S1 ('MetaSel ('Just "queries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Message Rule))) :*: S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Optional 2 (Enumeration CheckKind))))) | |
Instances
| Generic Predicate Source # | |
| Show Predicate Source # | |
| Decode Predicate Source # | |
| Encode Predicate Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Predicate Source # | |
Defined in Auth.Biscuit.Proto type Rep Predicate = D1 ('MetaData "Predicate" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "Predicate" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Value Int64))) :*: S1 ('MetaSel ('Just "terms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 2 (Message Term))))) | |
Constructors
| TermVariable (Required 1 (Value Int64)) | |
| TermInteger (Required 2 (Value Int64)) | |
| TermString (Required 3 (Value Int64)) | |
| TermDate (Required 4 (Value Int64)) | |
| TermBytes (Required 5 (Value ByteString)) | |
| TermBool (Required 6 (Value Bool)) | |
| TermTermSet (Required 7 (Message TermSet)) | |
| TermNull (Required 8 (Message Empty)) | |
| TermTermArray (Required 9 (Message TermArray)) | |
| TermTermMap (Required 10 (Message TermMap)) |
Instances
newtype Expression Source #
Constructors
| Expression | |
Instances
| Generic Expression Source # | |
Defined in Auth.Biscuit.Proto Associated Types type Rep Expression :: Type -> Type # | |
| Show Expression Source # | |
Defined in Auth.Biscuit.Proto Methods showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS # | |
| Decode Expression Source # | |
Defined in Auth.Biscuit.Proto | |
| Encode Expression Source # | |
Defined in Auth.Biscuit.Proto Methods encode :: Expression -> Put # | |
| type Rep Expression Source # | |
Defined in Auth.Biscuit.Proto type Rep Expression = D1 ('MetaData "Expression" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Expression" 'PrefixI 'True) (S1 ('MetaSel ('Just "ops") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Message Op))))) | |
Instances
| Generic MapKey Source # | |
| Show MapKey Source # | |
| Decode MapKey Source # | |
| Encode MapKey Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep MapKey Source # | |
Defined in Auth.Biscuit.Proto type Rep MapKey = D1 ('MetaData "MapKey" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "MapKeyInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Value Int64)))) :+: C1 ('MetaCons "MapKeyString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Value Int64))))) | |
Instances
| Generic MapEntry Source # | |
| Show MapEntry Source # | |
| Decode MapEntry Source # | |
| Encode MapEntry Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep MapEntry Source # | |
Defined in Auth.Biscuit.Proto type Rep MapEntry = D1 ('MetaData "MapEntry" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "MapEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message MapKey))) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Message Term))))) | |
Constructors
| Empty | |
Constructors
| OpVValue (Required 1 (Message Term)) | |
| OpVUnary (Required 2 (Message OpUnary)) | |
| OpVBinary (Required 3 (Message OpBinary)) | |
| OpVClosure (Required 4 (Message OpClosure)) |
Instances
| Generic Op Source # | |
| Show Op Source # | |
| Decode Op Source # | |
| Encode Op Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep Op Source # | |
Defined in Auth.Biscuit.Proto type Rep Op = D1 ('MetaData "Op" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) ((C1 ('MetaCons "OpVValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message Term)))) :+: C1 ('MetaCons "OpVUnary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 2 (Message OpUnary))))) :+: (C1 ('MetaCons "OpVBinary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 3 (Message OpBinary)))) :+: C1 ('MetaCons "OpVClosure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 4 (Message OpClosure)))))) | |
Constructors
| OpUnary | |
Instances
| Generic OpUnary Source # | |
| Show OpUnary Source # | |
| Decode OpUnary Source # | |
| Encode OpUnary Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep OpUnary Source # | |
Defined in Auth.Biscuit.Proto type Rep OpUnary = D1 ('MetaData "OpUnary" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "OpUnary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration UnaryKind))) :*: S1 ('MetaSel ('Just "ffiName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Optional 2 (Value Int64))))) | |
Instances
| Bounded UnaryKind Source # | |
| Enum UnaryKind Source # | |
Defined in Auth.Biscuit.Proto Methods succ :: UnaryKind -> UnaryKind # pred :: UnaryKind -> UnaryKind # fromEnum :: UnaryKind -> Int # enumFrom :: UnaryKind -> [UnaryKind] # enumFromThen :: UnaryKind -> UnaryKind -> [UnaryKind] # enumFromTo :: UnaryKind -> UnaryKind -> [UnaryKind] # enumFromThenTo :: UnaryKind -> UnaryKind -> UnaryKind -> [UnaryKind] # | |
| Show UnaryKind Source # | |
Constructors
| OpBinary | |
Fields
| |
Instances
| Generic OpBinary Source # | |
| Show OpBinary Source # | |
| Decode OpBinary Source # | |
| Encode OpBinary Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep OpBinary Source # | |
Defined in Auth.Biscuit.Proto type Rep OpBinary = D1 ('MetaData "OpBinary" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "OpBinary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration BinaryKind))) :*: S1 ('MetaSel ('Just "ffiName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Optional 2 (Value Int64))))) | |
data BinaryKind Source #
Constructors
Instances
| Bounded BinaryKind Source # | |
Defined in Auth.Biscuit.Proto | |
| Enum BinaryKind Source # | |
Defined in Auth.Biscuit.Proto Methods succ :: BinaryKind -> BinaryKind # pred :: BinaryKind -> BinaryKind # toEnum :: Int -> BinaryKind # fromEnum :: BinaryKind -> Int # enumFrom :: BinaryKind -> [BinaryKind] # enumFromThen :: BinaryKind -> BinaryKind -> [BinaryKind] # enumFromTo :: BinaryKind -> BinaryKind -> [BinaryKind] # enumFromThenTo :: BinaryKind -> BinaryKind -> BinaryKind -> [BinaryKind] # | |
| Show BinaryKind Source # | |
Defined in Auth.Biscuit.Proto Methods showsPrec :: Int -> BinaryKind -> ShowS # show :: BinaryKind -> String # showList :: [BinaryKind] -> ShowS # | |
Instances
| Generic OpClosure Source # | |
| Show OpClosure Source # | |
| Decode OpClosure Source # | |
| Encode OpClosure Source # | |
Defined in Auth.Biscuit.Proto | |
| type Rep OpClosure Source # | |
Defined in Auth.Biscuit.Proto type Rep OpClosure = D1 ('MetaData "OpClosure" "Auth.Biscuit.Proto" "biscuit-haskell-0.5.0.0-inplace" 'False) (C1 ('MetaCons "OpClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "params") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Value Int64))) :*: S1 ('MetaSel ('Just "ops") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 2 (Message Op))))) | |
data ThirdPartyBlockContents Source #
Constructors
| ThirdPartyBlockContents | |
Fields
| |
Instances
data ThirdPartyBlockRequest Source #
Constructors
| ThirdPartyBlockRequest | |
Instances
decodeBlock :: ByteString -> Either String Block Source #
encodeBlockList :: Biscuit -> ByteString Source #
encodeBlock :: Block -> ByteString Source #