acl

package
v0.0.0-...-a4cf392 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: LGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnauthorized indicates that a client doesn't have access to a resource
	ErrUnauthorized = status.Errorf(codes.PermissionDenied, "unauthorised")
)

Functions

This section is empty.

Types

type AsyncSinkFactory

type AsyncSinkFactory struct {
	Config Config
	Next   proximo.AsyncSinkFactory
}

func (AsyncSinkFactory) NewAsyncSink

type AsyncSourceFactory

type AsyncSourceFactory struct {
	Config Config
	Next   proximo.AsyncSourceFactory
}

func (AsyncSourceFactory) NewAsyncSource

type Config

type Config interface {
	GetClientScope(ctx context.Context) (*Scope, error)
}

Config allows retrieve of access scope for the current client

func ConfigFromFile

func ConfigFromFile(configFile string) (Config, error)

ConfigFromFile parses and compiles ACL config from a yaml file

func ConfigFromString

func ConfigFromString(configString string) (Config, error)

ConfigFromString parses and compiles ACL config from a string

type Scope

type Scope struct {
	Consume []*regexp.Regexp
	Publish []*regexp.Regexp
}

Scope contains the access rights for a particular client

Jump to

Keyboard shortcuts

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