mdm

package
v0.85.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package mdm provides support the HSDP Connect IoT services

Index

Constants

View Source
const (
	APIVersion = "1"
)

Variables

View Source
var (
	ErrNotFound                       = errors.New("entity not found")
	ErrBaseURLCannotBeEmpty           = errors.New("base URL cannot be empty")
	ErrEmptyResult                    = errors.New("empty result")
	ErrOperationFailed                = errors.New("operation failed")
	ErrCouldNoReadResourceAfterCreate = errors.New("could not read resource after create")
)

Functions

This section is empty.

Types

type Application

type Application struct {
	ResourceType      string      `json:"resourceType" validate:"required"`
	ID                string      `json:"id,omitempty"`
	Name              string      `json:"name" validate:"required"`
	Description       string      `json:"description"`
	PropositionID     Reference   `json:"propositionId"`
	GlobalReferenceID string      `json:"globalReferenceId"`
	ApplicationGuid   *Identifier `json:"applicationGuid,omitempty"`
	DefaultGroupGuid  *Identifier `json:"defaultGroupGuid,omitempty"`
	Meta              *Meta       `json:"meta,omitempty"`
}

Application represents an MDM Application entity

type ApplicationsService

type ApplicationsService struct {
	*Client
	// contains filtered or unexported fields
}

ApplicationsService implements actions on IAM Application entities

func (*ApplicationsService) CreateApplication

func (a *ApplicationsService) CreateApplication(app Application) (*Application, *Response, error)

CreateApplication creates a Application

func (*ApplicationsService) GetApplicationByID

func (a *ApplicationsService) GetApplicationByID(id string) (*Application, *Response, error)

GetApplicationByID retrieves an Application by its ID

func (*ApplicationsService) GetApplicationByName

func (a *ApplicationsService) GetApplicationByName(name string) (*Application, *Response, error)

GetApplicationByName retrieves an Application by its Name

func (*ApplicationsService) GetApplications

func (a *ApplicationsService) GetApplications(opt *GetApplicationsOptions, options ...OptionFunc) (*[]Application, *Response, error)

GetApplications search for an Applications entity based on the GetApplicationsOptions values

func (*ApplicationsService) UpdateApplication

func (a *ApplicationsService) UpdateApplication(app Application) (*Application, *Response, error)

UpdateApplication creates a Application

type AuthenticationMethod

type AuthenticationMethod struct {
	ResourceType     string      `json:"resourceType" validate:"required"`
	ID               string      `json:"id,omitempty"`
	Name             string      `json:"name" validate:"required,min=1,max=20"`
	Description      string      `json:"description"`
	LoginName        string      `json:"loginName" validate:"required,min=1,max=78"`
	Password         string      `json:"password" validate:"required,min=1,max=50"`
	ClientID         string      `json:"clientId" validate:"required,min=1,max=78"`
	ClientSecret     string      `json:"clientSecret" validate:"required,min=1,max=78"`
	AuthURL          string      `json:"authUrl,omitempty"`
	AuthMethod       string      `json:"authMethod,omitempty"`
	APIVersion       string      `json:"apiVersion,omitempty"`
	OrganizationGuid *Identifier `json:"organizationGuid,omitempty"`
	Meta             *Meta       `json:"meta,omitempty"`
}

type AuthenticationMethodsService

type AuthenticationMethodsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*AuthenticationMethodsService) Create

Create creates a AuthenticationMethod

func (*AuthenticationMethodsService) Delete

Delete deletes the given ServiceAction

func (*AuthenticationMethodsService) Find

Find looks up services based on GetServiceActionOptions

func (*AuthenticationMethodsService) GetByID

GetByID finds a client by its ID

func (*AuthenticationMethodsService) Update

Update updates a standard service

type BlobDataContract

type BlobDataContract struct {
	ResourceType                  string    `json:"resourceType" validate:"required"`
	ID                            string    `json:"id,omitempty"`
	Name                          string    `json:"name" validate:"required,min=1,max=20"`
	DataTypeID                    Reference `json:"dataTypeId" validate:"required"`
	BucketID                      Reference `json:"bucketId" validate:"required"`
	StorageClassID                Reference `json:"storageClassId" validate:"required"`
	RootPathInBucket              string    `json:"rootPathInBucket" validate:"required,max=256"`
	LoggingEnabled                bool      `json:"loggingEnabled"`
	CrossRegionReplicationEnabled bool      `json:"crossRegionReplicationEnabled"`
	Meta                          *Meta     `json:"meta,omitempty"`
}

type BlobDataContractsService

type BlobDataContractsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*BlobDataContractsService) Create

Create creates a BlobDataContract

func (*BlobDataContractsService) Delete

Delete deletes the given ServiceAction

func (*BlobDataContractsService) Find

Find looks up services based on GetServiceActionOptions

func (*BlobDataContractsService) GetByID

GetByID finds a client by its ID

func (*BlobDataContractsService) Update

Update updates a standard service

type BlobSubscription

type BlobSubscription struct {
	ResourceType          string     `json:"resourceType" validate:"required"`
	ID                    string     `json:"id,omitempty"`
	Name                  string     `json:"name" validate:"required,max=64"`
	Description           string     `json:"description" validate:"omitempty,max=250"`
	DataTypeId            Reference  `json:"dataTypeId" validate:"required"`
	NotificationTopicGuid Identifier `json:"notificationTopicGuid" validate:"required,dive"`
	Meta                  *Meta      `json:"meta,omitempty"`
}

type BlobSubscriptionsService

type BlobSubscriptionsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*BlobSubscriptionsService) Create

