api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MPL-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGetCRTEndpoint

func MakeGetCRTEndpoint(s Service) endpoint.Endpoint

func MakeGetCSRStatusEndpoint

func MakeGetCSRStatusEndpoint(s Service) endpoint.Endpoint

func MakeGetCSRsEndpoint

func MakeGetCSRsEndpoint(s Service) endpoint.Endpoint

func MakeHTTPHandler

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

func MakeHealthEndpoint

func MakeHealthEndpoint(s Service) endpoint.Endpoint

Types

type Endpoints

type Endpoints struct {
	HealthEndpoint       endpoint.Endpoint
	GetCSRsEndpoint      endpoint.Endpoint
	GetCSRStatusEndpoint endpoint.Endpoint
	GetCRTEndpoint       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
	GetCSRs(ctx context.Context) csrmodel.CSRs
	GetCSRStatus(ctx context.Context, id int) (csrmodel.CSR, error)
	GetCRT(ctx context.Context, id int) ([]byte, error)
}

func NewEnrrolerService

func NewEnrrolerService() Service

type ServiceMiddleware

type ServiceMiddleware func(Service) Service

func ProxyingMiddleware

func ProxyingMiddleware(proxyURL string, proxyCA string, consulProtocol string, consulHost string, consulPort string, consulCA string, logger log.Logger, otTracer stdopentracing.Tracer) ServiceMiddleware

Jump to

Keyboard shortcuts

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