Documentation ¶
Overview ¶
Package devicerepository integrates with the Device Repository.
Index ¶
- type Config
- type DeviceRepository
- func (dr *DeviceRepository) Context() context.Context
- func (dr *DeviceRepository) GetBrand(ctx context.Context, req *ttnpb.GetEndDeviceBrandRequest) (*ttnpb.EndDeviceBrand, error)
- func (dr *DeviceRepository) GetDownlinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadDecoder, error)
- func (dr *DeviceRepository) GetDownlinkEncoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadEncoder, error)
- func (dr *DeviceRepository) GetModel(ctx context.Context, req *ttnpb.GetEndDeviceModelRequest) (*ttnpb.EndDeviceModel, error)
- func (dr *DeviceRepository) GetTemplate(ctx context.Context, req *ttnpb.GetTemplateRequest) (*ttnpb.EndDeviceTemplate, error)
- func (dr *DeviceRepository) GetUplinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadDecoder, error)
- func (dr *DeviceRepository) ListBrands(ctx context.Context, req *ttnpb.ListEndDeviceBrandsRequest) (*ttnpb.ListEndDeviceBrandsResponse, error)
- func (dr *DeviceRepository) ListModels(ctx context.Context, req *ttnpb.ListEndDeviceModelsRequest) (*ttnpb.ListEndDeviceModelsResponse, error)
- func (dr *DeviceRepository) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)
- func (dr *DeviceRepository) RegisterServices(s *grpc.Server)
- func (dr *DeviceRepository) Roles() []ttnpb.ClusterRole
- type StoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v3.11.0
type Config struct { Store StoreConfig `name:"store"` Source string `name:"source" description:"Device Repository Source (directory)"` Directory string `name:"directory" description:"OS filesystem directory, which contains the Device Repository"` AssetsBaseURL string `name:"assets-base-url" description:"The base URL for Device Repository assets"` }
Config represents the DeviceRepository configuration.
func (Config) Initialize ¶ added in v3.11.0
Initialize sets up the Device Repository.
type DeviceRepository ¶ added in v3.11.0
DeviceRepository implements the Device Repository component.
The Device Repository component exposes the DeviceRepository service.
func New ¶ added in v3.11.0
func New(c *component.Component, conf *Config) (*DeviceRepository, error)
New returns a new *DeviceRepository.
func (*DeviceRepository) Context ¶ added in v3.11.0
func (dr *DeviceRepository) Context() context.Context
Context returns the context of the Device Repository.
func (*DeviceRepository) GetBrand ¶ added in v3.11.0
func (dr *DeviceRepository) GetBrand(ctx context.Context, req *ttnpb.GetEndDeviceBrandRequest) (*ttnpb.EndDeviceBrand, error)
GetBrand implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetDownlinkDecoder ¶ added in v3.11.0
func (dr *DeviceRepository) GetDownlinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadDecoder, error)
GetDownlinkDecoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetDownlinkEncoder ¶ added in v3.11.0
func (dr *DeviceRepository) GetDownlinkEncoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadEncoder, error)
GetDownlinkEncoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetModel ¶ added in v3.11.0
func (dr *DeviceRepository) GetModel(ctx context.Context, req *ttnpb.GetEndDeviceModelRequest) (*ttnpb.EndDeviceModel, error)
GetModel implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetTemplate ¶ added in v3.11.0
func (dr *DeviceRepository) GetTemplate(ctx context.Context, req *ttnpb.GetTemplateRequest) (*ttnpb.EndDeviceTemplate, error)
GetTemplate implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetUplinkDecoder ¶ added in v3.11.0
func (dr *DeviceRepository) GetUplinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadDecoder, error)
GetUplinkDecoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) ListBrands ¶ added in v3.11.0
func (dr *DeviceRepository) ListBrands(ctx context.Context, req *ttnpb.ListEndDeviceBrandsRequest) (*ttnpb.ListEndDeviceBrandsResponse, error)
ListBrands implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) ListModels ¶ added in v3.11.0
func (dr *DeviceRepository) ListModels(ctx context.Context, req *ttnpb.ListEndDeviceModelsRequest) (*ttnpb.ListEndDeviceModelsResponse, error)
ListModels implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) RegisterHandlers ¶ added in v3.11.0
func (dr *DeviceRepository) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)
RegisterHandlers registers gRPC handlers.
func (*DeviceRepository) RegisterServices ¶ added in v3.11.0
func (dr *DeviceRepository) RegisterServices(s *grpc.Server)
RegisterServices registers services provided by dr at s.
func (*DeviceRepository) Roles ¶ added in v3.11.0
func (dr *DeviceRepository) Roles() []ttnpb.ClusterRole
Roles returns the roles that the Device Repository fulfills.