Create creates a BlobSubscription

func (*BlobSubscriptionsService) Delete

Delete deletes the given ServiceAction

func (*BlobSubscriptionsService) Find

Find looks up services based on GetServiceActionOptions

func (*BlobSubscriptionsService) GetByID

GetByID finds a client by its ID

func (*BlobSubscriptionsService) Update

Update updates a standard service

type Bucket

type Bucket struct {
	ResourceType                  string              `json:"resourceType" validate:"required"`
	ID                            string              `json:"id,omitempty"`
	Name                          string              `json:"name" validate:"required"`
	Description                   string              `json:"description"`
	PropositionID                 Reference           `json:"propositionId" validate:"required"`
	DefaultRegionID               Reference           `json:"defaultRegionId" validate:"required"`
	ReplicationRegionID           *Reference          `json:"replicationRegionId,omitempty" validate:"omitempty,dive"`
	VersioningEnabled             bool                `json:"versioningEnabled"`
	LoggingEnabled                bool                `json:"loggingEnabled"`
	CrossRegionReplicationEnabled bool                `json:"crossRegionReplicationEnabled"`
	AuditingEnabled               bool                `json:"auditingEnabled"`
	EnableCDN                     bool                `json:"enableCDN"`
	CacheControlAge               int                 `json:"cacheControlAge,omitempty" validate:"omitempty,min=300,max=1800"`
	CorsConfiguration             []CORSConfiguration `json:"corsConfiguration,omitempty" validate:"omitempty,dive"`
	Meta                          *Meta               `json:"meta,omitempty"`
}

type BucketsService

type BucketsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*BucketsService) Create

func (c *BucketsService) Create(ac Bucket) (*Bucket, *Response, error)

Create creates a Bucket

func (*BucketsService) Delete

func (c *BucketsService) Delete(ac Bucket) (bool, *Response, error)

Delete deletes the given ServiceAction

func (*BucketsService) Find

func (c *BucketsService) Find(opt *GetBucketOptions, options ...OptionFunc) (*[]Bucket, *Response, error)

Find looks up services based on GetBucketOptions

func (*BucketsService) GetByID

func (c *BucketsService) GetByID(id string) (*Bucket, *Response, error)

GetByID finds a client by its ID

func (*BucketsService) Update

func (c *BucketsService) Update(ac Bucket) (*Bucket, *Response, error)

Update updates a standard service

type CORSConfiguration

type CORSConfiguration struct {
	AllowedOrigins []string `json:"allowedOrigins" validate:"required"`
	AllowedMethods []string `json:"allowedMethods" validate:"required,dive,oneof=GET POST PUT DELETE HEAD"`
	AllowedHeaders []string `json:"allowedHeaders,omitempty"`
	MaxAgeSeconds  int      `json:"maxAgeSeconds"`
	ExposeHeaders  []string `json:"exposeHeaders,omitempty"`
}

type Client

type Client struct {
	// HTTP Client used to communicate with IAM API
	*iam.Client

	// User agent used when communicating with the HSDP Notification API
	UserAgent string

	Propositions                 *PropositionsService
	Applications                 *ApplicationsService
	Regions                      *RegionsService
	StorageClasses               *StorageClassService
	OAuthClientScopes            *OAuthClientScopesService
	OAuthClients                 *OAuthClientsService
	StandardServices             *StandardServicesService
	ServiceActions               *ServiceActionsService
	DeviceGroups                 *DeviceGroupsService
	DeviceTypes                  *DeviceTypesService
	AuthenticationMethods        *AuthenticationMethodsService
	ServiceReferences            *ServiceReferencesService
	Buckets                      *BucketsService
	DataTypes                    *DataTypesService
	BlobDataContracts            *BlobDataContractsService
	DataBrokerSubscriptions      *DataBrokerSubscriptionsService
	BlobSubscriptions            *BlobSubscriptionsService
	FirmwareComponents           *FirmwareComponentsService
	FirmwareComponentVersions    *FirmwareComponentVersionsService
	ResourcesLimits              *ResourceLimitsService
	SubscriberTypes              *SubscriberTypesService
	DataAdapters                 *DataAdaptersService
	DataSubscribers              *DataSubscribersService
	FirmwareDistributionRequests *FirmwareDistributionRequestsService
	ServiceAgents                *ServiceAgentsService
	// contains filtered or unexported fields
}

A Client manages communication with HSDP AI APIs

func NewClient

func NewClient(iamClient *iam.Client, config *Config) (*Client, error)

NewClient returns a new Discovery client

func (*Client) Close

func (c *Client) Close()

Close releases allocated resources of clients

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)

Do executes a http request. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.

func (*Client) GetBaseURL

func (c *Client) GetBaseURL() string

GetBaseURL returns the base URL as configured

func (*Client) GetEndpointURL

func (c *Client) GetEndpointURL() string

GetEndpointURL returns the Discovery Endpoint URL as configured

func (*Client) NewRequest

func (c *Client) NewRequest(method, requestPath string, opt interface{}, options ...OptionFunc) (*http.Request, error)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(urlStr string) error

SetBaseURL sets the base URL for API requests

type Config

type Config struct {
	Region      string
	Environment string
	BaseURL     string
	DebugLog    io.Writer
	Retry       int
}

Config contains the configuration of a Client

type DataAdapter

type DataAdapter struct {
	ResourceType   string    `json:"resourceType"`
	ID             string    `json:"id"`
	Name           string    `json:"name"`
	Description    string    `json:"description"`
	ServiceAgentId Reference `json:"serviceAgentId"`
	Meta           *Meta     `json:"meta"`
}

