Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authz ¶
type Authz struct {
// contains filtered or unexported fields
}
func New ¶
func New(log log.Logger, next, escape hook.Service, resourceService ResourceService, relationService RelationService, relationAdapter RelationTransformer, identityProxyHeaderKey string) Authz
type Config ¶
type Config struct {
Action string `yaml:"action" mapstructure:"action"`
Attributes map[string]proxyattr.Attribute `yaml:"attributes" mapstructure:"attributes"`
Relations []Relation `yaml:"relations" mapstructure:"relations"`
// RelationOnly, when true, makes the hook attach relations to an already
// existing resource (looked up by URN) instead of upserting the resource.
// Upserting deletes all existing subject relations on the resource before
// re-adding them; relation_only avoids that so relations are added additively.
RelationOnly bool `yaml:"relation_only" mapstructure:"relation_only"`
}
type ProjectService ¶
type RelationService ¶
type RelationService interface {
Create(ctx context.Context, relation relation.RelationV2) (relation.RelationV2, error)
}
type RelationTransformer ¶ added in v0.6.5
type RelationTransformer interface {
TransformRelation(ctx context.Context, rlt relation.RelationV2) (relation.RelationV2, error)
}
Click to show internal directories.
Click to hide internal directories.