config

package
v0.0.0-...-95ad4f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfig = errors.New("invalid config")

Functions

This section is empty.

Types

type Config

type Config struct {
	User      *User       `json:"user"`
	Group     *Group      `json:"group"`
	Role      *Role       `json:"role"`
	Relations []*Relation `json:"relations"`
}

func (*Config) HasGroups

func (c *Config) HasGroups() bool

func (*Config) Validate

func (cfg *Config) Validate() error

type Group

type Group struct {
	ObjectType          string `json:"object_type"`
	GroupMemberRelation string `json:"group_member_relation"`
	SourceObjectType    string `json:"source_object_type"`
}

type Relation

type Relation struct {
	SubjectType     string `json:"subject_type"`
	SubjectID       string `json:"subject_id"`
	ObjectType      string `json:"object_type"`
	ObjectID        string `json:"object_id"`
	Relation        string `json:"relation"`
	SubjectRelation string `json:"subject_relation"`
}

type Role

type Role struct {
	ObjectType   string `json:"object_type"`
	RoleRelation string `json:"role_relation"`
}

type User

type User struct {
	ObjectType         string            `json:"object_type"`
	IdentityObjectType string            `json:"identity_object_type"`
	IdentityRelation   string            `json:"identity_relation"`
	PropertyMapping    map[string]string `json:"property_mapping"`
	SourceObjectType   string            `json:"source_object_type"`
	ManagerRelation    string            `json:"manager_relation"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL