policies

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MPL-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAllowed = errors.New("unauthorized to process request")

ErrNotAllowed is returned when request is not permitted.

Functions

This section is empty.

Types

type AuthKey

type AuthKey string
const AuthCtxKey AuthKey = "GoAuthzKey"

type OrganisationPolicy

type OrganisationPolicy struct {
	// contains filtered or unexported fields
}

func NewOrganisationPolicy

func NewOrganisationPolicy(opts *OrganisationPolicyOpts) *OrganisationPolicy

func (*OrganisationPolicy) Delete

func (*OrganisationPolicy) Get

func (*OrganisationPolicy) Update

type OrganisationPolicyOpts

type OrganisationPolicyOpts struct {
	OrganisationMemberRepo datastore.OrganisationMemberRepository
}

type ProjectPolicy

type ProjectPolicy struct {
	// contains filtered or unexported fields
}

func NewProjectPolicy

func NewProjectPolicy(opts *ProjectPolicyOpts) *ProjectPolicy

func (*ProjectPolicy) Create

func (pp *ProjectPolicy) Create(ctx context.Context, org *datastore.Organisation) error

func (*ProjectPolicy) Delete

func (pp *ProjectPolicy) Delete(ctx context.Context, project *datastore.Project) error

func (*ProjectPolicy) Get

func (pp *ProjectPolicy) Get(ctx context.Context, project *datastore.Project) error

func (*ProjectPolicy) Update

func (pp *ProjectPolicy) Update(ctx context.Context, project *datastore.Project) error

type ProjectPolicyOpts

type ProjectPolicyOpts struct {
	OrganisationRepo       datastore.OrganisationRepository
	OrganisationMemberRepo datastore.OrganisationMemberRepository
}

Jump to

Keyboard shortcuts

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