identityapi

package
Version: v0.0.0-...-1a7bac6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RegDeviceList(orgID string) web.DevicesResponse
	RegisterDevice(body []byte) web.RegisterResponse
	RegDeviceGet(orgID, deviceID string) web.EnrollResponse
	RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse
	RegisterOrganization(body []byte) web.RegisterResponse
	RegOrganizationList() web.OrganizationsResponse
	DeviceDelete(orgID string) web.StandardResponse
}

Client is a client for the identity API

type ClientAdapter

type ClientAdapter struct {
	URL string
}

ClientAdapter adapts our expectations to device twin API

func NewClientAdapter

func NewClientAdapter(u string) (*ClientAdapter, error)

NewClientAdapter creates an adapter to access the device twin service

func (*ClientAdapter) DeviceDelete

func (a *ClientAdapter) DeviceDelete(deviceID string) web.StandardResponse

DeviceDelete deletes device registration

func (*ClientAdapter) RegDeviceGet

func (a *ClientAdapter) RegDeviceGet(orgID, deviceID string) web.EnrollResponse

RegDeviceGet fetches a device registration

func (*ClientAdapter) RegDeviceList

func (a *ClientAdapter) RegDeviceList(orgID string) web.DevicesResponse

RegDeviceList lists the devices for an account

func (*ClientAdapter) RegDeviceUpdate

func (a *ClientAdapter) RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse

RegDeviceUpdate updates a device registration

func (*ClientAdapter) RegOrganizationList

func (a *ClientAdapter) RegOrganizationList() web.OrganizationsResponse

RegOrganizationList lists the organizations for an account

func (*ClientAdapter) RegisterDevice

func (a *ClientAdapter) RegisterDevice(body []byte) web.RegisterResponse

RegisterDevice registers a new device

func (*ClientAdapter) RegisterOrganization

func (a *ClientAdapter) RegisterOrganization(body []byte) web.RegisterResponse

RegisterOrganization registers a new organization

type MockIdentity

type MockIdentity struct{}

MockIdentity mocks the identity API client

func (*MockIdentity) RegDeviceGet

func (m *MockIdentity) RegDeviceGet(orgID, deviceID string) web.EnrollResponse

RegDeviceGet mocks fetching a registered device

func (*MockIdentity) RegDeviceList

func (m *MockIdentity) RegDeviceList(orgID string) web.DevicesResponse

RegDeviceList mocks listing registered devices

func (*MockIdentity) RegDeviceUpdate

func (m *MockIdentity) RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse

RegDeviceUpdate mocks updating a registered device

func (*MockIdentity) RegOrganizationList

func (m *MockIdentity) RegOrganizationList() web.OrganizationsResponse

RegOrganizationList mocks listing registered organizations

func (*MockIdentity) RegisterDevice

func (m *MockIdentity) RegisterDevice(body []byte) web.RegisterResponse

RegisterDevice mocks registering a device

func (*MockIdentity) RegisterOrganization

func (m *MockIdentity) RegisterOrganization(body []byte) web.RegisterResponse

RegisterOrganization mocks registering an organization

Jump to

Keyboard shortcuts

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