graph

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistsGroup

func ExistsGroup(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

func ExistsPermission

func ExistsPermission(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

func ExistsResource

func ExistsResource(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

func ExistsRole

func ExistsRole(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

func ExistsSubject

func ExistsSubject(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

func HasChildren

func HasChildren(ctx context.Context, txn *dgo.Txn, name string) (bool, error)

Types

type Binding

type Binding struct {
	Role    *Role    `json:"Binding.role"`
	Members []Member `json:"Binding.members"`
}

type Group

type Group struct {
	Name    string   `json:"Group.name"`
	Members []Member `json:"Group.members"`
	ETag    string   `json:"Group.etag"`
}

func GetGroup

func GetGroup(ctx context.Context, txn *dgo.Txn, name string) (*Group, error)

type Member

type Member struct {
	Group   string `json:"Group.name"`
	Subject string `json:"Subject.name"`
}

type Permission

type Permission struct {
	Name string `json:"Permission.name"`
}

type Policy

type Policy struct {
	Bindings []*Binding `json:"Policy.bindings"`
	Version  int32      `json:"Policy.version"`
	ETag     string     `json:"Policy.etag"`
}

type Resource

type Resource struct {
	Name   string    `json:"Resource.name"`
	Policy *Policy   `json:"Resource.policy"`
	Parent *Resource `json:"Resource.parent"`
	ETag   string    `json:"Resource.etag"`
}

func GetResource

func GetResource(ctx context.Context, txn *dgo.Txn, name string) (*Resource, error)

type Role

type Role struct {
	Name        string        `json:"Role.name"`
	Permissions []*Permission `json:"Role.permissions"`
	ETag        string        `json:"Role.etag"`
}

func GetRole

func GetRole(ctx context.Context, txn *dgo.Txn, name string) (*Role, error)

type Subject

type Subject struct {
	Name string `json:"Subject.name"`
}

Jump to

Keyboard shortcuts

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