store

package
v3.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 3 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 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 GetCodecRequest added in v3.12.2

type GetCodecRequest interface {
	GetVersionIds() *ttnpb.EndDeviceVersionIdentifiers
	GetFieldMask() *pbtypes.FieldMask
}

GetCodecRequest is a request to retrieve the codec of

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

func (*NoopStore) GetDownlinkDecoder(GetCodecRequest) (*ttnpb.MessagePayloadDecoder, error)

GetDownlinkDecoder retrieves the codec for decoding downlink messages.

func (*NoopStore) GetDownlinkEncoder

func (*NoopStore) GetDownlinkEncoder(GetCodecRequest) (*ttnpb.MessagePayloadEncoder, error)

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(GetCodecRequest) (*ttnpb.MessagePayloadDecoder, error)
	// GetDownlinkDecoder retrieves the codec for decoding downlink messages.
	GetDownlinkDecoder(GetCodecRequest) (*ttnpb.MessagePayloadDecoder, error)
	// GetDownlinkEncoder retrieves the codec for encoding downlink messages.
	GetDownlinkEncoder(GetCodecRequest) (*ttnpb.MessagePayloadEncoder, 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