service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEvent

func CreateEvent(ctx context.Context, version string, source string, types string) event.Event

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
	Stats(ctx context.Context) dto.Stats
	GetCAs(ctx context.Context, caType dto.CAType, queryparameters filters.QueryParameters) ([]dto.Cert, int, error)
	CreateCA(ctx context.Context, caType dto.CAType, caName string, privateKeyMetadata dto.PrivateKeyMetadata, subject dto.Subject, caTTL int, enrollerTTL int) (dto.Cert, error)
	ImportCA(ctx context.Context, caType dto.CAType, caName string, certificate x509.Certificate, privateKey dto.PrivateKey, enrollerTTL int) (dto.Cert, error)
	DeleteCA(ctx context.Context, caType dto.CAType, caName string) error
	GetIssuedCerts(ctx context.Context, caType dto.CAType, caName string, queryParameters filters.QueryParameters) ([]dto.Cert, int, error)
	GetCert(ctx context.Context, caType dto.CAType, caName string, serialNumber string) (dto.Cert, error)
	DeleteCert(ctx context.Context, caType dto.CAType, caName string, serialNumber string) error
	SignCertificate(ctx context.Context, caType dto.CAType, signingCaName string, csr x509.CertificateRequest, signVerbatim bool, cn string) (dto.SignResponse, error)
}

func NewCAService

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

Jump to

Keyboard shortcuts

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