Documentation
¶
Overview ¶
Package identityapi provides an interface and types for interacting with the Identity REST API
Index ¶
- Variables
- type Client
- type ClientAdapter
- func (a *ClientAdapter) DeviceDelete(deviceID string) web.StandardResponse
- func (a *ClientAdapter) RegDeviceGet(orgID, deviceID string) web.EnrollResponse
- func (a *ClientAdapter) RegDeviceList(orgID string) web.DevicesResponse
- func (a *ClientAdapter) RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse
- func (a *ClientAdapter) RegOrganizationList() web.OrganizationsResponse
- func (a *ClientAdapter) RegisterDevice(body []byte) web.RegisterResponse
- func (a *ClientAdapter) RegisterOrganization(body []byte) web.RegisterResponse
- type MockIdentity
- func (m *MockIdentity) DeviceDelete(orgID string) web.StandardResponse
- func (m *MockIdentity) RegDeviceGet(orgID, deviceID string) web.EnrollResponse
- func (m *MockIdentity) RegDeviceList(orgID string) web.DevicesResponse
- func (m *MockIdentity) RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse
- func (m *MockIdentity) RegOrganizationList() web.OrganizationsResponse
- func (m *MockIdentity) RegisterDevice(body []byte) web.RegisterResponse
- func (m *MockIdentity) RegisterOrganization(body []byte) web.RegisterResponse
Constants ¶
This section is empty.
Variables ¶
var AddAuthorization = requests.DefaultAddAuthorization
AddAuthorization is a function to add an Authorization header to requests before making them for the IdentityAPI
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 // contains filtered or unexported fields }
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{}
nolint
func (*MockIdentity) DeviceDelete ¶
func (m *MockIdentity) DeviceDelete(orgID string) web.StandardResponse
nolint
func (*MockIdentity) RegDeviceGet ¶
func (m *MockIdentity) RegDeviceGet(orgID, deviceID string) web.EnrollResponse
nolint
func (*MockIdentity) RegDeviceList ¶
func (m *MockIdentity) RegDeviceList(orgID string) web.DevicesResponse
nolint
func (*MockIdentity) RegDeviceUpdate ¶
func (m *MockIdentity) RegDeviceUpdate(orgID, deviceID string, body []byte) web.StandardResponse
nolint
func (*MockIdentity) RegOrganizationList ¶
func (m *MockIdentity) RegOrganizationList() web.OrganizationsResponse
nolint
func (*MockIdentity) RegisterDevice ¶
func (m *MockIdentity) RegisterDevice(body []byte) web.RegisterResponse
nolint
func (*MockIdentity) RegisterOrganization ¶
func (m *MockIdentity) RegisterOrganization(body []byte) web.RegisterResponse
nolint