constraints

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SharedPermissionRead   = SharedPermission(opa.OpRead)
	SharedPermissionWrite  = SharedPermission(opa.OpWrite)
	SharedPermissionDelete = SharedPermission(opa.OpDelete)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SharedPermission

type SharedPermission opa.ResourceOperation

type Sharing

type Sharing map[uuid.UUID][]SharedPermission

Sharing is a Model type that stores mapping between user IDs and a list of allowed permissions as JSONB map This type works with OPA sharing policy

func (Sharing) GormDataType

func (s Sharing) GormDataType() string

func (*Sharing) Scan

func (s *Sharing) Scan(src interface{}) error

Scan implements sql.Scanner

func (Sharing) Share

func (s Sharing) Share(userID uuid.UUID, perms ...SharedPermission)

func (Sharing) Value

func (s Sharing) Value() (driver.Value, error)

Value implements driver.Valuer

Jump to

Keyboard shortcuts

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