serviceaccount

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCreateEndpoint

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

MakeCreateEndpoint creates a new http endpoint to create a service account

func MakeDeleteEndpoint

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

MakeDeleteEndpoint creates a new http endpoint to delete a service account

func MakeGetEndpoint

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

MakeGetEndpoint creates a new http endpoint to return a service account

func MakeGetRolesEndpoint

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

MakeGetRolesEndpoint creates a new http endpoint to return roles of a service account

func MakeSetRolesEndpoint

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

MakeSetRolesEndpoint creates a new http endpoint to set roles of a service account

func MakeUpdateEndpoint

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

MakeUpdateEndpoint creates a new http endpoint updates an already created service account

func NewGRPCServer

func NewGRPCServer(m Manager) pb.ManagerServer

NewGRPCServer creates a new instance of a grpc server for managing service accounts

Types

type Complete

type Complete interface {
	Identifier
	Incomplete
}

Complete represens a complete service account object

type Identifier

type Identifier interface {
	GUID() string
}

Identifier of a service account

func NewIdentifier

func NewIdentifier(guid string) Identifier

NewIdentifier creates a new identifier object

type Incomplete

type Incomplete interface {
	Provider
}

Incomplete represents an incomplete service account object

func NewIncomplete

func NewIncomplete(name, description string) Incomplete

NewIncomplete creates a new incomplete service account object

type Manager

type Manager interface {
	Repository
	GetRoles(context.Context, Identifier) (rbac.AccountRoles, error)
	SetRoles(context.Context, Identifier, rbac.AccountRoles) error
}

Manager provides methods to manage a service account

func NewGRPCClient

func NewGRPCClient(c *grpc.ClientConn) Manager

NewGRPCClient creates a new grpc client for the service account manager

func NewManager

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

NewManager creates a new service account manager

type Provider

type Provider interface {
	Data() *data
}

Provider provides methods for the incomplete service account object

type Repository

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

Repository to manage the storage of service accounts

Directories

Path Synopsis
key
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
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