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 MakeSetEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, ...) http.HandlerFunc
- func NewGRPCServer(m Manager) pb.ManagerServer
- type ClientKey
- 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 for the creation of service account keys
func MakeDeleteEndpoint ¶
func MakeDeleteEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, rb rbac.Control) http.HandlerFunc
MakeDeleteEndpoint create a new http endpoint to delete service account keys
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 for the return of service account keys
func MakeSetEndpoint ¶
func MakeSetEndpoint(l *zap.Logger, e encode.Encoder, publicKey *rsa.PublicKey, m Manager, rb rbac.Control) http.HandlerFunc
MakeSetEndpoint creates a new http endpoint for updating the service account key info
func NewGRPCServer ¶
func NewGRPCServer(m Manager) pb.ManagerServer
NewGRPCServer creates a new instance of a grpc server interface to register
Types ¶
type ClientKey ¶
type ClientKey struct { ServiceAccountGUID string `json:"service_account_guid"` GUID string `json:"guid"` PrivateKey *rsa.PrivateKey `json:"-"` }
ClientKey represents the private key a client receives when creating a service account keypair
func (*ClientKey) MarshalJSON ¶
MarshalJSON marshals the client key to presentable data
func (*ClientKey) UnmarshalJSON ¶
UnmarshalJSON unmarshals incoming JSON
type Complete ¶
type Complete interface { Identifier Incomplete }
Complete represents a complete service account keypair object
type Identifier ¶
type Identifier interface {
GUID() string
}
Identifier of a service account keypair
func NewIdentifier ¶
func NewIdentifier(g string) Identifier
NewIdentifier creates a new identifier object
type Incomplete ¶
type Incomplete interface { Provider }
Incomplete represents an incomplete service account keypair
func NewIncomplete ¶
func NewIncomplete(name, description string) Incomplete
NewIncomplete creates a new incomplete service account keypair object
type Manager ¶
type Manager interface { Get(context.Context, Identifier) (Complete, error) Update(context.Context, Complete) error Delete(context.Context, Identifier) error Create(context.Context, Incomplete) (*ClientKey, error) }
Manager for service account keys
func NewGRPCClient ¶
func NewGRPCClient(c *grpc.ClientConn) Manager
NewGRPCClient creates a new grpc client for serviceaccount keys
func NewManager ¶
func NewManager(r Repository, s serviceaccount.Manager) Manager
NewManager creates a new service account key manager
type Provider ¶
type Provider interface {
Data() *data
}
Provider provides data of a service account keypair
type Repository ¶
type Repository interface { Get(context.Context, Identifier) (Complete, error) Update(context.Context, Complete) error Create(context.Context, Incomplete) (Complete, error) Delete(context.Context, Identifier) error }
Repository represents methods to save and read data regarding keys