role

package
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCreateEndpoint

func MakeCreateEndpoint(l *zap.Logger, m Manager, e encode.Encoder, pubKey rsa.PublicKey, rb rbac.Control) http.HandlerFunc

MakeCreateEndpoint for the role service

func MakeDeleteEndpoint

func MakeDeleteEndpoint(l *zap.Logger, m Manager, e encode.Encoder, pubKey rsa.PublicKey, rb rbac.Control) http.HandlerFunc

MakeDeleteEndpoint for the role service

func MakeGetEndpoint

func MakeGetEndpoint(l *zap.Logger, m Manager, e encode.Encoder, pubKey rsa.PublicKey, rb rbac.Control) http.HandlerFunc

MakeGetEndpoint for the role service

func MakeSetEndpoint

func MakeSetEndpoint(l *zap.Logger, m Manager, e encode.Encoder, pubKey rsa.PublicKey, rb rbac.Control) http.HandlerFunc

MakeSetEndpoint for the role service

Types

type Complete

type Complete interface {
	Identifier
	Incomplete
}

Complete role object

type Identifier

type Identifier interface {
	ID() rbac.RoleID
}

Identifier of a role object

type Incomplete

type Incomplete interface {
	Data() *data
}

Incomplete role object

func NewIncomplete

func NewIncomplete(title, description string, rules rbac.RoleRules) Incomplete

NewIncomplete creates a new incomplete role object

type Manager

Manager for managing role informations

func NewManager

func NewManager(repo Repository, rb rbac.Control) Manager

NewManager creates a new instance of a manager for role information

type Provider

type Provider interface {
	Data() *data
}

Provider of payload data of a role object

type Repository

type Repository interface {
	Get(context.Context, Identifier) (Complete, error)
	Update(context.Context, Complete) error
	Create(context.Context, Complete) error
	Delete(context.Context, Identifier) error
}

Repository for storage of role information

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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