service

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(Service) Service

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

func NewAmqpMiddleware

func NewAmqpMiddleware(channel *amqp.Channel, logger log.Logger) Middleware

func NewInstrumentingMiddleware

func NewInstrumentingMiddleware(counter metrics.Counter, latency metrics.Histogram) Middleware

type Service

type Service interface {
	GetSecretProviderName(ctx context.Context) string
	Health(ctx context.Context) bool
	GetCAs(ctx context.Context, caType secrets.CAType) ([]secrets.Cert, error)
	CreateCA(ctx context.Context, caType secrets.CAType, caName string, privateKeyMetadata secrets.PrivateKeyMetadata, subject secrets.Subject, caTTL int, enrollerTTL int) (secrets.Cert, error)
	ImportCA(ctx context.Context, caType secrets.CAType, caName string, certificate x509.Certificate, privateKey secrets.PrivateKey, enrollerTTL int) (secrets.Cert, error)
	DeleteCA(ctx context.Context, caType secrets.CAType, caName string) error
	GetIssuedCerts(ctx context.Context, caType secrets.CAType, caName string) ([]secrets.Cert, error)
	GetCert(ctx context.Context, caType secrets.CAType, caName string, serialNumber string) (secrets.Cert, error)
	DeleteCert(ctx context.Context, caType secrets.CAType, caName string, serialNumber string) error
	SignCertificate(ctx context.Context, caType secrets.CAType, signingCaName string, csr x509.CertificateRequest, signVerbatim bool) (string, error)
}

func NewCAService

func NewCAService(logger log.Logger, secrets secrets.Secrets) Service

Jump to

Keyboard shortcuts

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