Documentation ¶
Index ¶
- func MakeCreateEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func MakeDeleteEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func MakeGetEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func MakeGetRolesEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func MakeSetRolesEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func MakeUpdateEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func NewGRPCServer(m Manager) pb.ManagerServer
- type Complete
- type Identifier
- type Incomplete
- type Manager
- type Provider
- type Repository
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