type DataAdaptersService

type DataAdaptersService struct {
	*Client
}

func (*DataAdaptersService) Get

func (*DataAdaptersService) GetByID

func (r *DataAdaptersService) GetByID(id string) (*DataAdapter, *Response, error)

type DataBrokerSubscription

type DataBrokerSubscription struct {
	ResourceType           string          `json:"resourceType" validate:"required"`
	ID                     string          `json:"id,omitempty"`
	Name                   string          `json:"name" validate:"required,max=20"`
	Description            string          `json:"description" validate:"omitempty,max=250"`
	ServiceAgentId         string          `json:"serviceAgentId" validate:"required"`
	DataSubscriberId       Reference       `json:"dataSubscriberId" validate:"required"`
	DataAdapterId          Reference       `json:"dataAdapterId" validate:"required"`
	AuthenticationMethodId Reference       `json:"authenticationMethodId" validate:"required"`
	DataTypeID             Reference       `json:"dataTypeId" validate:"required"`
	Configuration          json.RawMessage `json:"configuration,omitempty"`
	Meta                   *Meta           `json:"meta,omitempty"`
}

type DataBrokerSubscriptionsService

type DataBrokerSubscriptionsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*DataBrokerSubscriptionsService) Create

Create creates a DataBrokerSubscription

func (*DataBrokerSubscriptionsService) Delete

Delete deletes the given ServiceAction

func (*DataBrokerSubscriptionsService) Find

Find looks up services based on GetServiceActionOptions

func (*DataBrokerSubscriptionsService) GetByID

GetByID finds a client by its ID

func (*DataBrokerSubscriptionsService) Update

Update updates a standard service

type DataSubscriber

type DataSubscriber struct {
	ResourceType     string          `json:"resourceType"`
	ID               string          `json:"id"`
	Name             string          `json:"name"`
	SubscriberGuid   Identifier      `json:"subscriberGuid"`
	SubscriberTypeId Reference       `json:"subscriberTypeId"`
	Configuration    json.RawMessage `json:"configuration"`
	Meta             *Meta           `json:"meta"`
}

type DataSubscribersService

type DataSubscribersService struct {
	*Client
}

func (*DataSubscribersService) Get

func (*DataSubscribersService) GetByID

type DataType

type DataType struct {
	ResourceType  string    `json:"resourceType" validate:"required"`
	ID            string    `json:"id,omitempty"`
	Name          string    `json:"name" validate:"required"`
	Description   string    `json:"description"`
	Tags          []string  `json:"tags,omitempty" validate:"omitempty"`
	PropositionId Reference `json:"propositionId" validate:"required"`
	Meta          *Meta     `json:"meta,omitempty"`
}

type DataTypesService

type DataTypesService struct {
	*Client
	// contains filtered or unexported fields
}

func (*DataTypesService) Create

func (c *DataTypesService) Create(ac DataType) (*DataType, *Response, error)

Create creates a DataType

func (*DataTypesService) Delete

func (c *DataTypesService) Delete(ac DataType) (bool, *Response, error)

Delete deletes the given ServiceAction

func (*DataTypesService) Find

func (c *DataTypesService) Find(opt *GetDataTypeOptions, options ...OptionFunc) (*[]DataType, *Response, error)

Find looks up services based on GetServiceActionOptions

func (*DataTypesService) GetByID

func (c *DataTypesService) GetByID(id string) (*DataType, *Response, error)

GetByID finds a client by its ID

func (*DataTypesService) Update

func (c *DataTypesService) Update(ac DataType) (*DataType, *Response, error)

Update updates a standard service

type DeviceGroup

type DeviceGroup struct {
	ResourceType     string      `json:"resourceType" validate:"required"`
	ID               string      `json:"id,omitempty"`
	Name             string      `json:"name" validate:"required"`
	Description      string      `json:"description"`
	ApplicationId    Reference   `json:"applicationId"`
	DefaultGroupGuid *Identifier `json:"defaultGroupGuid,omitempty"`
}

type DeviceGroupsService

type DeviceGroupsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*DeviceGroupsService) Create

Create creates a DeviceGroup

func (*DeviceGroupsService) Delete

func (c *DeviceGroupsService) Delete(ac DeviceGroup) (bool, *Response, error)

Delete deletes the given ServiceAction

func (*DeviceGroupsService) Find

Find looks up services based on GetServiceActionOptions

func (*DeviceGroupsService) GetByID

func (c *DeviceGroupsService) GetByID(id string) (*DeviceGroup, *Response, error)

GetByID finds a client by its ID

func (*DeviceGroupsService) Update

Update updates a standard service

type DeviceType

type DeviceType struct {
	ResourceType         string          `json:"resourceType" validate:"required"`
	ID                   string          `json:"id,omitempty"`
	Name                 string          `json:"name" validate:"required"`
	Description          string          `json:"description"`
	CTN                  string          `json:"ctn" validate:"required"` // Commercial Type Number
	DeviceGroupId        Reference       `json:"deviceGroupId"`
	DefaultGroupGuid     *Identifier     `json:"defaultGroupGuid,omitempty"`
	CustomTypeAttributes json.RawMessage `json:"customTypeAttributes,omitempty"`
	Meta                 *Meta           `json:"meta,omitempty"`
}

type DeviceTypesService

type DeviceTypesService struct {
	*Client
	// contains filtered or unexported fields
}

func (*DeviceTypesService) Create

Create creates a DeviceType

func (*DeviceTypesService) Delete

func (c *DeviceTypesService) Delete(ac DeviceType) (bool, *Response, error)

Delete deletes the given DeviceType

