Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedRule ¶
type AdvancedRule struct { Host []string `json:"host"` Path []string `json:"path"` Method []string `json:"method"` *meta.Permission }
AdvancedRule allows you to write RBAC rules in a more concise way
type AdvancedRules ¶
type AdvancedRules []*AdvancedRule
AdvancedRules is the list of AdvancedRules
func (AdvancedRules) GetRules ¶
func (adv AdvancedRules) GetRules() meta.Rules
GetRules is used to convert AdvancedRules to meta.Rules
type AdvancedRulesLoader ¶
type AdvancedRulesLoader struct {
// contains filtered or unexported fields
}
AdvancedRulesLoader implements the Loader interface it is used to load configuration from advanced data.
func NewAdvancedRulesLoader ¶
func NewAdvancedRulesLoader(rules AdvancedRules) (*AdvancedRulesLoader, error)
NewAdvancedRulesLoader is used to initialize a AdvancedRulesLoader
type JSONLoader ¶
type JSONLoader struct {
// contains filtered or unexported fields
}
JSONLoader implements the Loader interface it is used to load configuration from a local json file.
func NewJSONLoader ¶
func NewJSONLoader(file string) (*JSONLoader, error)
NewJSONLoader is used to initialize a JSONLoader
type RulesLoader ¶
type RulesLoader struct {
// contains filtered or unexported fields
}
RulesLoader implements the Loader interface it is used to load configuration from given rules.
func NewRulesLoader ¶
func NewRulesLoader(rules meta.Rules) (*RulesLoader, error)
NewRulesLoader is used to initialize a RulesLoader
type YAMLLoader ¶
type YAMLLoader struct {
// contains filtered or unexported fields
}
YAMLLoader implements the Loader interface it is used to load configuration from a local yaml file.
func NewYAMLLoader ¶
func NewYAMLLoader(file string) (*YAMLLoader, error)
NewYAMLLoader is used to initialize a YAMLLoader