Documentation
¶
Index ¶
- func NewAdapter(endpoint string, accessKey string, secretKey string, secure bool, ...) (persist.Adapter, error)
- type MinioAdapter
- func (a *MinioAdapter) AddPolicy(sec string, ptype string, rule []string) error
- func (a *MinioAdapter) LoadPolicy(model model.Model) error
- func (a *MinioAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (a *MinioAdapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (a *MinioAdapter) SavePolicy(model model.Model) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdapter ¶
func NewAdapter(endpoint string, accessKey string, secretKey string, secure bool, bucket string, objectName string) (persist.Adapter, error)
NewAdapter create new MinioAdapter Parameters:
- endpoint URL to object storage service.
- accessKey Access key is the user ID that uniquely identifies your account.
- secretKey Secret key is the password to your account.
- secure Set this value to 'true' to enable secure (HTTPS) access.
- bucket Name of the bucket where the policy is stored
- objectName Name of the object that contains policy
Types ¶
type MinioAdapter ¶
type MinioAdapter struct {
// contains filtered or unexported fields
}
MinioAdapter the struct that implements
func (*MinioAdapter) AddPolicy ¶
func (a *MinioAdapter) AddPolicy(sec string, ptype string, rule []string) error
AddPolicy adds a policy rule to the storage. This is part of the Auto-Save feature.
func (*MinioAdapter) LoadPolicy ¶
func (a *MinioAdapter) LoadPolicy(model model.Model) error
LoadPolicy loads all policy rules from the storage.
func (*MinioAdapter) RemoveFilteredPolicy ¶
func (a *MinioAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.
func (*MinioAdapter) RemovePolicy ¶
func (a *MinioAdapter) RemovePolicy(sec string, ptype string, rule []string) error
RemovePolicy removes a policy rule from the storage. This is part of the Auto-Save feature.
func (*MinioAdapter) SavePolicy ¶
func (a *MinioAdapter) SavePolicy(model model.Model) error
SavePolicy saves all policy rules to the storage.
Click to show internal directories.
Click to hide internal directories.