tag

package
v0.0.0-...-83a780d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTags

func CreateTags(ctx context.Context, params *CreateTagsParams, cred *config.Credentials) error

CreateTags allows to create or overwrite tags on a resource of Arduino IoT Cloud.

func DeleteTags

func DeleteTags(ctx context.Context, params *DeleteTagsParams, cred *config.Credentials) error

DeleteTags command is used to delete tags of a device from Arduino IoT Cloud.

func TagsInfo

func TagsInfo(tags map[string]interface{}) ([]string, error)

TagsInfo transforms tags into user-readable strings. An error is returned if a tag value is not a string.

Types

type CreateTagsParams

type CreateTagsParams struct {
	ID       string            // Resource ID
	Tags     map[string]string // Map of tags to create
	Resource ResourceType
}

CreateTagsParams contains the parameters needed to create or overwrite tags on a resource of Arduino IoT Cloud.

type DeleteTagsParams

type DeleteTagsParams struct {
	ID       string
	Keys     []string // Keys of tags to delete
	Resource ResourceType
}

DeleteTagsParams contains the parameters needed to delete tags of a device from Arduino IoT Cloud.

type ResourceType

type ResourceType int

ResourceType specifies which resource the tag command refers to. Valid resources are the entities of the cloud that have a 'tags' field.

const (
	None ResourceType = iota
	Device
	Thing
)

Jump to

Keyboard shortcuts

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