endpoint

package
v0.0.25 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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeChangeDMSStatusEndpoint

func MakeChangeDMSStatusEndpoint(s service.Service) endpoint.Endpoint

func MakeCreateDMSEndpoint

func MakeCreateDMSEndpoint(s service.Service) endpoint.Endpoint

func MakeCreateDMSFormEndpoint

func MakeCreateDMSFormEndpoint(s service.Service) endpoint.Endpoint

func MakeDeleteDMSEndpoint

func MakeDeleteDMSEndpoint(s service.Service) endpoint.Endpoint

func MakeGetCertificateEndpoint

func MakeGetCertificateEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDMSbyIDEndpoint added in v0.0.22

func MakeGetDMSbyIDEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDMSsEndpoint

func MakeGetDMSsEndpoint(s service.Service) endpoint.Endpoint

func MakeHealthEndpoint

func MakeHealthEndpoint(s service.Service) endpoint.Endpoint

func ValidatePostDmsCreationFormRequest

func ValidatePostDmsCreationFormRequest(request PostDmsCreationFormRequest) error

func ValidatetPostCSRRequest

func ValidatetPostCSRRequest(request PostCSRRequest) error

func ValidatetPutChangeDmsStatusRequest

func ValidatetPutChangeDmsStatusRequest(request PutChangeDmsStatusRequest) error

Types

type DeleteCSRRequest

type DeleteCSRRequest struct {
	ID string
}

type DeleteCSRResponse

type DeleteCSRResponse struct {
	Err error
}

type Endpoints

type Endpoints struct {
	HealthEndpoint             endpoint.Endpoint
	PostCreateDMSEndpoint      endpoint.Endpoint
	PostCreateDMSFormEndpoint  endpoint.Endpoint
	PutChangeDMSStatusEndpoint endpoint.Endpoint
	DeleteDMSEndpoint          endpoint.Endpoint
	GetDMSsEndpoint            endpoint.Endpoint
	GetDMSbyIDEndpoint         endpoint.Endpoint
	GetCertificateEndpoint     endpoint.Endpoint
}

func MakeServerEndpoints

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

type GetCRTRequest

type GetCRTRequest struct {
	ID string
}

type GetCRTResponse

type GetCRTResponse struct {
	Data *x509.Certificate
	Err  error
}

type GetDmsIDRequest added in v0.0.22

type GetDmsIDRequest struct {
	ID string
}

type GetDmsRequest

type GetDmsRequest struct{}

type GetPendingCSRFileResponse

type GetPendingCSRFileResponse struct {
	Data []byte
	Err  error
}

type HealthRequest

type HealthRequest struct{}

type HealthResponse

type HealthResponse struct {
	Healthy bool  `json:"healthy,omitempty"`
	Err     error `json:"err,omitempty"`
}

type PostCSRRequest

type PostCSRRequest struct {
	Csr     string `json:"csr" validate:"required"`
	DmsName string `json:"name" validate:"required"`
}

type PostDirectCsr

type PostDirectCsr struct {
	CsrBase64Encoded string `json:"csr"`
}

type PostDmsCreationFormRequest

type PostDmsCreationFormRequest struct {
	DmsName string `json:"name" validate:"required"`
	Subject struct {
		CN string `json:"common_name"`
		O  string `json:"organization"`
		OU string `json:"organization_unit"`
		C  string `json:"country"`
		ST string `json:"state"`
		L  string `json:"locality"`
	} `json:"subject"`
	KeyMetadata struct {
		KeyType     string `json:"type" validate:"oneof='RSA' 'EC'"`
		KeyBits     int    `json:"bits" validate:"required"`
		KeyStrength string `json:"strength,omitempty"`
	} `json:"key_metadata" validate:"required"`
}

type PostDmsCreationFormResponse

type PostDmsCreationFormResponse struct {
	Dms     dms.DMS `json:"dms,omitempty"`
	PrivKey string  `json:"priv_key,omitempty"`
	Err     error   `json:"err,omitempty"`
}

type PostDmsResponse

type PostDmsResponse struct {
	Dms dms.DMS `json:"dms,omitempty"`
	Err error   `json:"err,omitempty"`
}

type PutChangeCSRsResponse

type PutChangeCSRsResponse struct {
	Dms dms.DMS
	Err error
}

type PutChangeDmsStatusRequest

type PutChangeDmsStatusRequest struct {
	Status string   `json:"status" validate:"oneof='PENDING_APPROVAL' 'APPROVED'  'DENIED'  'REVOKED'"`
	CAs    []string `json:"authorized_cas"`
	ID     string   `validate:"required"`
}

Jump to

Keyboard shortcuts

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