Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct { // Entity is a string that represents the entity type involved in the authorization check. Entity string `yaml:"entity"` // Subject is a string that represents the subject of the authorization check. Subject string `yaml:"subject"` // Assertions is a map that contains the authorization assertions to be evaluated. Assertions map[string]bool `yaml:"assertions"` }
Check is a struct that represents an individual authorization check.
type EntityFilter ¶
type EntityFilter struct { // EntityType is a string that represents the type of entity the filter applies to. EntityType string `yaml:"entity_type"` // Subject is a string that represents the subject of the filter. Subject string `yaml:"subject"` // Assertions is a map that contains the filter assertions to be applied. Assertions map[string][]string `yaml:"assertions"` }
EntityFilter is a struct that represents a filter to be applied during an authorization check.
type FileDecoder ¶
type FileDecoder struct {
// contains filtered or unexported fields
}
func NewFileDecoder ¶
func NewFileDecoder(path string) *FileDecoder
func (FileDecoder) Decode ¶
func (d FileDecoder) Decode(out interface{}) (err error)
Decode - Decode a file
type HTTPDecoder ¶
type HTTPDecoder struct {
// contains filtered or unexported fields
}
func NewHTTPDecoder ¶
func NewHTTPDecoder(url string) *HTTPDecoder
NewHTTPDecoder - Creates new HTTP decoder
func (HTTPDecoder) Decode ¶
func (d HTTPDecoder) Decode(out interface{}) (err error)
Decode - decode HTTP
type Scenario ¶
type Scenario struct { // Name is a string that represents the name of the scenario. Name string `yaml:"name"` // Description is a string that provides a brief explanation of the scenario. Description string `yaml:"description"` // Checks is a slice of Check structs that represent the authorization checks to be performed. Checks []Check `yaml:"checks"` // EntityFilters is a slice of Filter structs that represent the filters to be applied during the checks. EntityFilters []EntityFilter `yaml:"entity_filters"` // SubjectFilters is a slice of Filter structs that represent the filters to be applied during the checks. SubjectFilters []SubjectFilter `yaml:"subject_filters"` }
Scenario is a struct that represents a specific authorization scenario.
type Shape ¶
type Shape struct { // Schema is a string that represents the authorization model schema. Schema string `yaml:"schema"` // Relationships is a slice of strings that represent the authorization relationships. Relationships []string `yaml:"relationships"` // Scenarios is a slice of Scenario structs that represent the different authorization scenarios. Scenarios []Scenario `yaml:"scenarios"` }
Shape is a struct that represents an authorization configuration.
type SubjectFilter ¶ added in v0.4.2
type SubjectFilter struct { // EntityType is a string that represents the type of entity the filter applies to. SubjectReference string `yaml:"subject_reference"` // Entity is a string that represents the entity type involved in the authorization check. Entity string `yaml:"entity"` // Assertions is a map that contains the filter assertions to be applied. Assertions map[string][]string `yaml:"assertions"` }
SubjectFilter is a struct that represents a filter to be applied during an authorization check.
Click to show internal directories.
Click to hide internal directories.