service

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

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

func NewDevicesService

func NewDevicesService(devicesDb devicesStore.DB, statsDB devicesStore.StatsDB, 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