func (*DeviceTypesService) Find

func (c *DeviceTypesService) Find(opt *GetDeviceTypeOptions, options ...OptionFunc) (*[]DeviceType, *Response, error)

Find looks up services based on GetDeviceTypeOptions

func (*DeviceTypesService) GetByID

func (c *DeviceTypesService) GetByID(id string) (*DeviceType, *Response, error)

GetByID finds a client by its ID

func (*DeviceTypesService) Update

Update updates a standard service

type EncryptionInfo

type EncryptionInfo struct {
	Encrypted     bool   `json:"encrypted"`
	Algorithm     string `json:"alg,omitempty"`
	DecryptionKey string `json:"decryptionKey,omitempty"`
}

type Fingerprint

type Fingerprint struct {
	Algorithm string `json:"alg" validate:"required"`
	Hash      string `json:"hash" validate:"required"`
}

type FirmwareComponent

type FirmwareComponent struct {
	ResourceType  string    `json:"resourceType" validate:"required"`
	ID            string    `json:"id,omitempty"`
	Name          string    `json:"name" validate:"required,max=255"`
	Description   string    `json:"description" validate:"omitempty,max=250"`
	MainComponent bool      `json:"mainComponent"`
	DeviceTypeId  Reference `json:"deviceTypeId" validate:"required,dive"`
	Meta          *Meta     `json:"meta,omitempty"`
}

type FirmwareComponentVersion

type FirmwareComponentVersion struct {
	ResourceType               string          `json:"resourceType" validate:"required"`
	ID                         string          `json:"id,omitempty"`
	Version                    string          `json:"version" validate:"required,min=1,max=20"`
	Description                string          `json:"description" validate:"omitempty,max=250"`
	Size                       int             `json:"size"`
	BlobURL                    string          `json:"blobUrl" validate:"omitempty,max=1024"`
	ComponentRequired          bool            `json:"componentRequired"`
	FingerPrint                *Fingerprint    `json:"fingerPrint,omitempty" validate:"omitempty,dive"`
	EncryptionInfo             *EncryptionInfo `json:"encryptionInfo,omitempty" validate:"omitempty,dive"`
	FirmwareComponentId        Reference       `json:"firmwareComponentId" validate:"required"`
	PreviousComponentVersionId *Reference      `json:"previousComponentVersionId,omitempty" validate:"omitempty,dive"`
	EffectiveDate              string          `json:"effectiveDate" validate:"required"`
	DeprecatedDate             string          `json:"deprecatedDate,omitempty"`
	CustomResource             json.RawMessage `json:"customResource,omitempty" validate:"omitempty,max=2048"`
	Meta                       *Meta           `json:"meta,omitempty"`
}

type FirmwareComponentVersionsService

type FirmwareComponentVersionsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*FirmwareComponentVersionsService) Create

Create creates a FirmwareComponentVersion

func (*FirmwareComponentVersionsService) Delete

Delete deletes the given FirmwareComponentVersion

func (*FirmwareComponentVersionsService) Find

Find looks up services based on GetFirmwareComponentVersionOptions

func (*FirmwareComponentVersionsService) GetByID

GetByID finds a client by its ID

func (*FirmwareComponentVersionsService) Update

Update updates a standard service

type FirmwareComponentsService

type FirmwareComponentsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*FirmwareComponentsService) Create

Create creates a FirmwareComponent

func (*FirmwareComponentsService) Delete

Delete deletes the given FirmwareComponent

func (*FirmwareComponentsService) Find

Find looks up services based on GetFirmwareComponentOptions

func (*FirmwareComponentsService) GetByID

GetByID finds a client by its ID

func (*FirmwareComponentsService) Update

Update updates a standard service

type FirmwareDistributionRequest added in v0.50.2

type FirmwareDistributionRequest struct {
	ResourceType              string      `json:"resourceType" validate:"required"`
	ID                        string      `json:"id,omitempty"`
	Status                    string      `json:"status" validate:"required"`
	UserConsentRequired       bool        `json:"userConsentRequired"`
	DistributionTargets       []Reference `json:"distributionTarget" validate:"required,min=1,max=10"`
	FirmwareVersion           string      `json:"firmwareVersion" validate:"required"`
	OrchestrationMode         string      `json:"orchestrationMode" validate:"required,oneof=none continuous snapshot"`
	FirmwareComponentVersions []Reference `json:"firmwareComponentVersions" validate:"required,min=1,max=5"`
	Description               string      `json:"description" validate:"omitempty,max=250"`
}

type FirmwareDistributionRequestsService added in v0.50.2

type FirmwareDistributionRequestsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*FirmwareDistributionRequestsService) Create added in v0.50.2

Create creates a FirmwareDistributionRequest

func (*FirmwareDistributionRequestsService) Delete added in v0.50.2

Delete deletes the given FirmwareDistributionRequest

func (*FirmwareDistributionRequestsService) Find added in v0.50.2

Find looks up services based on GetFirmwareDistributionRequestOptions

func (*FirmwareDistributionRequestsService) GetByID added in v0.50.2

GetByID finds a client by its ID

func (*FirmwareDistributionRequestsService) Update added in v0.50.2

Update updates a standard service

type GetApplicationsOptions

type GetApplicationsOptions struct {
	ID                *string `url:"_id,omitempty"`
	PropositionID     *string `url:"propositionId,omitempty"`
	GlobalReferenceID *string `url:"globalReferenceGuid,omitempty"`
	Name              *string `url:"name,omitempty"`
	DefaultGroupID    *string `url:"defaultGroupGuid,omitempty"`
}

GetApplicationsOptions specifies what search criteria can be used to look for entities

