devicerepository

package
v0.0.0-...-5090d89 Latest Latest
Warning

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

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

Documentation

Overview

Package devicerepository integrates with the Device Repository.

Index

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

func (c Config) Initialize(ctx context.Context, blobConf config.BlobConfig, overwrite bool) error

Initialize sets up the Device Repository.

func (Config) NewStore

func (c Config) NewStore(ctx context.Context, blobConf config.BlobConfig) (store.Store, error)

NewStore creates a new Store for end devices.

type DeviceRepository

type DeviceRepository struct {
	*component.Component
	// contains filtered or unexported fields
}

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

GetBrand implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) GetDownlinkDecoder

GetDownlinkDecoder implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) GetDownlinkEncoder

GetDownlinkEncoder implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) GetModel

GetModel implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) GetTemplate

GetTemplate implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) GetUplinkDecoder

GetUplinkDecoder implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) ListBrands

ListBrands implements the ttnpb.DeviceRepositoryServer interface.

func (*DeviceRepository) ListModels

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.

type StoreConfig

type StoreConfig struct {
	Store store.Store `name:"-"`

	Bleve bleve.Config `name:"bleve"`
}

StoreConfig represents configuration for the Device Repository store.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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