api

package
v0.0.0-...-8f4e97c Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Client errors
	ErrInvalidID = errors.New("invalid CSR ID, does not exist") //404

	//Server errors
	ErrInvalidOperation = errors.New("invalid operation")
	ErrGetCSR           = errors.New("unable to get CSR")
	ErrGetCert          = errors.New("unable to get certificate")
	ErrInsertCert       = errors.New("unable to insert certificate")
	ErrInsertCSR        = errors.New("unable to insert CSR")
	ErrInsertKey        = errors.New("unable to insert Key")
	ErrResponseEncode   = errors.New("error encoding response")
)

Functions

func MakeHTTPHandler

func MakeHTTPHandler(s Service, logger log.Logger, otTracer stdopentracing.Tracer) http.Handler

func MakeHealthEndpoint

func MakeHealthEndpoint(s Service) endpoint.Endpoint

func MakePostDMSIssueCSREndpoint

func MakePostDMSIssueCSREndpoint(s Service) endpoint.Endpoint

func MakePostDMSIssueEndpoint

func MakePostDMSIssueEndpoint(s Service) endpoint.Endpoint

func MakePostDMSRenewEndpoint

func MakePostDMSRenewEndpoint(s Service) endpoint.Endpoint

Types

type Endpoints

type Endpoints struct {
	HealthEndpoint  endpoint.Endpoint
	PostDMSRenew    endpoint.Endpoint
	PostDMSIssueCSR endpoint.Endpoint
	PostDMSIssue    endpoint.Endpoint
}

func MakeServerEndpoints

func MakeServerEndpoints(s Service, otTracer stdopentracing.Tracer) Endpoints

type Middleware

type Middleware func(Service) Service

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

func NewInstrumentingMiddleware

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

type Service

type Service interface {
	Health(ctx context.Context) bool
	// contains filtered or unexported methods
}

func NewDMSService

func NewDMSService(fileStore filestore.File, homePath string) Service

Jump to

Keyboard shortcuts

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