identityapi

package
v0.0.0-...-a11ed81 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package identityapi provides an interface and types for interacting with the Identity REST API

Index

Constants

This section is empty.

Variables

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

Jump to

Keyboard shortcuts

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