Documentation ¶
Index ¶
- type Guard
- type LadonGuard
- func (g LadonGuard) CreatePolicy(pol ladon.Policy) error
- func (g LadonGuard) DeletePolicy(pol ladon.Policy) error
- func (g LadonGuard) GetPolicies() (ladon.Policies, error)
- func (g LadonGuard) GetPoliciesBySubject(subject string) (ladon.Policies, error)
- func (g LadonGuard) GetPolicy(id string) (ladon.Policy, error)
- func (g LadonGuard) IsAllowed(request *ladon.Request) error
- func (g LadonGuard) UpdatePolicy(pol ladon.Policy) error
- type Manager
- type SqlManager
- func (m SqlManager) Create(pol ladon.Policy) error
- func (m SqlManager) Delete(id string) error
- func (m SqlManager) FindPoliciesForResource(resource string) (ladon.Policies, error)
- func (m SqlManager) FindPoliciesForSubject(subject string) (ladon.Policies, error)
- func (m SqlManager) FindRequestCandidates(r *ladon.Request) (ladon.Policies, error)
- func (m SqlManager) Get(id string) (ladon.Policy, error)
- func (m SqlManager) GetAll(limit, offset int64) (ladon.Policies, error)
- func (m SqlManager) Update(pol ladon.Policy) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard interface { CreatePolicy(pol ladon.Policy) error DeletePolicy(pol ladon.Policy) error GetPolicy(id string) (ladon.Policy, error) GetPolicies() (ladon.Policies, error) GetPoliciesBySubject(subject string) (ladon.Policies, error) IsAllowed(request *ladon.Request) error UpdatePolicy(pol ladon.Policy) error }
type LadonGuard ¶
type LadonGuard struct {
// contains filtered or unexported fields
}
func NewGuardWithInterfaces ¶
func NewGuardWithInterfaces(manager Manager) *LadonGuard
func (LadonGuard) CreatePolicy ¶
func (g LadonGuard) CreatePolicy(pol ladon.Policy) error
func (LadonGuard) DeletePolicy ¶
func (g LadonGuard) DeletePolicy(pol ladon.Policy) error
func (LadonGuard) GetPolicies ¶
func (g LadonGuard) GetPolicies() (ladon.Policies, error)
func (LadonGuard) GetPoliciesBySubject ¶
func (g LadonGuard) GetPoliciesBySubject(subject string) (ladon.Policies, error)
func (LadonGuard) UpdatePolicy ¶
func (g LadonGuard) UpdatePolicy(pol ladon.Policy) error
type SqlManager ¶
type SqlManager struct {
// contains filtered or unexported fields
}
func NewSqlManager ¶
func NewSqlManagerWithInterfaces ¶
func NewSqlManagerWithInterfaces(logger log.Logger, dbClient db.Client) *SqlManager
func (SqlManager) Delete ¶
func (m SqlManager) Delete(id string) error
func (SqlManager) FindPoliciesForResource ¶
func (m SqlManager) FindPoliciesForResource(resource string) (ladon.Policies, error)
func (SqlManager) FindPoliciesForSubject ¶
func (m SqlManager) FindPoliciesForSubject(subject string) (ladon.Policies, error)
func (SqlManager) FindRequestCandidates ¶
Click to show internal directories.
Click to hide internal directories.