Documentation ¶
Index ¶
- func LoadFixtureData(file string)
- type DBInterface
- func (d *DBInterface) BoolWrap(b bool) string
- func (d *DBInterface) DropSchema() error
- func (d *DBInterface) ExecInsert(table string, columns []string, values ...[]string) (int64, error)
- func (d *DBInterface) OptionalStringWrap(v string) string
- func (d *DBInterface) StringArrayWrap(values []string) string
- func (d *DBInterface) StringWrap(v string) string
- func (d *DBInterface) TableName(v string) string
- func (d *DBInterface) UUIDArrayWrap(v []string) string
- func (d *DBInterface) UUIDWrap(v string) string
- type FixtureData
- type FixtureDataAttribute
- type FixtureDataAttributeKeyAccessServer
- type FixtureDataAttributeValue
- type FixtureDataAttributeValueKeyAccessServer
- type FixtureDataKasRegistry
- type FixtureDataNamespace
- type FixtureDataResourceMapping
- type FixtureDataSubjectMapping
- type FixtureDataValueMember
- type FixtureMetadata
- type Fixtures
- func (f *Fixtures) GetAttributeKey(key string) FixtureDataAttribute
- func (f *Fixtures) GetAttributeValueKey(key string) FixtureDataAttributeValue
- func (f *Fixtures) GetKasRegistryKey(key string) FixtureDataKasRegistry
- func (f *Fixtures) GetNamespaceKey(key string) FixtureDataNamespace
- func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping
- func (f *Fixtures) GetSubjectConditionSetKey(key string) SubjectConditionSet
- func (f *Fixtures) GetSubjectMappingKey(key string) FixtureDataSubjectMapping
- func (f *Fixtures) GetValueMemberKey(key string) FixtureDataValueMember
- func (f *Fixtures) Provision()
- func (f *Fixtures) TearDown()
- type SubjectConditionSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFixtureData ¶
func LoadFixtureData(file string)
Types ¶
type DBInterface ¶
type DBInterface struct { Client *db.Client PolicyClient *policydb.PolicyDBClient Schema string }
func NewDBInterface ¶
func NewDBInterface(cfg config.Config) DBInterface
func (*DBInterface) BoolWrap ¶
func (d *DBInterface) BoolWrap(b bool) string
func (*DBInterface) DropSchema ¶
func (d *DBInterface) DropSchema() error
func (*DBInterface) ExecInsert ¶
func (*DBInterface) OptionalStringWrap ¶
func (d *DBInterface) OptionalStringWrap(v string) string
func (*DBInterface) StringArrayWrap ¶
func (d *DBInterface) StringArrayWrap(values []string) string
func (*DBInterface) StringWrap ¶
func (d *DBInterface) StringWrap(v string) string
func (*DBInterface) TableName ¶
func (d *DBInterface) TableName(v string) string
func (*DBInterface) UUIDArrayWrap ¶
func (d *DBInterface) UUIDArrayWrap(v []string) string
func (*DBInterface) UUIDWrap ¶
func (d *DBInterface) UUIDWrap(v string) string
type FixtureData ¶
type FixtureData struct { Namespaces struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataNamespace `yaml:"data"` } `yaml:"attribute_namespaces"` Attributes struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataAttribute `yaml:"data"` } `yaml:"attributes"` AttributeKeyAccessServer []FixtureDataAttributeKeyAccessServer `yaml:"attribute_key_access_servers"` AttributeValues struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataAttributeValue `yaml:"data"` } `yaml:"attribute_values"` AttributeValueKeyAccessServer []FixtureDataAttributeValueKeyAccessServer `yaml:"attribute_value_key_access_servers"` SubjectMappings struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataSubjectMapping `yaml:"data"` } `yaml:"subject_mappings"` SubjectConditionSet struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]SubjectConditionSet `yaml:"data"` } `yaml:"subject_condition_set"` ResourceMappings struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataResourceMapping `yaml:"data"` } `yaml:"resource_mappings"` KasRegistries struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataKasRegistry `yaml:"data"` } `yaml:"kas_registry"` ValueMembers struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataValueMember `yaml:"data"` } `yaml:"attribute_value_members"` }
type FixtureDataAttribute ¶
type FixtureDataKasRegistry ¶
type FixtureDataNamespace ¶
type FixtureDataSubjectMapping ¶
type FixtureDataSubjectMapping struct { Id string `yaml:"id"` AttributeValueId string `yaml:"attribute_value_id"` Actions []struct { Standard string `yaml:"standard" json:"standard,omitempty"` Custom string `yaml:"custom" json:"custom,omitempty"` } `yaml:"actions"` SubjectConditionSetId string `yaml:"subject_condition_set_id"` }
type FixtureDataValueMember ¶
type FixtureMetadata ¶
type Fixtures ¶
type Fixtures struct {
// contains filtered or unexported fields
}
func NewFixture ¶
func NewFixture(db DBInterface) Fixtures
func (*Fixtures) GetAttributeKey ¶
func (f *Fixtures) GetAttributeKey(key string) FixtureDataAttribute
func (*Fixtures) GetAttributeValueKey ¶
func (f *Fixtures) GetAttributeValueKey(key string) FixtureDataAttributeValue
func (*Fixtures) GetKasRegistryKey ¶
func (f *Fixtures) GetKasRegistryKey(key string) FixtureDataKasRegistry
func (*Fixtures) GetNamespaceKey ¶
func (f *Fixtures) GetNamespaceKey(key string) FixtureDataNamespace
func (*Fixtures) GetResourceMappingKey ¶
func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping
func (*Fixtures) GetSubjectConditionSetKey ¶
func (f *Fixtures) GetSubjectConditionSetKey(key string) SubjectConditionSet
func (*Fixtures) GetSubjectMappingKey ¶
func (f *Fixtures) GetSubjectMappingKey(key string) FixtureDataSubjectMapping
func (*Fixtures) GetValueMemberKey ¶
func (f *Fixtures) GetValueMemberKey(key string) FixtureDataValueMember
type SubjectConditionSet ¶
type SubjectConditionSet struct { Id string `yaml:"id"` Condition struct { SubjectSets []struct { ConditionGroups []struct { BooleanOperator string `yaml:"boolean_operator" json:"boolean_operator"` Conditions []struct { SubjectExternalSelectorValue string `yaml:"subject_external_selector_value" json:"subject_external_selector_value"` Operator string `yaml:"operator" json:"operator"` SubjectExternalValues []string `yaml:"subject_external_values" json:"subject_external_values"` } `yaml:"conditions" json:"conditions"` } `yaml:"condition_groups" json:"condition_groups"` } `yaml:"subject_sets" json:"subject_sets"` } `yaml:"condition" json:"condition"` }
Click to show internal directories.
Click to hide internal directories.