Documentation
¶
Index ¶
- type Action
- type ActionStatement
- type ArrayLiteral
- type Condition
- type ContextActionRule
- type ContextCondition
- type ContextStatement
- type Identifier
- type InfixCondition
- type IntegerLiteral
- type Node
- type Policies
- type Policy
- type PrefixCondition
- type Statement
- type Subject
- type SubjectGroup
- type SubjectUser
- type TypePattern
- type WhereClause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionStatement ¶
type ActionStatement struct {
Token token.Token
Action *Identifier
Subject Subject
Verb *Identifier
TypePattern *Identifier
WhereClause Condition
}
func (*ActionStatement) String ¶
func (a *ActionStatement) String() string
func (*ActionStatement) TokenLiteral ¶
func (a *ActionStatement) TokenLiteral() string
type ArrayLiteral ¶ added in v0.2.4
func (*ArrayLiteral) GetTypes ¶ added in v0.2.4
func (slf *ArrayLiteral) GetTypes() []*Identifier
func (*ArrayLiteral) String ¶ added in v0.2.4
func (slf *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶ added in v0.2.4
func (slf *ArrayLiteral) TokenLiteral() string
type Condition ¶
type Condition interface {
Node
GetTypes() []*Identifier
// contains filtered or unexported methods
}
type ContextActionRule ¶ added in v0.2.2
type ContextActionRule struct {
Context *ContextStatement
Action *Identifier
Subject Subject
Verb *Identifier
TypePattern *Identifier
Where *WhereClause
}
func (*ContextActionRule) String ¶ added in v0.2.2
func (a *ContextActionRule) String() string
type ContextCondition ¶ added in v0.2.2
type ContextCondition struct {
Subject Subject
Where *WhereClause
}
func (*ContextCondition) String ¶ added in v0.2.2
func (a *ContextCondition) String() string
type ContextStatement ¶ added in v0.2.2
type ContextStatement struct {
Token token.Token
Conditions []*ContextCondition
Verb *Identifier
TypePattern *Identifier
ActionRules []*ContextActionRule
}
func (*ContextStatement) String ¶ added in v0.2.2
func (a *ContextStatement) String() string
func (*ContextStatement) TokenLiteral ¶ added in v0.2.2
func (a *ContextStatement) TokenLiteral() string
type Identifier ¶
func (*Identifier) GetTypes ¶
func (slf *Identifier) GetTypes() []*Identifier
func (*Identifier) String ¶
func (slf *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (slf *Identifier) TokenLiteral() string
type InfixCondition ¶
type InfixCondition struct {
Token token.Token // the operator token, e.g. `==`
Left Condition
Operator string
Right Condition
}
func (*InfixCondition) GetTypes ¶
func (slf *InfixCondition) GetTypes() []*Identifier
func (*InfixCondition) String ¶
func (slf *InfixCondition) String() string
func (*InfixCondition) TokenLiteral ¶
func (slf *InfixCondition) TokenLiteral() string
type IntegerLiteral ¶ added in v0.2.2
func (*IntegerLiteral) GetTypes ¶ added in v0.2.2
func (slf *IntegerLiteral) GetTypes() []*Identifier
func (*IntegerLiteral) String ¶ added in v0.2.2
func (slf *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶ added in v0.2.2
func (slf *IntegerLiteral) TokenLiteral() string
type Policies ¶
type Policies struct {
Statements []Statement
}
concrete types
func (*Policies) TokenLiteral ¶
type PrefixCondition ¶
type PrefixCondition struct {
Token token.Token // the prefix token, e.g. `not`
Operator string
Right Condition
}
func (*PrefixCondition) GetTypes ¶
func (slf *PrefixCondition) GetTypes() []*Identifier
func (*PrefixCondition) String ¶
func (slf *PrefixCondition) String() string
func (*PrefixCondition) TokenLiteral ¶
func (slf *PrefixCondition) TokenLiteral() string
type SubjectGroup ¶
func (*SubjectGroup) String ¶
func (s *SubjectGroup) String() string
func (*SubjectGroup) TokenLiteral ¶
func (s *SubjectGroup) TokenLiteral() string
type SubjectUser ¶
func (*SubjectUser) String ¶
func (s *SubjectUser) String() string
func (*SubjectUser) TokenLiteral ¶
func (s *SubjectUser) TokenLiteral() string
type TypePattern ¶
func (*TypePattern) String ¶
func (t *TypePattern) String() string
func (*TypePattern) TokenLiteral ¶
func (t *TypePattern) TokenLiteral() string
type WhereClause ¶
type WhereClause struct {
Token token.Token // the first token of the condition
Condition Condition
}
WhereClause defines the where clause
func (*WhereClause) GetTypes ¶
func (slf *WhereClause) GetTypes() []*Identifier
func (*WhereClause) String ¶
func (slf *WhereClause) String() string
func (*WhereClause) TokenLiteral ¶
func (slf *WhereClause) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.