Documentation
¶
Index ¶
- Constants
- func FakeRustQuote(s string) string
- func Unquote(s string) (string, error)
- type Access
- type AccessType
- type Action
- type Add
- type AddOp
- type And
- type Annotation
- type Condition
- type ConditionType
- type Effect
- type Entity
- type Expression
- type ExpressionType
- type ExtFun
- type If
- type Literal
- type LiteralType
- type MatchType
- type Member
- type Mult
- type Or
- type Path
- type Pattern
- type PatternComponent
- type Policies
- type Policy
- type Position
- type Primary
- type PrimaryType
- type Principal
- type RecInit
- type RecKeyType
- type RelOp
- type Relation
- type RelationType
- type Resource
- type Token
- type TokenType
- type Unary
- type UnaryOp
- type Var
- type VarType
Constants ¶
View Source
const ( EffectPermit = Effect("permit") EffectForbid = Effect("forbid") )
View Source
const ( MatchAny = MatchType(iota) MatchEquals MatchIn MatchInList MatchIs MatchIsIn )
View Source
const ( TokenEOF = TokenType(iota) TokenIdent TokenInt TokenString TokenOperator TokenUnknown )
Variables ¶
This section is empty.
Functions ¶
func FakeRustQuote ¶
TODO: make FakeRustQuote actually accurate in all cases
Types ¶
type Access ¶
type Access struct { Type AccessType Name string Expressions []Expression }
type AccessType ¶
type AccessType int
const ( AccessField AccessType = iota AccessCall AccessIndex )
type Annotation ¶
func (Annotation) String ¶
func (a Annotation) String() string
type Condition ¶
type Condition struct { Type ConditionType Expression Expression }
type ConditionType ¶
type ConditionType string
const ( ConditionWhen ConditionType = "when" ConditionUnless ConditionType = "unless" )
type Expression ¶
type Expression struct { Type ExpressionType Or Or If *If }
func (Expression) String ¶
func (e Expression) String() string
type ExpressionType ¶
type ExpressionType int
const ( ExpressionOr ExpressionType = iota ExpressionIf )
type ExtFun ¶
type ExtFun struct { Path []string Expressions []Expression }
type If ¶
type If struct { If Expression Then Expression Else Expression }
type LiteralType ¶
type LiteralType int
const ( LiteralBool LiteralType = iota LiteralInt LiteralString )
type PatternComponent ¶
type Policy ¶
type Position ¶
type Position struct { Offset int // byte offset, starting at 0 Line int // line number, starting at 1 Column int // column number, starting at 1 (character count per line) }
Position is a value that represents a source position. A position is valid if Line > 0.
type Primary ¶
type Primary struct { Type PrimaryType Literal Literal Var Var Entity Entity ExtFun ExtFun Expression Expression Expressions []Expression RecInits []RecInit }
type PrimaryType ¶
type PrimaryType int
const ( PrimaryLiteral PrimaryType = iota PrimaryVar PrimaryEntity PrimaryExtFun PrimaryExpr PrimaryExprList PrimaryRecInits )
type RecInit ¶
type RecInit struct { KeyType RecKeyType Key string Value Expression }
type Relation ¶
type RelationType ¶
type RelationType string
const ( RelationNone RelationType = "none" RelationRelOp RelationType = "relop" RelationHasIdent RelationType = "hasident" RelationHasLiteral RelationType = "hasliteral" RelationLike RelationType = "like" RelationIs RelationType = "is" RelationIsIn RelationType = "isIn" )
Click to show internal directories.
Click to hide internal directories.