| Copyright | © Clément Delafargue 2021 |
|---|---|
| License | MIT |
| Maintainer | clement@delafargue.name |
| Safe Haskell | None |
| Language | Haskell2010 |
Auth.Biscuit.Proto
Description
Haskell data structures mapping the biscuit protobuf definitions
Synopsis
- data Biscuit = Biscuit {}
- data SignedBlock = SignedBlock {}
- data PublicKey = PublicKey {
- algorithm :: Required 1 (Enumeration Algorithm)
- key :: Required 2 (Value ByteString)
- data Algorithm = Ed25519
- data Proof
- = ProofSecret (Required 1 (Value ByteString))
- | ProofSignature (Required 2 (Value ByteString))
- data Block = Block {}
- 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)
- newtype 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
- newtype OpTernary = OpTernary {
- kind :: Required 1 (Enumeration TernaryKind)
- data TernaryKind = VerifyEd25519Signature
- 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
Documentation
Constructors
| Biscuit | |
Instances
| Show Biscuit Source # | |
| Generic 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.2.2.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 | |
Instances
Constructors
| PublicKey | |
Fields
| |
Instances
| Show PublicKey Source # | |
| Generic 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.2.2.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 # | |
Constructors
| ProofSecret (Required 1 (Value ByteString)) | |
| ProofSignature (Required 2 (Value ByteString)) |
Instances
| Show Proof Source # | |
| Generic 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.2.2.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
Constructors
| FactV2 | |
Fields
| |
Instances
| Show FactV2 Source # | |
| Generic 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.2.2.0-inplace" 'True) (C1 ('MetaCons "FactV2" 'PrefixI 'True) (S1 ('MetaSel ('Just "predicate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Message PredicateV2))))) | |
Constructors
| RuleV2 | |
Fields
| |
Instances
| Show RuleV2 Source # | |
| Generic 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.2.2.0-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)))))) | |
data PredicateV2 Source #
Instances
| Show PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto Methods showsPrec :: Int -> PredicateV2 -> ShowS # show :: PredicateV2 -> String # showList :: [PredicateV2] -> ShowS # | |
| Generic PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto Associated Types type Rep PredicateV2 :: Type -> Type # | |
| Decode PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto | |
| Encode PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto Methods encode :: PredicateV2 -> Put # | |
| type Rep PredicateV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep PredicateV2 = D1 ('MetaData "PredicateV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.2.2.0-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))))) | |
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)) |
Instances
newtype ExpressionV2 Source #
Constructors
| ExpressionV2 | |
Instances
| Show ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto Methods showsPrec :: Int -> ExpressionV2 -> ShowS # show :: ExpressionV2 -> String # showList :: [ExpressionV2] -> ShowS # | |
| Generic ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto Associated Types type Rep ExpressionV2 :: Type -> Type # | |
| Decode ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto | |
| Encode ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto Methods encode :: ExpressionV2 -> Put # | |
| type Rep ExpressionV2 Source # | |
Defined in Auth.Biscuit.Proto type Rep ExpressionV2 = D1 ('MetaData "ExpressionV2" "Auth.Biscuit.Proto" "biscuit-haskell-0.2.2.0-inplace" 'True) (C1 ('MetaCons "ExpressionV2" 'PrefixI 'True) (S1 ('MetaSel ('Just "ops") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Repeated 1 (Message Op))))) | |
Constructors
| OpVValue (Required 1 (Message TermV2)) | |
| OpVUnary (Required 2 (Message OpUnary)) | |
| OpVBinary (Required 3 (Message OpBinary)) |
Instances
| Show Op Source # | |
| Generic 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.2.2.0-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)))))) | |
Constructors
| OpUnary | |
Fields
| |
Instances
| Show OpUnary Source # | |
| Generic 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.2.2.0-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 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
| Show OpBinary Source # | |
| Generic 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.2.2.0-inplace" 'True) (C1 ('MetaCons "OpBinary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration BinaryKind))))) | |
data BinaryKind Source #
Constructors
| LessThan | |
| GreaterThan | |
| LessOrEqual | |
| GreaterOrEqual | |
| Equal | |
| Contains | |
| Prefix | |
| Suffix | |
| Regex | |
| Add | |
| Sub | |
| Mul | |
| Div | |
| And | |
| Or | |
| Intersection | |
| Union |
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 # | |
Constructors
| OpTernary | |
Fields
| |
Instances
| Show OpTernary Source # | |
| Generic 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.2.2.0-inplace" 'True) (C1 ('MetaCons "OpTernary" 'PrefixI 'True) (S1 ('MetaSel ('Just "kind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Required 1 (Enumeration TernaryKind))))) | |
data TernaryKind Source #
Constructors
| VerifyEd25519Signature |
Instances
| Bounded TernaryKind Source # | |
Defined in Auth.Biscuit.Proto | |
| Enum TernaryKind Source # | |
Defined in Auth.Biscuit.Proto Methods 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 Methods showsPrec :: Int -> TernaryKind -> ShowS # show :: TernaryKind -> String # showList :: [TernaryKind] -> ShowS # | |
decodeBlock :: ByteString -> Either String Block Source #
encodeBlockList :: Biscuit -> ByteString Source #
encodeBlock :: Block -> ByteString Source #