store

package
v3.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store Store `name:"-"`
}

Config is configuration for the Device Repository store.

type DefinitionIdentifiers

type DefinitionIdentifiers struct {
	BrandID,
	ModelID,
	FirmwareVersion,
	BandID string
}

DefinitionIdentifiers is a request to retrieve an end device template for an end device definition.

type GetBrandsRequest

type GetBrandsRequest struct {
	BrandID string
	Limit,
	Page uint32
	OrderBy string
	Paths   []string
	Search  string
}

GetBrandsRequest is a request to list available end device vendors, with pagination and sorting.

type GetBrandsResponse

type GetBrandsResponse struct {
	Count,
	Offset,
	Total uint32
	Brands []*ttnpb.EndDeviceBrand
}

GetBrandsResponse is a list of brands, along with pagination information.

type GetModelsRequest

type GetModelsRequest struct {
	BrandID,
	ModelID string
	Limit,
	Page uint32
	OrderBy string
	Paths   []string
	Search  string
}

GetModelsRequest is a request to list available end device model definitions.

type GetModelsResponse

type GetModelsResponse struct {
	Count,
	Offset,
	Total uint32
	Models []*ttnpb.EndDeviceModel
}

GetModelsResponse is a list of models, along with model information

type NoopStore

type NoopStore struct{}

NoopStore is a no-op.

func (*NoopStore) GetBrands

GetBrands gets available end device vendors.

func (*NoopStore) GetDownlinkDecoder

GetDownlinkDecoder retrieves the codec for decoding downlink messages.

func (*NoopStore) GetDownlinkEncoder

GetDownlinkEncoder retrieves the codec for encoding downlink messages.

func (*NoopStore) GetModels

GetModels gets available end device definitions.

func (*NoopStore) GetTemplate

GetTemplate retrieves an end device template for an end device definition.

func (*NoopStore) GetUplinkDecoder

GetUplinkDecoder retrieves the codec for decoding uplink messages.

type Store

type Store interface {
	// GetBrands lists available end device vendors.
	GetBrands(GetBrandsRequest) (*GetBrandsResponse, error)
	// GetModels lists available end device definitions.
	GetModels(GetModelsRequest) (*GetModelsResponse, error)
	// GetTemplate retrieves an end device template for an end device definition.
	GetTemplate(*ttnpb.EndDeviceVersionIdentifiers) (*ttnpb.EndDeviceTemplate, error)
	// GetUplinkDecoder retrieves the codec for decoding uplink messages.
	GetUplinkDecoder(*ttnpb.EndDeviceVersionIdentifiers) (*ttnpb.MessagePayloadFormatter, error)
	// GetDownlinkDecoder retrieves the codec for decoding downlink messages.
	GetDownlinkDecoder(*ttnpb.EndDeviceVersionIdentifiers) (*ttnpb.MessagePayloadFormatter, error)
	// GetDownlinkEncoder retrieves the codec for encoding downlink messages.
	GetDownlinkEncoder(*ttnpb.EndDeviceVersionIdentifiers) (*ttnpb.MessagePayloadFormatter, error)
	// Close closes the store.
	Close() error
}

Store contains end device definitions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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