checker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpPermissions

func DumpPermissions(perms map[string][]*Permissions)

DumpPermissions dumps permissions for our clients to stdout.

Types

type Credentials

type Credentials struct {
	// RequestID is the ID of the request.
	RequestID string
	// Client is the authenticated client.
	Client string
	// IP is the originating IP address of the request.
	IP string
}

Credentials are the credentials used to check.

type Permissions

type Permissions struct {
	Path       string   `mapstructure:"path"`
	Operations []string `mapstructure:"operations"`
}

Permissions contains information about the operations allowed by the client.

type Service

type Service interface {
	Check(ctx context.Context, credentials *Credentials, account string, operation string) bool
}

Service is the interface for checking client access to accounts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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