iodd

package
v2.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveIoddFile

func SaveIoddFile(vendorId int64, deviceId int, relativeDirectoryPath string) (err error)

Types

type Content

type Content struct {
	HasMoreVersions    bool   `json:"hasMoreVersions"`
	DeviceID           int64  `json:"deviceId"`
	IoLinkRev          string `json:"ioLinkRev"`
	VersionString      string `json:"versionString"`
	IoddID             int64  `json:"ioddId"`
	ProductID          string `json:"productId"`
	ProductVariantID   int64  `json:"productVariantId"`
	ProductName        string `json:"productName"`
	VendorName         string `json:"vendorName"`
	UploadDate         int64  `json:"uploadDate"`
	VendorID           int64  `json:"vendorId"`
	IoddStatus         string `json:"ioddStatus"`
	IndicationOfSource string `json:"indicationOfSource"`
}

type IoDDFile

type IoDDFile struct {
	Name    string
	File    []byte
	Context Content
}

IoDDFile is a helper structure with the name, file and additional context of the iodd file

func GetIoddFile

func GetIoddFile(vendorId int64, deviceId int) (files []IoDDFile, err error)

GetIoddFile downloads a ioddfiles from ioddfinder and returns a list of valid files for the request (This can be multiple, if the vendor has multiple languages or versions published)

type Ioddfinder

type Ioddfinder struct {
	Content          []Content     `json:"content"`
	Number           int64         `json:"number"`
	Size             int64         `json:"size"`
	NumberOfElements int64         `json:"numberOfElements"`
	Sort             []interface{} `json:"sort"`
	First            bool          `json:"first"`
	Last             bool          `json:"last"`
	TotalPages       int64         `json:"totalPages"`
	TotalElements    int64         `json:"totalElements"`
}

func UnmarshalIoddfinder

func UnmarshalIoddfinder(data []byte) (Ioddfinder, error)

func (*Ioddfinder) Marshal

func (r *Ioddfinder) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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