devicedefinition

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TokenPrefix = "DD"

TokenPrefix is the prefix for a global token id for Device Definition.

Variables

This section is empty.

Functions

Types

type DeviceDefinitionMetadata added in v0.2.3

type DeviceDefinitionMetadata struct {
	DeviceAttributes []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"device_attributes"`
}

type DeviceDefinitionTablelandCountModel

type DeviceDefinitionTablelandCountModel struct {
	Count int `json:"count(*)"`
}

type DeviceDefinitionTablelandModel

type DeviceDefinitionTablelandModel struct {
	ID         string                    `json:"id"`
	KSUID      string                    `json:"ksuid"`
	Model      string                    `json:"model"`
	Year       int                       `json:"year"`
	DeviceType string                    `json:"devicetype"`
	ImageURI   string                    `json:"imageuri"`
	Metadata   *DeviceDefinitionMetadata `json:"metadata"`
}

func (*DeviceDefinitionTablelandModel) UnmarshalJSON added in v0.2.3

func (d *DeviceDefinitionTablelandModel) UnmarshalJSON(data []byte) error

UnmarshalJSON customizes the unmarshaling of DeviceDefinitionTablelandModel to handle cases where metadata is an empty string.

type Repository

type Repository struct {
	*base.Repository
	TablelandApiService *services.TablelandApiService
}

func (*Repository) GetDeviceDefinition

func (r *Repository) GetDeviceDefinition(ctx context.Context, by gmodel.DeviceDefinitionBy) (*gmodel.DeviceDefinition, error)

func (*Repository) GetDeviceDefinitions

func (r *Repository) GetDeviceDefinitions(ctx context.Context, tableID, first *int, after *string, last *int, before *string, filterBy *gmodel.DeviceDefinitionFilter) (*gmodel.DeviceDefinitionConnection, error)

Jump to

Keyboard shortcuts

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