identity

package
v0.0.0-...-0600186 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDENTITY_TYPE               = "application/vnd.com.nsn.cumulocity.identityApi+json"
	EXTERNAL_ID_COLLECTION_TYPE = "application/vnd.com.nsn.cumulocity.exteralIdCollection+json"
	EXTERNAL_ID_TYPE            = "application/vnd.com.nsn.cumulocity.externalId+json"
)

Variables

This section is empty.

Functions

func NewIdentityAPI

func NewIdentityAPI(client *generic.Client) identityAPI

Types

type ExternalID

type ExternalID struct {
	Self          string
	ExternalId    string
	Type          string
	ManagedObject inventory.ManagedObject
}

type ExternalIDCollection

type ExternalIDCollection struct {
	Self        string
	ExternalIds []ExternalID
	Prev        string
	Next        string
}

type Identity

type Identity struct {
	Self                 string `json:"self"`
	ExternalId           string `json:"externalId"`
	ExternalIdOfGlobalId string `json:"externalIdOfGlobalId"`
}

type IdentityAPI

type IdentityAPI interface {
	GetIdentity() (*Identity, *generic.Error)
	GetExternalID(externalIDType, externalID string) (*ExternalID, *generic.Error)
	CreateExternalID(ID NewExternalID, deviceID string) (ExternalID, *generic.Error)
	DeleteExternalID(externalIDType, externalID string) *generic.Error
}

type NewExternalID

type NewExternalID struct {
	ExternalId string `json:"externalId"`
	Type       string `json:"type"`
}

Jump to

Keyboard shortcuts

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