MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / ToApplicationID

Function ToApplicationID

pkg/unique/unique.go:55–61  ·  view source on GitHub ↗

ToApplicationID returns the application identifier of the specified unique ID.

(uid string)

Source from the content-addressed store, hash-verified

53
54// ToApplicationID returns the application identifier of the specified unique ID.
55func ToApplicationID(uid string) (id *ttnpb.ApplicationIdentifiers, err error) {
56 id = &ttnpb.ApplicationIdentifiers{ApplicationId: uid}
57 if err := id.ValidateFields("application_id"); err != nil {
58 return nil, errUniqueIdentifier.WithCause(err).WithAttributes("uid", uid)
59 }
60 return id, nil
61}
62
63// ToClientID returns the client identifier of the specified unique ID.
64func ToClientID(uid string) (id *ttnpb.ClientIdentifiers, err error) {

Callers 10

RangeMethod · 0.92
decodeEventMetaFunction · 0.92
DeleteApplicationDataMethod · 0.92
RangeMethod · 0.92
DeleteApplicationDataMethod · 0.92
RangeMethod · 0.92
TestRoundtripFunction · 0.85

Calls 3

ValidateFieldsMethod · 0.45
WithAttributesMethod · 0.45
WithCauseMethod · 0.45

Tested by 2

TestRoundtripFunction · 0.68