Documentation ¶
Overview ¶
Package devicetemplates implements creating templates for devices.
Index ¶
Constants ¶
View Source
const TTSCSV = "the-things-stack-csv"
TTSCSV is the device template converter ID.
View Source
const TTSJSON = "the-things-stack"
TTSJSON is the device template converter ID.
Variables ¶
This section is empty.
Functions ¶
func NewContextWithProfileIDs ¶ added in v3.21.2
func NewContextWithProfileIDs(ctx context.Context, ids *ttnpb.EndDeviceVersionIdentifiers) context.Context
NewContextWithProfileIDs returns a context with an EndDeviceVersionIdentifiers injected into it.
func ProfileIDsFromContext ¶ added in v3.21.2
func ProfileIDsFromContext(ctx context.Context) *ttnpb.EndDeviceVersionIdentifiers
ProfileIDsFromContext fetches an EndDeviceVersionIdentifiers from within the given context, nil if does not exist.
func RegisterConverter ¶
RegisterConverter registers the given converter. Existing registrations with the same ID will be overwritten. This function is not goroutine-safe.
Types ¶
type Converter ¶
type Converter interface { Format() *ttnpb.EndDeviceTemplateFormat Convert(context.Context, io.Reader, func(*ttnpb.EndDeviceTemplate) error) error }
Converter converts a binary file in end device templates.
func GetConverter ¶
GetConverter returns the converter by ID.
Click to show internal directories.
Click to hide internal directories.