grant

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 71

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrant

func NewGrant(resource *v2.Resource, entitlementName string, principal GrantPrincipal, grantOptions ...GrantOption) *v2.Grant

NewGrant returns a new grant for the given entitlement on the resource for the provided principal resource ID.

Types

type GrantOption

type GrantOption func(*v2.Grant) error

func WithAnnotation

func WithAnnotation(msgs ...proto.Message) GrantOption

func WithExternalPrincipalID added in v0.1.15

func WithExternalPrincipalID(externalID *v2.ExternalId) GrantOption

func WithGrantMetadata added in v0.1.1

func WithGrantMetadata(metadata map[string]interface{}) GrantOption

type GrantPrincipal added in v0.0.20

type GrantPrincipal interface {
	proto.Message
	GetBatonResource() bool
}

Jump to

Keyboard shortcuts

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