Documentation
¶
Index ¶
- Constants
- func Load(r io.Reader) (*model.Model, error)
- type ArrowOperator
- type DirectRelation
- type ExclusionOperator
- type IntersectionOperator
- type Manifest
- type ModelInfo
- type ObjectType
- type ObjectTypeName
- type PermissionName
- type PermissionOperator
- type RelationDefinition
- type RelationName
- type SchemaVersion
- type SubjectRelation
- type UnionOperator
- type WildcardRelation
Constants ¶
View Source
const SupportedSchemaVersion int = 3
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrowOperator ¶
type DirectRelation ¶
type DirectRelation struct {
ObjectType string `yaml:"direct_relation"`
}
type ExclusionOperator ¶
type IntersectionOperator ¶
type IntersectionOperator struct {
Intersection []string `yaml:"intersect"`
}
type Manifest ¶
type Manifest struct {
ModelInfo *ModelInfo `yaml:"model"`
ObjectTypes map[ObjectTypeName]*ObjectType `yaml:"types"`
}
type ModelInfo ¶
type ModelInfo struct {
Version SchemaVersion `yaml:"version"`
}
type ObjectType ¶
type ObjectType struct {
Relations map[RelationName]RelationDefinition `yaml:"relations,omitempty"`
Permissions map[PermissionName]PermissionOperator `yaml:"permissions,omitempty"`
}
type ObjectTypeName ¶
type ObjectTypeName string
type PermissionName ¶
type PermissionName string
type PermissionOperator ¶
type PermissionOperator struct {
Operator interface {
// contains filtered or unexported methods
} `yaml:"operator"`
}
func (*PermissionOperator) UnmarshalYAML ¶
func (p *PermissionOperator) UnmarshalYAML(value *yaml.Node) error
type RelationDefinition ¶
type RelationDefinition struct {
Definition []interface {
// contains filtered or unexported methods
} `yaml:"definition"`
}
func (*RelationDefinition) UnmarshalYAML ¶
func (r *RelationDefinition) UnmarshalYAML(value *yaml.Node) error
type RelationName ¶
type RelationName string
type SchemaVersion ¶
type SchemaVersion int
func (*SchemaVersion) UnmarshalYAML ¶
func (v *SchemaVersion) UnmarshalYAML(value *yaml.Node) error
type SubjectRelation ¶
type UnionOperator ¶
type UnionOperator struct {
Union []string `yaml:"union"`
}
type WildcardRelation ¶
type WildcardRelation struct {
ObjectType string `yaml:"wildcard_relation"`
}
Click to show internal directories.
Click to hide internal directories.