Documentation ¶
Index ¶
- Variables
- func MakeDeleteCSREndpoint(s Service) endpoint.Endpoint
- func MakeGetCTREndpoint(s Service) endpoint.Endpoint
- func MakeGetPendingCSRDBEndpoint(s Service) endpoint.Endpoint
- func MakeGetPendingCSRFileEndpoint(s Service) endpoint.Endpoint
- func MakeGetPendingCSRsEndpoint(s Service) endpoint.Endpoint
- func MakeHTTPHandler(s Service, logger log.Logger, auth auth.Auth, otTracer stdopentracing.Tracer) http.Handler
- func MakeHealthEndpoint(s Service) endpoint.Endpoint
- func MakePostCSREndpoint(s Service) endpoint.Endpoint
- func MakePutChangeCSRStatusEndpoint(s Service) endpoint.Endpoint
- type Endpoints
- type Middleware
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Client errors ErrInvalidCSR = errors.New("unable to parse CSR, is invalid") //400 ErrInvalidID = errors.New("invalid CSR ID, does not exist") //404 ErrInvalidIDFormat = errors.New("invalid ID format") ErrInvalidApprobeOp = errors.New("invalid operation, only pending status CSRs can be approved") //400 ErrInvalidRevokeOp = errors.New("invalid operation, only approved status CSRs can be revoked") //400 ErrInvalidDenyOp = errors.New("invalid operation, only pending status CSRs can be denied") //400 ErrInvalidDeleteOp = errors.New("invalid operation, only denied or revoked status CSRs can be deleted") //400 ErrIncorrectType = errors.New("unsupported media type") //415 ErrEmptyBody = errors.New("empty body") //Server errors ErrInvalidOperation = errors.New("invalid operation") ErrInsertCSR = errors.New("unable to insert CSR") ErrInsertCert = errors.New("unable to insert certificate") ErrGetCSR = errors.New("unable to get CSR") ErrGetCert = errors.New("unable to get certificate") ErrUpdateCSR = errors.New("unable to update CSR") ErrDeleteCSR = errors.New("unable to delete CSR") ErrSignCSR = errors.New("unable to sign CSR") ErrRevokeCert = errors.New("unable to revoke certificate") ErrResponseEncode = errors.New("error encoding response") )
Functions ¶
func MakeDeleteCSREndpoint ¶
func MakeGetCTREndpoint ¶
func MakeHTTPHandler ¶
func MakeHealthEndpoint ¶
func MakePostCSREndpoint ¶
Types ¶
type Endpoints ¶
type Endpoints struct { HealthEndpoint endpoint.Endpoint PostCSREndpoint endpoint.Endpoint GetPendingCSRsEndpoint endpoint.Endpoint GetPendingCSRDBEndpoint endpoint.Endpoint GetPendingCSRFileEndpoint endpoint.Endpoint PutChangeCSRStatusEndpoint endpoint.Endpoint DeleteCSREndpoint endpoint.Endpoint GetCRTEndpoint endpoint.Endpoint }
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, otTracer stdopentracing.Tracer) Endpoints
type Middleware ¶
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 PostCSR(ctx context.Context, data []byte) (csrmodel.CSR, error) GetPendingCSRs(ctx context.Context) csrmodel.CSRs GetPendingCSRDB(ctx context.Context, id int) (csrmodel.CSR, error) GetPendingCSRFile(ctx context.Context, id int) ([]byte, error) PutChangeCSRStatus(ctx context.Context, csr csrmodel.CSR, id int) (csrmodel.CSR, error) DeleteCSR(ctx context.Context, id int) error GetCRT(ctx context.Context, id int) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.