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.MessagePayloadFormatter, error)
- func (dr *DeviceRepository) GetDownlinkEncoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadFormatter, 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.MessagePayloadFormatter, 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 ¶
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 ¶
Initialize sets up the Device Repository.
type DeviceRepository ¶
DeviceRepository implements the Device Repository component.
The Device Repository component exposes the DeviceRepository service.
func New ¶
func New(c *component.Component, conf *Config) (*DeviceRepository, error)
New returns a new *DeviceRepository.
func (*DeviceRepository) Context ¶
func (dr *DeviceRepository) Context() context.Context
Context returns the context of the Device Repository.
func (*DeviceRepository) GetBrand ¶
func (dr *DeviceRepository) GetBrand(ctx context.Context, req *ttnpb.GetEndDeviceBrandRequest) (*ttnpb.EndDeviceBrand, error)
GetBrand implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetDownlinkDecoder ¶
func (dr *DeviceRepository) GetDownlinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadFormatter, error)
GetDownlinkDecoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetDownlinkEncoder ¶
func (dr *DeviceRepository) GetDownlinkEncoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadFormatter, error)
GetDownlinkEncoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetModel ¶
func (dr *DeviceRepository) GetModel(ctx context.Context, req *ttnpb.GetEndDeviceModelRequest) (*ttnpb.EndDeviceModel, error)
GetModel implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetTemplate ¶
func (dr *DeviceRepository) GetTemplate(ctx context.Context, req *ttnpb.GetTemplateRequest) (*ttnpb.EndDeviceTemplate, error)
GetTemplate implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) GetUplinkDecoder ¶
func (dr *DeviceRepository) GetUplinkDecoder(ctx context.Context, req *ttnpb.GetPayloadFormatterRequest) (*ttnpb.MessagePayloadFormatter, error)
GetUplinkDecoder implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) ListBrands ¶
func (dr *DeviceRepository) ListBrands(ctx context.Context, req *ttnpb.ListEndDeviceBrandsRequest) (*ttnpb.ListEndDeviceBrandsResponse, error)
ListBrands implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) ListModels ¶
func (dr *DeviceRepository) ListModels(ctx context.Context, req *ttnpb.ListEndDeviceModelsRequest) (*ttnpb.ListEndDeviceModelsResponse, error)
ListModels implements the ttnpb.DeviceRepositoryServer interface.
func (*DeviceRepository) RegisterHandlers ¶
func (dr *DeviceRepository) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)
RegisterHandlers registers gRPC handlers.
func (*DeviceRepository) RegisterServices ¶
func (dr *DeviceRepository) RegisterServices(s *grpc.Server)
RegisterServices registers services provided by dr at s.
func (*DeviceRepository) Roles ¶
func (dr *DeviceRepository) Roles() []ttnpb.ClusterRole
Roles returns the roles that the Device Repository fulfills.