acl

package
v0.0.0-...-ddbf6aa Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package acl implement access control for configs and actions.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReadPermission allows caller to read the config set.
	ReadPermission = realms.RegisterPermission("configs.configSets.read")
	// ReadPermission allows caller to validate the config set.
	ValidatePermission = realms.RegisterPermission("configs.configSets.validate")
	// ReadPermission allows caller to re-import the config set.
	ReimportPermission = realms.RegisterPermission("configs.configSets.reimport")
)

Functions

func CanReadConfigSet

func CanReadConfigSet(ctx context.Context, cs config.Set) (bool, error)

CanReadConfigSet checks whether the requester can read the provided config set.

func CanReadConfigSets

func CanReadConfigSets(ctx context.Context, sets []config.Set) ([]bool, error)

CanReadConfigSets checks whether the requester can read the config sets.

Returns a bitmap that maps to the provided config sets.

func CanReadProject

func CanReadProject(ctx context.Context, project string) (bool, error)

CanReadProject checks whether the requester can read the config for the provided project

func CanReadProjects

func CanReadProjects(ctx context.Context, projects []string) ([]bool, error)

CanReadProjects checks whether the requester can read the provided projects.

Returns a bitmap that maps to the provided projects.

func CanReadService

func CanReadService(ctx context.Context, service string) (bool, error)

CanReadService checks whether the requester can read the config for the provided service.

func CanReadServices

func CanReadServices(ctx context.Context, services []string) ([]bool, error)

CanReadServices checks whether the requester can read the provided services.

Returns a bitmap that maps to the provided services.

func CanReimportConfigSet

func CanReimportConfigSet(ctx context.Context, cs config.Set) (bool, error)

CanReimportConfigSet checks whether the requester can reimport the provided config set.

func CanReimportProject

func CanReimportProject(ctx context.Context, project string) (bool, error)

CanReimportProject checks whether the requester can reimport the config for the provided project.

func CanReimportService

func CanReimportService(ctx context.Context, service string) (bool, error)

CanReimportService checks whether the requester can reimport the config for the provided service.

func CanValidateConfigSet

func CanValidateConfigSet(ctx context.Context, cs config.Set) (bool, error)

CanValidateConfigSet checks whether the requester can validate the provided config set.

func CanValidateProject

func CanValidateProject(ctx context.Context, project string) (bool, error)

CanValidateProject checks whether the requester can validate the config for the provided project.

func CanValidateService

func CanValidateService(ctx context.Context, service string) (bool, error)

CanValidateService checks whether the requester can validate the config for the provided service.

Types

This section is empty.

Jump to

Keyboard shortcuts

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