Documentation ¶
Index ¶
- type AuditLogger
- type Guard
- type LadonGuard
- func (g LadonGuard) CreatePolicy(ctx context.Context, pol ladon.Policy) error
- func (g LadonGuard) DeletePolicy(ctx context.Context, pol ladon.Policy) error
- func (g LadonGuard) GetPolicies(ctx context.Context) (ladon.Policies, error)
- func (g LadonGuard) GetPoliciesBySubject(ctx context.Context, subject string) (ladon.Policies, error)
- func (g LadonGuard) GetPolicy(ctx context.Context, id string) (ladon.Policy, error)
- func (g LadonGuard) IsAllowed(ctx context.Context, request *ladon.Request) error
- func (g LadonGuard) UpdatePolicy(ctx context.Context, pol ladon.Policy) error
- type Manager
- type SqlManager
- func (m SqlManager) Create(ctx context.Context, pol ladon.Policy) error
- func (m SqlManager) Delete(ctx context.Context, id string) error
- func (m SqlManager) FindPoliciesForResource(ctx context.Context, resource string) (ladon.Policies, error)
- func (m SqlManager) FindPoliciesForSubject(ctx context.Context, subject string) (ladon.Policies, error)
- func (m SqlManager) FindRequestCandidates(ctx context.Context, r *ladon.Request) (ladon.Policies, error)
- func (m SqlManager) Get(ctx context.Context, id string) (ladon.Policy, error)
- func (m SqlManager) GetAll(ctx context.Context, limit, offset int64) (ladon.Policies, error)
- func (m SqlManager) Update(ctx context.Context, pol ladon.Policy) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogger ¶ added in v0.8.4
type AuditLogger interface { ladon.AuditLogger }
func NewAuditLogger ¶ added in v0.8.4
func NewAuditLogger(config cfg.Config, logger log.Logger) AuditLogger
type Guard ¶
type Guard interface { CreatePolicy(ctx context.Context, pol ladon.Policy) error DeletePolicy(ctx context.Context, pol ladon.Policy) error GetPolicy(ctx context.Context, id string) (ladon.Policy, error) GetPolicies(ctx context.Context) (ladon.Policies, error) GetPoliciesBySubject(ctx context.Context, subject string) (ladon.Policies, error) IsAllowed(ctx context.Context, request *ladon.Request) error UpdatePolicy(ctx context.Context, pol ladon.Policy) error }
type LadonGuard ¶
type LadonGuard struct {
// contains filtered or unexported fields
}
func NewGuardWithInterfaces ¶
func NewGuardWithInterfaces(manager Manager, logger AuditLogger) *LadonGuard
func (LadonGuard) CreatePolicy ¶
func (LadonGuard) DeletePolicy ¶
func (LadonGuard) GetPolicies ¶
func (LadonGuard) GetPoliciesBySubject ¶
func (LadonGuard) UpdatePolicy ¶
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) FindPoliciesForResource ¶
func (SqlManager) FindPoliciesForSubject ¶
func (SqlManager) FindRequestCandidates ¶
Click to show internal directories.
Click to hide internal directories.