policy

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepoValidName   = repo + ".valid_name"
	RepoCreate      = repo + ".create"
	RepoRead        = repo + ".read"
	RepoWrite       = repo + ".write"
	RepoAdmin       = repo + ".admin"
	NamespaceCreate = namespace + ".create"
	NamespaceRead   = namespace + ".read"
	NamespaceWrite  = namespace + ".write"
	NamespaceAdmin  = namespace + ".admin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Evaluate(query string, input interface{}) bool
}

type PolicyRequest

type PolicyRequest struct {
	Repo                 models.Repo                   `json:"repo"`
	CreateNamespace      models.CreateNamespaceRequest `json:"create_namespace"`
	Namespace            models.Namespace              `json:"namespace"`
	CreateRepo           models.CreateRepoRequest      `json:"create_repo"`
	RepoPermissions      []models.RepoPermission       `json:"repo_permissions"`
	NamespacePermissions []models.NamespacePermission  `json:"namespace_permissions"`
	UserID               string                        `json:"uid"`
}

type Service

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

func New

func New() *Service

func (*Service) Evaluate

func (s *Service) Evaluate(query string, input interface{}) bool

Jump to

Keyboard shortcuts

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