Copyright | © Clément Delafargue 2021 |
---|---|
License | MIT |
Maintainer | clement@delafargue.name |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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)
- 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 FactV2 = FactV2 {
- predicate :: Required 1 (Message PredicateV2)
- data RuleV2 = RuleV2 {
- head :: Required 1 (Message PredicateV2)
- body :: Repeated 2 (Message PredicateV2)
- expressions :: Repeated 3 (Message ExpressionV2)
- scope :: Repeated 4 (Message Scope)
- data CheckKind
- data CheckV2 = CheckV2 {}
- data PredicateV2 = PredicateV2 {}
- data TermV2
- newtype ExpressionV2 = ExpressionV2 {}
- newtype TermSet = TermSet {}
- data Op
- newtype OpUnary = OpUnary {
- kind :: Required 1 (Enumeration UnaryKind)
- data UnaryKind
- newtype OpBinary = OpBinary {
- kind :: Required 1 (Enumeration BinaryKind)
- data BinaryKind
- = LessThan
- | GreaterThan
- | LessOrEqual
- | GreaterOrEqual
- | Equal
- | Contains
- | Prefix
- | Suffix
- | Regex
- | Add
- | Sub
- | Mul
- | Div
- | And
- | Or
- | Intersection
- | Union
- | BitwiseAnd
- | BitwiseOr
- | BitwiseXor
- | NotEqual
- newtype OpTernary = OpTernary {
- kind :: Required 1 (Enumeration TernaryKind)
- data TernaryKind = VerifyEd25519Signature
- 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
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.3.0.1-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 #
SignedBlock | |
|
Instances
PublicKey | |
|
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.3.0.1-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))))) |
Instances
Bounded Algorithm Source # | |
Enum Algorithm Source # | |
Defined in Auth.Biscuit.Proto 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 #
Instances
Generic ExternalSig Source # | |
Defined in Auth.Biscuit.Proto type Rep ExternalSig :: Type -> Type # from :: ExternalSig -> Rep ExternalSig x # to :: Rep ExternalSig x -> ExternalSig # | |
Show ExternalSig Source # | |
Defined in Auth.Biscuit.Proto 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 encode :: ExternalSig -> Put # | |
type Rep ExternalSig Source # | |
Defined in Auth.Biscuit.Proto type Rep ExternalSig = D1 ('MetaData "ExternalSig" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-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))))) |
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.3.0.1-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))))) |
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.3.0.1-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))))) |
Instances
Bounded ScopeType Source # | |
Enum ScopeType Source # | |
Defined in Auth.Biscuit.Proto 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 # | |
FactV2 | |
|
Instances
Generic FactV2 Source # | |
Show FactV2 Source # | |
Decode FactV2 Source # | |
Encode FactV2 Source # | |
Defined in Auth.Biscuit.Proto | |
type Rep FactV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep FactV2 = D1 ('MetaData "FactV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'True) (C1 ('MetaCons "FactV2" 'PrefixI 'True) (S1 ('MetaSel ('Just "predicate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message PredicateV2))))) |
RuleV2 | |
|
Instances
Generic RuleV2 Source # | |
Show RuleV2 Source # | |
Decode RuleV2 Source # | |
Encode RuleV2 Source # | |
Defined in Auth.Biscuit.Proto | |
type Rep RuleV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep RuleV2 = D1 ('MetaData "RuleV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'False) (C1 ('MetaCons "RuleV2" 'PrefixI 'True) ((S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message PredicateV2))) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 2 (Message PredicateV2)))) :*: (S1 ('MetaSel ('Just "expressions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 3 (Message ExpressionV2))) :*: S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 4 (Message Scope)))))) |
Instances
Bounded CheckKind Source # | |
Enum CheckKind Source # | |
Defined in Auth.Biscuit.Proto 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 # | |
Instances
Generic CheckV2 Source # | |
Show CheckV2 Source # | |
Decode CheckV2 Source # | |
Encode CheckV2 Source # | |
Defined in Auth.Biscuit.Proto | |
type Rep CheckV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep CheckV2 = D1 ('MetaData "CheckV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'False) (C1 ('MetaCons "CheckV2" 'PrefixI 'True) (S1 ('MetaSel ('Just "queries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Message RuleV2))) :*: S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Optional 2 (Enumeration CheckKind))))) |
data PredicateV2 Source #
Instances
Generic PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep PredicateV2 :: Type -> Type # from :: PredicateV2 -> Rep PredicateV2 x # to :: Rep PredicateV2 x -> PredicateV2 # | |
Show PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto showsPrec :: Int -> PredicateV2 -> ShowS # show :: PredicateV2 -> String # showList :: [PredicateV2] -> ShowS # | |
Decode PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto | |
Encode PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto encode :: PredicateV2 -> Put # | |
type Rep PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep PredicateV2 = D1 ('MetaData "PredicateV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'False) (C1 ('MetaCons "PredicateV2" '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 TermV2))))) |
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)) |
Instances
newtype ExpressionV2 Source #
Instances
Generic ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep ExpressionV2 :: Type -> Type # from :: ExpressionV2 -> Rep ExpressionV2 x # to :: Rep ExpressionV2 x -> ExpressionV2 # | |
Show ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto showsPrec :: Int -> ExpressionV2 -> ShowS # show :: ExpressionV2 -> String # showList :: [ExpressionV2] -> ShowS # | |
Decode ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto | |
Encode ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto encode :: ExpressionV2 -> Put # | |
type Rep ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep ExpressionV2 = D1 ('MetaData "ExpressionV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'True) (C1 ('MetaCons "ExpressionV2" 'PrefixI 'True) (S1 ('MetaSel ('Just "ops") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Message Op))))) |
OpVValue (Required 1 (Message TermV2)) | |
OpVUnary (Required 2 (Message OpUnary)) | |
OpVBinary (Required 3 (Message OpBinary)) |
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.3.0.1-inplace" 'False) (C1 ('MetaCons "OpVValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message TermV2)))) :+: (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)))))) |
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.3.0.1-inplace" 'True) (C1 ('MetaCons "OpUnary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration UnaryKind))))) |
Instances
Bounded UnaryKind Source # | |
Enum UnaryKind Source # | |
Defined in Auth.Biscuit.Proto 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 # | |
OpBinary | |
|
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.3.0.1-inplace" 'True) (C1 ('MetaCons "OpBinary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration BinaryKind))))) |
data BinaryKind Source #
LessThan | |
GreaterThan | |
LessOrEqual | |
GreaterOrEqual | |
Equal | |
Contains | |
Prefix | |
Suffix | |
Regex | |
Add | |
Sub | |
Mul | |
Div | |
And | |
Or | |
Intersection | |
Union | |
BitwiseAnd | |
BitwiseOr | |
BitwiseXor | |
NotEqual |
Instances
Bounded BinaryKind Source # | |
Defined in Auth.Biscuit.Proto minBound :: BinaryKind # maxBound :: BinaryKind # | |
Enum BinaryKind Source # | |
Defined in Auth.Biscuit.Proto 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 showsPrec :: Int -> BinaryKind -> ShowS # show :: BinaryKind -> String # showList :: [BinaryKind] -> ShowS # |
OpTernary | |
|
Instances
Generic OpTernary Source # | |
Show OpTernary Source # | |
Decode OpTernary Source # | |
Encode OpTernary Source # | |
Defined in Auth.Biscuit.Proto | |
type Rep OpTernary Source # | |
Defined in Auth.Biscuit.Proto type Rep OpTernary = D1 ('MetaData "OpTernary" "Auth.Biscuit.Proto" "biscuit-haskell-0.3.0.1-inplace" 'True) (C1 ('MetaCons "OpTernary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration TernaryKind))))) |
data TernaryKind Source #
Instances
Bounded TernaryKind Source # | |
Defined in Auth.Biscuit.Proto minBound :: TernaryKind # maxBound :: TernaryKind # | |
Enum TernaryKind Source # | |
Defined in Auth.Biscuit.Proto succ :: TernaryKind -> TernaryKind # pred :: TernaryKind -> TernaryKind # toEnum :: Int -> TernaryKind # fromEnum :: TernaryKind -> Int # enumFrom :: TernaryKind -> [TernaryKind] # enumFromThen :: TernaryKind -> TernaryKind -> [TernaryKind] # enumFromTo :: TernaryKind -> TernaryKind -> [TernaryKind] # enumFromThenTo :: TernaryKind -> TernaryKind -> TernaryKind -> [TernaryKind] # | |
Show TernaryKind Source # | |
Defined in Auth.Biscuit.Proto showsPrec :: Int -> TernaryKind -> ShowS # show :: TernaryKind -> String # showList :: [TernaryKind] -> ShowS # |
data ThirdPartyBlockContents Source #
ThirdPartyBlockContents | |
|
Instances
data ThirdPartyBlockRequest Source #
Instances
decodeBlock :: ByteString -> Either String Block Source #
encodeBlockList :: Biscuit -> ByteString Source #
encodeBlock :: Block -> ByteString Source #