endpoint

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDeleteDeviceEndpoint

func MakeDeleteDeviceEndpoint(s service.Service) endpoint.Endpoint

func MakeDeleteRevokeEndpoint

func MakeDeleteRevokeEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDeviceByIdEndpoint

func MakeGetDeviceByIdEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDeviceCertEndpoint

func MakeGetDeviceCertEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDeviceCertHistoryEndpoint

func MakeGetDeviceCertHistoryEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDeviceLogsEndpoint

func MakeGetDeviceLogsEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDevicesByDMSEndpoint

func MakeGetDevicesByDMSEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDevicesEndpoint

func MakeGetDevicesEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDmsCertHistoryThirtyDaysEndpoint

func MakeGetDmsCertHistoryThirtyDaysEndpoint(s service.Service) endpoint.Endpoint

func MakeGetDmsLastIssueCertEndpoint

func MakeGetDmsLastIssueCertEndpoint(s service.Service) endpoint.Endpoint

func MakeHealthEndpoint

func MakeHealthEndpoint(s service.Service) endpoint.Endpoint

func MakePostDeviceEndpoint

func MakePostDeviceEndpoint(s service.Service) endpoint.Endpoint

func ValidateCreatrCARequest

func ValidateCreatrCARequest(request CreateDeviceRequest) error

Types

type CreateDeviceRequest

type CreateDeviceRequest struct {
	DeviceID string `json:"id" validate:"required"`
	Alias    string `json:"alias" validate:"required"`
	DmsId    int    `json:"dms_id" validate:"required"`
	Subject  struct {
		CN string `json:"common_name" validate:"required"`
		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' 'ecdsa'"`
		KeyBits int    `json:"bits" validate:"required"`
	} `json:"key_metadata" validate:"required"`
}

type DeleteDeviceRequest

type DeleteDeviceRequest struct {
	Id string
}

type DeleteRevokeRequest

type DeleteRevokeRequest struct {
	Id string
}

type Endpoints

type Endpoints struct {
	HealthEndpoint              endpoint.Endpoint
	PostDeviceEndpoint          endpoint.Endpoint
	GetDevices                  endpoint.Endpoint
	GetDeviceById               endpoint.Endpoint
	GetDevicesByDMS             endpoint.Endpoint
	DeleteDevice                endpoint.Endpoint
	DeleteRevoke                endpoint.Endpoint
	GetDeviceLogs               endpoint.Endpoint
	GetDeviceCert               endpoint.Endpoint
	GetDeviceCertHistory        endpoint.Endpoint
	GetDmsCertHistoryThirtyDays endpoint.Endpoint
	GetDmsLastIssueCert         endpoint.Endpoint
}

func MakeServerEndpoints

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

type GetDeviceCertHistoryRequest

type GetDeviceCertHistoryRequest struct {
	Id string
}

type GetDeviceCertRequest

type GetDeviceCertRequest struct {
	Id string
}

type GetDeviceLogsRequest

type GetDeviceLogsRequest struct {
	Id string
}

type GetDevicesByDMSRequest

type GetDevicesByDMSRequest struct {
	Id string
}

type GetDevicesByIdRequest

type GetDevicesByIdRequest struct {
	Id string
}

type GetDevicesResponse

type GetDevicesResponse struct {
	Devices []device.Device `json:"devices,omitempty"`
	Err     error           `json:"err,omitempty"`
}

type HealthRequest

type HealthRequest struct{}

type HealthResponse

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

type PostDeviceResponse

type PostDeviceResponse struct {
	Device device.Device `json:"device,omitempty"`
	Err    error         `json:"err,omitempty"`
}

type PostIssueCertResponse

type PostIssueCertResponse struct {
	Crt string `json:"crt,omitempty"`
	Err error  `json:"err,omitempty"`
}

type PostIssueCertUsingDefaultResponse

type PostIssueCertUsingDefaultResponse struct {
	Crt     string `json:"crt,omitempty"`
	PrivKey string `json:"priv_key,omitempty"`
	Err     error  `json:"err,omitempty"`
}

Jump to

Keyboard shortcuts

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