Documentation ¶
Overview ¶
Package ttjs provides the claiming client implementation for The Things Join Server API.
Index ¶
- type BasicAuth
- type Component
- type Config
- type OUI
- type TTJS
- func (client *TTJS) Claim(ctx context.Context, req *ttnpb.ClaimEndDeviceRequest) (*ttnpb.EndDeviceIdentifiers, error)
- func (client *TTJS) GetClaimStatus(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers) (*ttnpb.GetClaimStatusResponse, error)
- func (client *TTJS) SupportsJoinEUI(eui types.EUI64) bool
- func (client *TTJS) Unclaim(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers) error
- type VendorSpecific
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { httpclient.Provider GetBaseConfig(ctx context.Context) config.ServiceBase GetPeerConn(ctx context.Context, role ttnpb.ClusterRole, ids cluster.EntityIdentifiers) (*grpc.ClientConn, error) AllowInsecureForCredentials() bool }
Component abstracts the underlying *component.Component.
type Config ¶
type Config struct { NetID types.NetID `yaml:"-"` JoinEUIPrefixes []types.EUI64Prefix `yaml:"-"` BasicAuth `yaml:"basic-auth"` ClaimingAPIVersion string `yaml:"claiming-api-version"` URL string `yaml:"url"` TenantID string `yaml:"tenant-id"` HomeNSIDs map[string]string `yaml:"home-ns-ids"` }
Config is the configuration to communicate with The Things Join Server End Device Claming API.
type OUI ¶
type OUI uint32
OUI is the Organisation Unique Identifier.
func (OUI) MarshalText ¶
MarshalText implements encoding.TextUnmarshaler interface. This makes sure that the value sent to The Things Join Server is six upper case (UTF-8) hex characters.
func (*OUI) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type TTJS ¶
type TTJS struct { Component // contains filtered or unexported fields }
TTJS is a client that claims end devices on a The Things Join Server.
func (*TTJS) Claim ¶
func (client *TTJS) Claim(ctx context.Context, req *ttnpb.ClaimEndDeviceRequest) (*ttnpb.EndDeviceIdentifiers, error)
Claim implements EndDeviceClaimer.
func (*TTJS) GetClaimStatus ¶
func (client *TTJS) GetClaimStatus(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers) (*ttnpb.GetClaimStatusResponse, error)
GetClaimStatus implements EndDeviceClaimer.
func (*TTJS) SupportsJoinEUI ¶
SupportsJoinEUI implements EndDeviceClaimer.
type VendorSpecific ¶
type VendorSpecific struct { OUI OUI `json:"oui"` Data interop.TTIVSExtension `json:"data"` }
VendorSpecific defines vendor specific fields.
func (VendorSpecific) MarshalJSON ¶
func (vs VendorSpecific) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*VendorSpecific) UnmarshalJSON ¶
func (vs *VendorSpecific) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.