ToApplicationID returns the application identifier of the specified unique ID.
(uid string)
| 53 | |
| 54 | // ToApplicationID returns the application identifier of the specified unique ID. |
| 55 | func 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. |
| 64 | func ToClientID(uid string) (id *ttnpb.ClientIdentifiers, err error) { |