type GetAuthenticationMethodOptions

type GetAuthenticationMethodOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetAuthenticationMethodOptions struct describes search criteria for looking up authentication methods

type GetBlobDataContractOptions

type GetBlobDataContractOptions struct {
	ID   *string `url:"_id,omitempty"`
	Name *string `url:"name,omitempty"`
}

GetBlobDataContractOptions struct describes search criteria for looking up BlobDataContract

type GetBlobSubscriptionOptions

type GetBlobSubscriptionOptions struct {
	ID   *string `url:"_id,omitempty"`
	Name *string `url:"name,omitempty"`
}

GetBlobSubscriptionOptions struct describes search criteria for looking up BlobSubscription

type GetBucketOptions

type GetBucketOptions struct {
	ID                  *string `url:"_id,omitempty"`
	Name                *string `url:"name,omitempty"`
	PropositionID       *string `url:"propositionId,omitempty"`
	ReplicationRegionID *string `url:"replicationRegionId,omitempty"`
	DefaultRegionID     *string `url:"defaultRegionId,omitempty"`
	LastUpdated         *string `url:"_lastUpdated,omitempty"`
	ReverseInclude      *string `url:"_revinclude,omitempty"`
	Include             *string `url:"_include,omitempty"`
}

GetBucketOptions struct describes search criteria for looking up Bucket

type GetDataAdapterOptions

type GetDataAdapterOptions struct {
	LastUpdate          *string `url:"_lastUpdated,omitempty"`
	ReverseInclude      *string `url:"_revinclude,omitempty"`
	Include             *string `url:"_include,omitempty"`
	ID                  *string `url:"_id,omitempty"`
	Name                *string `url:"name,omitempty"`
	SubscriberTypeID    *string `url:"subscriberTypeId,omitempty"`
	SubscriberTypeFGUID *string `url:"subscriberGuid,omitempty"`
}

type GetDataBrokerSubscriptionOptions

type GetDataBrokerSubscriptionOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	PropositionID *string `url:"propositionId,omitempty"`
}

GetDataBrokerSubscriptionOptions struct describes search criteria for looking up DataBrokerSubscription

type GetDataSubscriberOptions

type GetDataSubscriberOptions struct {
	LastUpdate          *string `url:"_lastUpdated,omitempty"`
	ReverseInclude      *string `url:"_revinclude,omitempty"`
	Include             *string `url:"_include,omitempty"`
	ID                  *string `url:"_id,omitempty"`
	Name                *string `url:"name,omitempty"`
	SubscriberTypeID    *string `url:"subscriberTypeId,omitempty"`
	SubscriberTypeFGUID *string `url:"subscriberGuid,omitempty"`
}

type GetDataTypeOptions

type GetDataTypeOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	PropositionID *string `url:"propositionId,omitempty"`
}

GetDataTypeOptions struct describes search criteria for looking up DataType

type GetDeviceGroupOptions

type GetDeviceGroupOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetDeviceGroupOptions struct describes search criteria for looking up device group

type GetDeviceTypeOptions

type GetDeviceTypeOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetDeviceTypeOptions struct describes search criteria for looking up device types

type GetFirmwareComponentOptions

type GetFirmwareComponentOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetFirmwareComponentOptions struct describes search criteria for looking up a FirmwareComponent

type GetFirmwareComponentVersionOptions

type GetFirmwareComponentVersionOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetFirmwareComponentVersionOptions struct describes search criteria for looking up FirmwareComponentVersion

type GetFirmwareDistributionRequestOptions added in v0.50.2

type GetFirmwareDistributionRequestOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetFirmwareDistributionRequestOptions struct describes search criteria for looking up FirmwareDistributionRequest

type GetOAuthClientScopeOptions

type GetOAuthClientScopeOptions struct {
	ID           *string `url:"_id,omitempty"`
	LastUpdate   *string `url:"_lastUpdated,omitempty"`
	Organization *string `url:"organization,omitempty"`
	Proposition  *string `url:"proposition,omitempty"`
	Action       *string `url:"service,omitempty"`
	Service      *string `url:"action,omitempty"`
}

type GetOAuthClientsOptions

type GetOAuthClientsOptions struct {
	ID                *string `url:"_id,omitempty"`
	Name              *string `url:"name,omitempty"`
	GlobalReferenceID *string `url:"globalReferenceId,omitempty"`
	ApplicationID     *string `url:"applicationId,omitempty"`
}

GetOAuthClientsOptions describes search criteria for looking up roles

type GetPropositionsOptions

type GetPropositionsOptions struct {
	ID                     *string `url:"_id,omitempty"`
	Count                  *int    `url:"_count,omitempty"`
	Page                   *int    `url:"_page,omitempty"`
	OrganizationID         *string `url:"organizationGuid,omitempty"`
	PropositionID          *string `url:"propositionGuid,omitempty"`
	GlobalReferenceID      *string `url:"globalReferenceGuid,omitempty"`
	Name                   *string `url:"name,omitempty"`
	AuthenticationMethodID *string `url:"authenticationMethodId,omitempty"`
}

GetPropositionsOptions specifies what search criteria can be used to look for entities

type GetRegionOptions

type GetRegionOptions struct {
	LastUpdate     *string `url:"_lastUpdated,omitempty"`
	ReverseInclude *string `url:"_revinclude,omitempty"`
	Include        *string `url:"_include,omitempty"`
	ID             *string `url:"_id,omitempty"`
	Name           *string `url:"name,omitempty"`
	Category       *string `url:"category,omitempty"`
	HSDPEnabled    *bool   `url:"hsdpEnabled,omitempty"`
}

