yggdrasil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package yggdrasil is a generated GoMock package.

Index

Constants

View Source
const (
	YggdrasilRegisterAuth                                = 1
	YggdrasilCompleteAuth                                = 0
	AuthzKey                         mtls.RequestAuthKey = "APIAuthzkey"
	YggrasilAPIRegistrationOperation                     = "PostDataMessageForDevice"
)

Variables

This section is empty.

Functions

func IsOwnDevice

func IsOwnDevice(ctx context.Context, deviceID string) bool

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewYggdrasilHandler

func NewYggdrasilHandler(initialNamespace string, metrics metrics.Metrics, mtlsConfig *mtls.TLSConfig, logger *zap.SugaredLogger,
	backend backendapi.EdgeDeviceBackend) *Handler

func (*Handler) GetAuthType

func (h *Handler) GetAuthType(r *http.Request, api *apioperations.FlottaManagementAPI) int

GetAuthType returns the kind of the authz that need to happen on the API call, the options are: YggdrasilCompleteAuth: need to be a valid client certificate and not expired. YggdrasilRegisterAuth: it is only valid for registering action.

func (*Handler) GetControlMessageForDevice

func (h *Handler) GetControlMessageForDevice(ctx context.Context, params yggdrasil.GetControlMessageForDeviceParams) middleware.Responder

func (*Handler) GetDataMessageForDevice

func (h *Handler) GetDataMessageForDevice(ctx context.Context, params yggdrasil.GetDataMessageForDeviceParams) middleware.Responder

func (*Handler) PostControlMessageForDevice

func (h *Handler) PostControlMessageForDevice(ctx context.Context, params yggdrasil.PostControlMessageForDeviceParams) middleware.Responder

func (*Handler) PostDataMessageForDevice

func (h *Handler) PostDataMessageForDevice(ctx context.Context, params yggdrasil.PostDataMessageForDeviceParams) middleware.Responder

type MockStatusUpdater

type MockStatusUpdater struct {
	// contains filtered or unexported fields
}

MockStatusUpdater is a mock of StatusUpdater interface.

func NewMockStatusUpdater

func NewMockStatusUpdater(ctrl *gomock.Controller) *MockStatusUpdater

NewMockStatusUpdater creates a new mock instance.

func (*MockStatusUpdater) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStatusUpdater) UpdateStatus

func (m *MockStatusUpdater) UpdateStatus(arg0 context.Context, arg1, arg2 string, arg3 *models.Heartbeat) (bool, error)

UpdateStatus mocks base method.

type MockStatusUpdaterMockRecorder

type MockStatusUpdaterMockRecorder struct {
	// contains filtered or unexported fields
}

MockStatusUpdaterMockRecorder is the mock recorder for MockStatusUpdater.

func (*MockStatusUpdaterMockRecorder) UpdateStatus

func (mr *MockStatusUpdaterMockRecorder) UpdateStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

type RetryingDelegatingHandler

type RetryingDelegatingHandler struct {
	// contains filtered or unexported fields
}

func NewRetryingDelegatingHandler

func NewRetryingDelegatingHandler(delegate StatusUpdater) *RetryingDelegatingHandler

func (*RetryingDelegatingHandler) Process

func (h *RetryingDelegatingHandler) Process(ctx context.Context, name, namespace string, heartbeat *models.Heartbeat) error

type StatusUpdater

type StatusUpdater interface {
	UpdateStatus(ctx context.Context, name, namespace string, heartbeat *models.Heartbeat) (bool, error)
}

Jump to

Keyboard shortcuts

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