service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(Service) Service

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

type Service

type Service interface {
	Health(ctx context.Context) bool
	GetCloudConnectors(ctx context.Context) ([]cloudproviders.CloudConnector, error)
	GetCloudConnectorByID(ctx context.Context, cloudConnectorID string) (cloudproviders.CloudConnector, error)
	GetDeviceConfiguration(ctx context.Context, cloudConnectorID string, deviceID string) (interface{}, error)
	SynchronizeCA(ctx context.Context, cloudConnectorID string, caName string, enabledTs time.Time) (cloudproviders.CloudConnector, error)
	UpdateSecurityAccessPolicy(ctx context.Context, cloudConnectorID string, caName string, serializedSecurityAccessPolicy string) (cloudproviders.CloudConnector, error)

	HandleCreateCAEvent(ctx context.Context, caName string, caSerialNumber string, caCertificate string) error
	HandleUpdateCaStatusEvent(ctx context.Context, caName string, status string) error
	HandleUpdateCertStatusEvent(ctx context.Context, caName string, serialNumber string, status string) error
	UpdateCertStatus(ctx context.Context, deviceID string, certSerialNumber string, status string, connectorID string, caName string) error
	UpdateCaStatus(ctx context.Context, caName string, status string) error
}

func NewCloudPorxyService

func NewCloudPorxyService(consulClient *consul.Client, cloudProxyDatabase store.DB, lamassuCAClient lamassucaclient.LamassuCaClient, logger log.Logger) Service

Jump to

Keyboard shortcuts

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