type GetServiceActionOptions

type GetServiceActionOptions struct {
	ID                    *string `url:"_id,omitempty"`
	Name                  *string `url:"name,omitempty"`
	StandardServiceID     *string `url:"standardServiceId,omitempty"`
	OrganizationGuidValue *string `url:"organizationGuid:value,omitempty"`
}

GetServiceActionOptions struct describes search criteria for looking up service actions

type GetServiceAgentOptions added in v0.61.7

type GetServiceAgentOptions struct {
	LastUpdate       *string `url:"_lastUpdated,omitempty"`
	ReverseInclude   *string `url:"_revinclude,omitempty"`
	Include          *string `url:"_include,omitempty"`
	ID               *string `url:"_id,omitempty"`
	Name             *string `url:"name,omitempty"`
	DataSubscriberID *string `url:"dataSubscriberId,omitempty"`
}

type GetServiceReferenceOptions

type GetServiceReferenceOptions struct {
	ID            *string `url:"_id,omitempty"`
	Name          *string `url:"name,omitempty"`
	ApplicationID *string `url:"applicationId,omitempty"`
}

GetServiceReferenceOptions struct describes search criteria for looking up service references

type GetStandardServiceOptions

type GetStandardServiceOptions struct {
	ID                *string `url:"_id,omitempty"`
	Name              *string `url:"name,omitempty"`
	GlobalReferenceID *string `url:"globalReferenceId,omitempty"`
	ApplicationID     *string `url:"applicationId,omitempty"`
}

