endpoint

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeEnrollEndpoint

func MakeEnrollEndpoint(s service.Service) endpoint.Endpoint

func MakeGetCAsEndpoint

func MakeGetCAsEndpoint(s service.Service) endpoint.Endpoint

func MakeHealthEndpoint

func MakeHealthEndpoint(s service.Service) endpoint.Endpoint

func MakeReenrollEndpoint

func MakeReenrollEndpoint(s service.Service) endpoint.Endpoint

func MakeServerKeyGenEndpoint

func MakeServerKeyGenEndpoint(s service.Service) endpoint.Endpoint

func ValidateServerKeyGenRequest

func ValidateServerKeyGenRequest(request ServerKeyGenRequest) error

func ValidatetEnrollRequest

func ValidatetEnrollRequest(request EnrollRequest) error

func ValidatetReenrollRequest

func ValidatetReenrollRequest(request ReenrollRequest) error

Types

type EmptyRequest

type EmptyRequest struct{}

type Endpoints

type Endpoints struct {
	HealthEndpoint       endpoint.Endpoint
	GetCAsEndpoint       endpoint.Endpoint
	EnrollerEndpoint     endpoint.Endpoint
	ReenrollerEndpoint   endpoint.Endpoint
	ServerKeyGenEndpoint endpoint.Endpoint
}

func MakeServerEndpoints

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

type EnrollReenrollResponse

type EnrollReenrollResponse struct {
	Cert   *x509.Certificate
	CaCert *x509.Certificate
}

type EnrollRequest

type EnrollRequest struct {
	Csr *x509.CertificateRequest `validate:"required"`
	Aps string                   `validate:"required"`
	Crt *x509.Certificate        `validate:"required"`
}

type GetCasResponse

type GetCasResponse struct {
	Certs []*x509.Certificate
}

type HealthResponse

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

type ReenrollRequest

type ReenrollRequest struct {
	Csr *x509.CertificateRequest `validate:"required"`
	Crt *x509.Certificate        `validate:"required"`
}

type ServerKeyGenRequest

type ServerKeyGenRequest struct {
	Csr *x509.CertificateRequest `validate:"required"`
	Aps string                   `validate:"required"`
	Crt *x509.Certificate        `validate:"required"`
}

type ServerKeyGenResponse

type ServerKeyGenResponse struct {
	Cert   *x509.Certificate
	Key    []byte
	CaCert *x509.Certificate
}

Jump to

Keyboard shortcuts

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