endpoint

package
v0.0.14 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: 6 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 MakeUpdateDeviceByIdEndpoint added in v0.0.10

func MakeUpdateDeviceByIdEndpoint(s service.Service) endpoint.Endpoint

Types

type CreateDeviceRequest

type CreateDeviceRequest struct {
	DeviceID    string   `json:"id" validate:"required"`
	Alias       string   `json:"alias"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`
	IconName    string   `json:"icon_name"`
	IconColor   string   `json:"icon_color"`
	DmsId       string   `json:"dms_id" 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
	UpdateDeviceById            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 {
	TotalDevices int             `json:"total_devices"`
	Devices      []device.Device `json:"devices,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"`
}

type UpdateDevicesByIdRequest added in v0.0.10

type UpdateDevicesByIdRequest struct {
	DeviceID    string   `json:"id" validate:"required"`
	Alias       string   `json:"alias"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`
	IconName    string   `json:"icon_name"`
	IconColor   string   `json:"icon_color"`
	DmsId       string   `json:"dms_id" `
}

Jump to

Keyboard shortcuts

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