remote

package
v3.26.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteStore

func NewRemoteStore(fetcher fetch.Interface) store.Store

NewRemoteStore initializes a new Store using a fetcher. Avoid using directly, use bleve.NewIndexedStore instead. Searching and ordering are not supported, and some operations can be very slow.

Types

type DecodedCodecData added in v3.12.2

type DecodedCodecData struct {
	Data     map[string]any `yaml:"data"`
	Warnings []string       `yaml:"warnings"`
	Errors   []string       `yaml:"errors"`
}

type DecoderCodecExample added in v3.12.2

type DecoderCodecExample struct {
	Description string           `yaml:"description"`
	Input       EncodedCodecData `yaml:"input"`
	Output      DecodedCodecData `yaml:"output"`
}

type EncodedCodecData added in v3.12.2

type EncodedCodecData struct {
	FPort    uint32   `yaml:"fPort"`
	Bytes    []byte   `yaml:"bytes"`
	Warnings []string `yaml:"warnings"`
	Errors   []string `yaml:"errors"`
}

type EncoderCodecExample added in v3.12.2

type EncoderCodecExample struct {
	Description string           `yaml:"description"`
	Input       DecodedCodecData `yaml:"input"`
	Output      EncodedCodecData `yaml:"output"`
}

type EndDeviceCodecs added in v3.12.2

type EndDeviceCodecs struct {
	CodecID         string
	UplinkDecoder   EndDeviceDecoderCodec `yaml:"uplinkDecoder"`
	DownlinkDecoder EndDeviceDecoderCodec `yaml:"downlinkDecoder"`
	DownlinkEncoder EndDeviceEncoderCodec `yaml:"downlinkEncoder"`
}

EndDeviceCodecs is the format of the `vendor/<vendor>/<codec-id>.yaml` files.

type EndDeviceDecoderCodec added in v3.12.2

type EndDeviceDecoderCodec struct {
	FileName string                `yaml:"fileName"`
	Examples []DecoderCodecExample `yaml:"examples"`
}

type EndDeviceEncoderCodec added in v3.12.2

type EndDeviceEncoderCodec struct {
	FileName string                `yaml:"fileName"`
	Examples []EncoderCodecExample `yaml:"examples"`
}

type EndDeviceModel

type EndDeviceModel struct {
	Name             string `yaml:"name"`
	Description      string `yaml:"description"`
	HardwareVersions []struct {
		Version    string `yaml:"version"`
		Numeric    uint32 `yaml:"numeric"`
		PartNumber string `yaml:"partNumber"`
	} `yaml:"hardwareVersions"`
	FirmwareVersions []struct {
		Version          string   `yaml:"version"`
		Numeric          uint32   `yaml:"numeric"`
		HardwareVersions []string `yaml:"hardwareVersions"`
		Profiles         map[string]struct {
			VendorID         string `yaml:"vendorID"`
			ID               string `yaml:"id"`
			Codec            string `yaml:"codec"`
			LoRaWANCertified bool   `yaml:"lorawanCertified"`
		} `yaml:"profiles"`
	} `yaml:"firmwareVersions"`
	Sensors    []string `yaml:"sensors"`
	Dimensions *struct {
		Width    float32 `yaml:"width"`
		Height   float32 `yaml:"height"`
		Diameter float32 `yaml:"diameter"`
		Length   float32 `yaml:"length"`
	} `yaml:"dimensions"`
	Weight  float32 `yaml:"weight"`
	Battery *struct {
		Replaceable bool   `yaml:"replaceable"`
		Type        string `yaml:"type"`
	} `yaml:"battery"`
	OperatingConditions *struct {
		Temperature *struct {
			Min float32 `yaml:"min"`
			Max float32 `yaml:"max"`
		} `yaml:"temperature"`
		RelativeHumidity *struct {
			Min float32 `yaml:"min"`
			Max float32 `yaml:"max"`
		} `yaml:"relativeHumidity"`
	} `yaml:"operatingConditions"`
	IPCode          string                  `yaml:"ipCode"`
	KeyProvisioning []ttnpb.KeyProvisioning `yaml:"keyProvisioning"`
	KeySecurity     ttnpb.KeySecurity       `yaml:"keySecurity"`
	Photos          *struct {
		Main  string   `yaml:"main"`
		Other []string `yaml:"other"`
	} `yaml:"photos"`
	Videos *struct {
		Main  string   `yaml:"main"`
		Other []string `yaml:"other"`
	} `yaml:"videos"`
	ProductURL   string `yaml:"productURL"`
	DataSheetURL string `yaml:"dataSheetURL"`
	ResellerURLs []struct {
		Name   string   `yaml:"name"`
		Region []string `yaml:"region"`
		URL    string   `yaml:"url"`
	} `yaml:"resellerURLs"`
	Compliances *struct {
		Safety []struct {
			Body     string `yaml:"body"`
			Norm     string `yaml:"norm"`
			Standard string `yaml:"standard"`
			Version  string `yaml:"version"`
		} `yaml:"safety"`
		RadioEquipment []struct {
			Body     string `yaml:"body"`
			Norm     string `yaml:"norm"`
			Standard string `yaml:"standard"`
			Version  string `yaml:"version"`
		} `yaml:"radioEquipment"`
	} `yaml:"compliances"`
	AdditionalRadios []string `yaml:"additionalRadios"`
}

EndDeviceModel is the format of the `vendor/<vendor-id>/<model-id>.yaml` file.

func (EndDeviceModel) ToPB

func (d EndDeviceModel) ToPB(brandID, modelID string, paths ...string) (*ttnpb.EndDeviceModel, error)

ToPB converts an EndDefinitionDefinition to a Protocol Buffer.

type Vendor

type Vendor struct {
	ID       string   `yaml:"id"`
	Name     string   `yaml:"name"`
	VendorID uint32   `yaml:"vendorID"`
	Draft    bool     `yaml:"draft,omitempty"`
	Email    string   `yaml:"email"`
	Website  string   `yaml:"website"`
	PEN      uint32   `yaml:"pen"`
	OUIs     []string `yaml:"ouis"`
}

Vendor is an end device vendor.

func (Vendor) ToPB

func (v Vendor) ToPB(paths ...string) (*ttnpb.EndDeviceBrand, error)

ToPB creates a ttnpb.EndDeviceBrand protocol buffer from a Vendor.

type VendorEndDevicesIndex

type VendorEndDevicesIndex struct {
	EndDevices []string `yaml:"endDevices"`
}

VendorEndDevicesIndex is the format of the `vendor/<vendor-id>/index.yaml` file.

type VendorsIndex

type VendorsIndex struct {
	Vendors []Vendor `yaml:"vendors"`
}

VendorsIndex is the format for the vendor/index.yaml file.

Jump to

Keyboard shortcuts

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