service

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParserm

func NewParserm(mtlsCa x509.Certificate) endpoint.Middleware

Types

type Middleware

type Middleware func(Service) Service

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
	PostDevice(ctx context.Context, alias string, deviceID string, dmsID string, description string, tags []string, iconName string, iconColor string) (devicesModel.Device, error)
	UpdateDeviceById(ctx context.Context, alias string, deviceID string, dmsID string, description string, tags []string, iconName string, iconColor string) (devicesModel.Device, error)
	GetDevices(ctx context.Context, queryParameters device.QueryParameters) ([]devicesModel.Device, int, error)
	GetDeviceById(ctx context.Context, deviceId string) (devicesModel.Device, error)
	GetDevicesByDMS(ctx context.Context, dmsId string, queryParameters device.QueryParameters) ([]devicesModel.Device, error)
	DeleteDevice(ctx context.Context, id string) error
	RevokeDeviceCert(ctx context.Context, id string, revocationReason string) error

	GetDeviceLogs(ctx context.Context, id string) ([]devicesModel.DeviceLog, error)
	GetDeviceCert(ctx context.Context, id string) (device.DeviceCert, error)
	GetDeviceCertHistory(ctx context.Context, id string) ([]devicesModel.DeviceCertHistory, error)
	GetDmsCertHistoryThirtyDays(ctx context.Context, queryParameters device.QueryParameters) ([]devicesModel.DMSCertHistory, error)
	GetDmsLastIssuedCert(ctx context.Context, queryParameters device.QueryParameters) ([]devicesModel.DMSLastIssued, error)
}

func NewDevicesService

func NewDevicesService(devicesDb devicesStore.DB, lamassuCa *lamassucaclient.LamassuCaClient, logger log.Logger) Service

Jump to

Keyboard shortcuts

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