GetStandardServiceOptions struct { describes search criteria for looking up standard services

type GetStorageClassOptions

type GetStorageClassOptions struct {
	LastUpdate     *string `url:"_lastUpdated,omitempty"`
	ReverseInclude *string `url:"_revinclude,omitempty"`
	Include        *string `url:"_include,omitempty"`
	ID             *string `url:"_id,omitempty"`
	Name           *string `url:"name,omitempty"`
}

type GetSubscriberTypeOptions

type GetSubscriberTypeOptions struct {
	LastUpdate     *string `url:"_lastUpdated,omitempty"`
	ReverseInclude *string `url:"_revinclude,omitempty"`
	Include        *string `url:"_include,omitempty"`
	ID             *string `url:"_id,omitempty"`
	Name           *string `url:"name,omitempty"`
}

type Identifier

type Identifier struct {
	System string `json:"system,omitempty"`
	Value  string `json:"value" validate:"required"`
}

type Meta

type Meta struct {
	LastUpdated time.Time `json:"lastUpdated,omitempty"`
	VersionID   string    `json:"versionId,omitempty"`
}

type OAuthClient

type OAuthClient struct {
	ResourceType           string      `json:"resourceType" validate:"required"`
	ID                     string      `json:"id,omitempty"`
	Name                   string      `json:"name" validate:"required"`
	Description            string      `json:"description"`
	ApplicationId          Reference   `json:"applicationId" validate:"required"`
	GlobalReferenceID      string      `json:"globalReferenceId" validate:"required"`
	RedirectionURIs        []string    `json:"redirectionURIs"`
	ResponseTypes          []string    `json:"responseTypes"`
	UserClient             bool        `json:"userClient"`
	BootstrapClientGuid    *Identifier `json:"bootstrapClientGuid,omitempty"`
	BootstrapClientID      string      `json:"bootstrapClientId,omitempty"`
	BootstrapClientSecret  string      `json:"bootstrapClientSecret,omitempty"`
	BootstrapClientRevoked bool        `json:"bootstrapClientRevoked,omitempty"`
	ClientGuid             *Identifier `json:"clientGuid,omitempty"`
	ClientID               string      `json:"clientId,omitempty"`
	ClientSecret           string      `json:"clientSecret,omitempty"`
	ClientRevoked          bool        `json:"clientRevoked"`
	Meta                   *Meta       `json:"meta,omitempty"`
}

type OAuthClientScope

type OAuthClientScope struct {
	ResourceType     string `json:"resourceType" validate:"required"`
	ID               string `json:"id"`
	Organization     string `json:"organization"`
	Proposition      string `json:"proposition"`
	Service          string `json:"service"`
	Resource         string `json:"resource"`
	Action           string `json:"action"`
	BootstrapEnabled bool   `json:"bootstrapEnabled"`
	Meta             *Meta  `json:"meta"`
}

func (*OAuthClientScope) Scope

func (r *OAuthClientScope) Scope() string

type OAuthClientScopesService

type OAuthClientScopesService struct {
	*Client
}

func (*OAuthClientScopesService) GetOAuthClientScopeByID

func (r *OAuthClientScopesService) GetOAuthClientScopeByID(id string) (*OAuthClientScope, *Response, error)

func (*OAuthClientScopesService) GetOAuthClientScopes

type OAuthClientsService

type OAuthClientsService struct {
	*Client
	// contains filtered or unexported fields
}

OAuthClientsService provides operations on IAM roles resources

func (*OAuthClientsService) CreateOAuthClient

func (c *OAuthClientsService) CreateOAuthClient(ac OAuthClient) (*OAuthClient, *Response, error)

CreateOAuthClient creates a Client

func (*OAuthClientsService) DeleteOAuthClient

func (c *OAuthClientsService) DeleteOAuthClient(ac OAuthClient) (bool, *Response, error)

DeleteOAuthClient deletes the given Client

func (*OAuthClientsService) GetOAuthClientByID

func (c *OAuthClientsService) GetOAuthClientByID(id string) (*OAuthClient, *Response, error)

GetOAuthClientByID finds a client by its ID

func (*OAuthClientsService) GetOAuthClients

func (c *OAuthClientsService) GetOAuthClients(opt *GetOAuthClientsOptions, options ...OptionFunc) (*[]OAuthClient, *Response, error)

GetOAuthClients looks up clients based on GetClientsOptions

func (*OAuthClientsService) Update

Update updates a client

func (*OAuthClientsService) UpdateScopes

func (c *OAuthClientsService) UpdateScopes(ac OAuthClient, scopes []string, defaultScopes []string) (bool, *Response, error)

UpdateScopes updates a clients scope

func (*OAuthClientsService) UpdateScopesByFlag added in v0.63.0

func (c *OAuthClientsService) UpdateScopesByFlag(ac OAuthClient, scopes []string, defaultScopes []string, isBootstrapClient bool) (bool, *Response, error)

UpdateScopes updates a clients scope, with possibility to choose between regular client and bootstrap client

type OptionFunc

type OptionFunc func(*http.Request) error

OptionFunc is the function signature function for options

type Proposition

type Proposition struct {
	ResourceType                          string      `json:"resourceType" validate:"required"`
	ID                                    string      `json:"id,omitempty"`
	Name                                  string      `json:"name" validate:"required"`
	Description                           string      `json:"description"`
	OrganizationGuid                      Identifier  `json:"organizationGuid"`
	PropositionGuid                       *Identifier `json:"propositionGuid,omitempty" validate:"omitempty,dive"`
	GlobalReferenceID                     string      `json:"globalReferenceId"`
	Status                                string      `json:"status,omitempty" validate:"omitempty,oneof=DRAFT ACTIVE"`
	DefaultCustomerOrganizationGuid       *Identifier `json:"defaultCustomerOrganizationGuid,omitempty" validate:"omitempty,dive"`
	ValidationEnabled                     bool        `json:"validationEnabled"`
	ExternalProvisionValidationURL        string      `json:"externalProvisionValidationUrl,omitempty"`
	ExternalProvisionValidationApiVersion string      `json:"externalProvisionValidationApiVersion,omitempty"`
	AuthenticationMethodID                *Reference  `json:"authenticationMethodId,omitempty"`
	NotificationEnabled                   bool        `json:"notificationEnabled"`
	TopicGuid                             *Identifier `json:"topicGuid,omitempty" validate:"omitempty,dive"`
	Meta                                  *Meta       `json:"meta,omitempty"`
}

Proposition represents an MDM Proposition entity

type PropositionsService

type PropositionsService struct {
	*Client
	// contains filtered or unexported fields
}

PropositionsService implements actions on IAM Proposition entities

func (*PropositionsService) CreateProposition

func (p *PropositionsService) CreateProposition(prop Proposition) (*Proposition, *Response, error)

CreateProposition creates a Proposition

func (*PropositionsService) GetProposition

func (p *PropositionsService) GetProposition(opt *GetPropositionsOptions, options ...OptionFunc) (*Proposition, *Response, error)

GetProposition find a Proposition based on the GetPropositions values

func (*PropositionsService) GetPropositionByID

func (p *PropositionsService) GetPropositionByID(id string) (*Proposition, *Response, error)

GetPropositionByID retrieves a Proposition by its ID

func (*PropositionsService) GetPropositions

func (p *PropositionsService) GetPropositions(opt *GetPropositionsOptions, options ...OptionFunc) (*[]Proposition, *Response, error)

GetPropositions search for a Proposition entity based on the GetPropositions values

func (*PropositionsService) UpdateProposition

func (p *PropositionsService) UpdateProposition(prop Proposition) (*Proposition, *Response, error)

UpdateProposition creates a Proposition

type Reference

type Reference struct {
	Reference string `json:"reference"`
}

type Region

type Region struct {
	ResourceType string `json:"resourceType" validate:"required"`
	ID           string `json:"id,omitempty"`
	Name         string `json:"name" validate:"required"`
	Description  string `json:"description"`
	Category     string `json:"category"`
	HsdpEnabled  bool   `json:"hsdpEnabled"`
	Meta         *Meta  `json:"meta,omitempty"`
}

type RegionsService

type RegionsService struct {
	*Client
}

func (*RegionsService) GetRegionByID

func (r *RegionsService) GetRegionByID(id string) (*Region, *Response, error)

func (*RegionsService) GetRegions

func (r *RegionsService) GetRegions(opt *GetRegionOptions) (*[]Region, *Response, error)

type ResourceLimitsService

type ResourceLimitsService struct {
	*Client
}

func (*ResourceLimitsService) GetDefault

func (r *ResourceLimitsService) GetDefault() (*ResourcesLimits, *Response, error)

func (*ResourceLimitsService) GetOverride

func (r *ResourceLimitsService) GetOverride() (*ResourcesLimits, *Response, error)

type ResourcesLimits

type ResourcesLimits map[string]int

type Response

type Response struct {
	*http.Response
}

Response is a HSDP IAM API response. This wraps the standard http.Response returned from HSDP IAM and provides convenient access to things like errors

func (*Response) StatusCode added in v0.73.0

func (r *Response) StatusCode() int

type ServiceAction

type ServiceAction struct {
	ResourceType      string      `json:"resourceType" validate:"required"`
	ID                string      `json:"id,omitempty"`
	Name              string      `json:"name" validate:"required"`
	Description       string      `json:"description"`
	OrganizationGuid  *Identifier `json:"organizationGuid,omitempty"`
	StandardServiceId Reference   `json:"standardServiceId"`
}

type ServiceActionsService

type ServiceActionsService struct {
	*Client
	// contains filtered or unexported fields
}

func (*ServiceActionsService) Create

Create creates a ServiceAction

func (*ServiceActionsService) Delete

Delete deletes the given ServiceAction

func (*ServiceActionsService) Find

Find looks up services based on GetServiceActionOptions

func (*ServiceActionsService) GetByID

GetByID finds a client by its ID

func (*ServiceActionsService) Update

Update updates a standard service

type ServiceAgent added in v0.61.7

type ServiceAgent struct {
	ResourceType            string      `json:"resourceType"`
	ID                      string      `json:"id"`
	Name                    string      `json:"name"`
	Description             string      `json:"description"`
	Configuration           string      `json:"configuration"`
	DataSubscriberId        Reference   `json:"dataSubscriberId"`
	AuthenticationMethodIds []Reference `json:"authenticationMethodIds"`
	APIVersionSupported     string      `json:"apiVersionSupported"`
	Meta                    *Meta       `json:"meta"`
}

type ServiceAgentsService added in v0.61.7

type ServiceAgentsService struct {
	*Client
}

func (*ServiceAgentsService) Get added in v0.61.7

func (*ServiceAgentsService) GetByID added in v0.61.7

func (r *ServiceAgentsService) GetByID(id string) (*ServiceAgent, *Response, error)

type ServiceReference

type ServiceReference struct {
	ResourceType      string      `json:"resourceType" validate:"required"`
	ID                string      `json:"id,omitempty"`
	Name              string      `json:"name" validate:"required"`
	Description       string      `json:"description"`
	ApplicationID     Reference   `json:"applicationId" validate:"required"`
	StandardServiceID Reference   `json:"standardServiceId" validate:"required"`
	MatchingRule      string      `json:"matchingRule,omitempty"`
	ServiceActionIDs  []Reference `json:"serviceActionIds" validate:"required,min=1,max=20"`
	BootstrapEnabled  bool        `json:"bootstrapEnabled"`
	Meta              *Meta       `json:"meta,omitempty"`
}

type ServiceReferencesService

type ServiceReferencesService struct {
	*Client
	// contains filtered or unexported fields
}

func (*ServiceReferencesService) Create

Create creates a ServiceReference

func (*ServiceReferencesService) Delete

Delete deletes the given ServiceAction

func (*ServiceReferencesService) Find

Find looks up services based on GetServiceActionOptions

func (*ServiceReferencesService) GetByID

GetByID finds a client by its ID

func (*ServiceReferencesService) Update

Update updates a standard service

type ServiceURL

type ServiceURL struct {
	URL                    string     `json:"url"`
	SortOrder              int        `json:"sortOrder"`
	AuthenticationMethodID *Reference `json:"AuthenticationMethodId,omitempty"`
}

type StandardService

type StandardService struct {
	ResourceType     string       `json:"resourceType" validate:"required"`
	ID               string       `json:"id,omitempty"`
	Name             string       `json:"name" validate:"required"`
	Description      string       `json:"description"`
	Trusted          bool         `json:"trusted"`
	Tags             []string     `json:"tags" validate:"required,min=1,max=1"`
	ServiceUrls      []ServiceURL `json:"serviceUrls" validate:"required,min=1,max=5"`
	OrganizationGuid *Identifier  `json:"organizationGuid,omitempty"`
	Meta             *Meta        `json:"meta,omitempty"`
}

type StandardServicesService

type StandardServicesService struct {
	*Client
	// contains filtered or unexported fields
}

StandardServicesService provides operations on MDM standard service resources

func (*StandardServicesService) CreateStandardService

func (c *StandardServicesService) CreateStandardService(ac StandardService) (*StandardService, *Response, error)

CreateStandardService creates a Client

func (*StandardServicesService) DeleteStandardService

func (c *StandardServicesService) DeleteStandardService(ac StandardService) (bool, *Response, error)

DeleteStandardService deletes the given Client

func (*StandardServicesService) GetStandardServiceByID

func (c *StandardServicesService) GetStandardServiceByID(id string) (*StandardService, *Response, error)

GetStandardServiceByID finds a client by its ID

func (*StandardServicesService) GetStandardServices

func (c *StandardServicesService) GetStandardServices(opt *GetStandardServiceOptions, options ...OptionFunc) (*[]StandardService, *Response, error)

GetStandardServices looks up services based on GetStandardServiceOptions

func (*StandardServicesService) Update

Update updates a standard service

type StorageClass

type StorageClass struct {
	ResourceType string `json:"resourceType"`
	ID           string `json:"id"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	Meta         *Meta  `json:"meta"`
}

type StorageClassService

type StorageClassService struct {
	*Client
}

func (*StorageClassService) GetStorageClassByID

func (r *StorageClassService) GetStorageClassByID(id string) (*StorageClass, *Response, error)

func (*StorageClassService) GetStorageClasses

func (r *StorageClassService) GetStorageClasses(opt *GetStorageClassOptions) (*[]StorageClass, *Response, error)

type SubscriberType

type SubscriberType struct {
	ResourceType          string `json:"resourceType"`
	ID                    string `json:"id"`
	Name                  string `json:"name"`
	Description           string `json:"description"`
	ConfigurationTemplate string `json:"configurationTemplate"`
	SubscriptionTemplate  string `json:"subscriptionTemplate"`
	Meta                  *Meta  `json:"meta,omitempty"`
}

type SubscriberTypesService

type SubscriberTypesService struct {
	*Client
}

func (*SubscriberTypesService) Get

func (*SubscriberTypesService) GetByID

Jump to

Keyboard shortcuts

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