Documentation ¶
Overview ¶
Package yggdrasil is a generated GoMock package.
Index ¶
- Constants
- func IsOwnDevice(ctx context.Context, deviceID string) bool
- type Handler
- func (h *Handler) GetAuthType(r *http.Request, api *apioperations.FlottaManagementAPI) int
- func (h *Handler) GetControlMessageForDevice(ctx context.Context, params yggdrasil.GetControlMessageForDeviceParams) middleware.Responder
- func (h *Handler) GetDataMessageForDevice(ctx context.Context, params yggdrasil.GetDataMessageForDeviceParams) middleware.Responder
- func (h *Handler) PostControlMessageForDevice(ctx context.Context, params yggdrasil.PostControlMessageForDeviceParams) middleware.Responder
- func (h *Handler) PostDataMessageForDevice(ctx context.Context, params yggdrasil.PostDataMessageForDeviceParams) middleware.Responder
- type MockStatusUpdater
- type MockStatusUpdaterMockRecorder
- type RetryingDelegatingHandler
- type StatusUpdater
Constants ¶
View Source
const ( YggdrasilRegisterAuth = 1 YggdrasilCompleteAuth = 0 AuthzKey mtls.RequestAuthKey = "APIAuthzkey" YggrasilAPIRegistrationOperation = "PostDataMessageForDevice" )
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (m *MockStatusUpdater) EXPECT() *MockStatusUpdaterMockRecorder
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
Click to show internal directories.
Click to hide internal directories.