Documentation ¶
Overview ¶
Package handler is a generated protocol buffer package. It is generated from these files: github.com/TheThingsNetwork/ttn/api/handler/handler.proto It has these top-level messages: DeviceActivationResponse StatusRequest Status ApplicationIdentifier Application DeviceIdentifier Device DeviceList DryDownlinkMessage DryUplinkMessage SimulatedUplinkMessage LogEntry DryUplinkResult DryDownlinkResult
Package handler is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterApplicationManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterApplicationManagerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterApplicationManagerServer(s *grpc.Server, srv ApplicationManagerServer)
- func RegisterHandlerManagerServer(s *grpc.Server, srv HandlerManagerServer)
- func RegisterHandlerServer(s *grpc.Server, srv HandlerServer)
- type Application
- func (*Application) Descriptor() ([]byte, []int)
- func (m *Application) GetAppId() string
- func (m *Application) GetConverter() string
- func (m *Application) GetDecoder() string
- func (m *Application) GetEncoder() string
- func (m *Application) GetValidator() string
- func (m *Application) Marshal() (dAtA []byte, err error)
- func (m *Application) MarshalTo(dAtA []byte) (int, error)
- func (*Application) ProtoMessage()
- func (m *Application) Reset()
- func (m *Application) Size() (n int)
- func (m *Application) String() string
- func (m *Application) Unmarshal(dAtA []byte) error
- func (m *Application) Validate() error
- type ApplicationIdentifier
- func (*ApplicationIdentifier) Descriptor() ([]byte, []int)
- func (m *ApplicationIdentifier) GetAppId() string
- func (m *ApplicationIdentifier) Marshal() (dAtA []byte, err error)
- func (m *ApplicationIdentifier) MarshalTo(dAtA []byte) (int, error)
- func (*ApplicationIdentifier) ProtoMessage()
- func (m *ApplicationIdentifier) Reset()
- func (m *ApplicationIdentifier) Size() (n int)
- func (m *ApplicationIdentifier) String() string
- func (m *ApplicationIdentifier) Unmarshal(dAtA []byte) error
- func (m *ApplicationIdentifier) Validate() error
- type ApplicationManagerClient
- type ApplicationManagerServer
- type Device
- func (*Device) Descriptor() ([]byte, []int)
- func (m *Device) GetAltitude() int32
- func (m *Device) GetAppId() string
- func (m *Device) GetDescription() string
- func (m *Device) GetDevId() string
- func (m *Device) GetDevice() isDevice_Device
- func (m *Device) GetLatitude() float32
- func (m *Device) GetLongitude() float32
- func (m *Device) GetLorawanDevice() *lorawan1.Device
- func (m *Device) Marshal() (dAtA []byte, err error)
- func (m *Device) MarshalTo(dAtA []byte) (int, error)
- func (*Device) ProtoMessage()
- func (m *Device) Reset()
- func (m *Device) Size() (n int)
- func (m *Device) String() string
- func (m *Device) Unmarshal(dAtA []byte) error
- func (m *Device) Validate() error
- func (*Device) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type DeviceActivationResponse
- func (*DeviceActivationResponse) Descriptor() ([]byte, []int)
- func (m *DeviceActivationResponse) GetActivationMetadata() *protocol.ActivationMetadata
- func (m *DeviceActivationResponse) GetDownlinkOption() *broker.DownlinkOption
- func (m *DeviceActivationResponse) GetMessage() *protocol.Message
- func (m *DeviceActivationResponse) GetPayload() []byte
- func (m *DeviceActivationResponse) GetTrace() *trace.Trace
- func (m *DeviceActivationResponse) Marshal() (dAtA []byte, err error)
- func (m *DeviceActivationResponse) MarshalPayload() error
- func (m *DeviceActivationResponse) MarshalTo(dAtA []byte) (int, error)
- func (*DeviceActivationResponse) ProtoMessage()
- func (m *DeviceActivationResponse) Reset()
- func (m *DeviceActivationResponse) Size() (n int)
- func (m *DeviceActivationResponse) String() string
- func (m *DeviceActivationResponse) Unmarshal(dAtA []byte) error
- func (m *DeviceActivationResponse) UnmarshalPayload() error
- func (m *DeviceActivationResponse) Validate() error
- type DeviceIdentifier
- func (*DeviceIdentifier) Descriptor() ([]byte, []int)
- func (m *DeviceIdentifier) GetAppId() string
- func (m *DeviceIdentifier) GetDevId() string
- func (m *DeviceIdentifier) Marshal() (dAtA []byte, err error)
- func (m *DeviceIdentifier) MarshalTo(dAtA []byte) (int, error)
- func (*DeviceIdentifier) ProtoMessage()
- func (m *DeviceIdentifier) Reset()
- func (m *DeviceIdentifier) Size() (n int)
- func (m *DeviceIdentifier) String() string
- func (m *DeviceIdentifier) Unmarshal(dAtA []byte) error
- func (m *DeviceIdentifier) Validate() error
- type DeviceList
- func (*DeviceList) Descriptor() ([]byte, []int)
- func (m *DeviceList) GetDevices() []*Device
- func (m *DeviceList) Marshal() (dAtA []byte, err error)
- func (m *DeviceList) MarshalTo(dAtA []byte) (int, error)
- func (*DeviceList) ProtoMessage()
- func (m *DeviceList) Reset()
- func (m *DeviceList) Size() (n int)
- func (m *DeviceList) String() string
- func (m *DeviceList) Unmarshal(dAtA []byte) error
- type Device_LorawanDevice
- type DryDownlinkMessage
- func (*DryDownlinkMessage) Descriptor() ([]byte, []int)
- func (m *DryDownlinkMessage) GetApp() *Application
- func (m *DryDownlinkMessage) GetFields() string
- func (m *DryDownlinkMessage) GetPayload() []byte
- func (m *DryDownlinkMessage) GetPort() uint32
- func (m *DryDownlinkMessage) Marshal() (dAtA []byte, err error)
- func (m *DryDownlinkMessage) MarshalTo(dAtA []byte) (int, error)
- func (*DryDownlinkMessage) ProtoMessage()
- func (m *DryDownlinkMessage) Reset()
- func (m *DryDownlinkMessage) Size() (n int)
- func (m *DryDownlinkMessage) String() string
- func (m *DryDownlinkMessage) Unmarshal(dAtA []byte) error
- type DryDownlinkResult
- func (*DryDownlinkResult) Descriptor() ([]byte, []int)
- func (m *DryDownlinkResult) GetLogs() []*LogEntry
- func (m *DryDownlinkResult) GetPayload() []byte
- func (m *DryDownlinkResult) Marshal() (dAtA []byte, err error)
- func (m *DryDownlinkResult) MarshalTo(dAtA []byte) (int, error)
- func (*DryDownlinkResult) ProtoMessage()
- func (m *DryDownlinkResult) Reset()
- func (m *DryDownlinkResult) Size() (n int)
- func (m *DryDownlinkResult) String() string
- func (m *DryDownlinkResult) Unmarshal(dAtA []byte) error
- type DryUplinkMessage
- func (*DryUplinkMessage) Descriptor() ([]byte, []int)
- func (m *DryUplinkMessage) GetApp() *Application
- func (m *DryUplinkMessage) GetPayload() []byte
- func (m *DryUplinkMessage) GetPort() uint32
- func (m *DryUplinkMessage) Marshal() (dAtA []byte, err error)
- func (m *DryUplinkMessage) MarshalTo(dAtA []byte) (int, error)
- func (*DryUplinkMessage) ProtoMessage()
- func (m *DryUplinkMessage) Reset()
- func (m *DryUplinkMessage) Size() (n int)
- func (m *DryUplinkMessage) String() string
- func (m *DryUplinkMessage) Unmarshal(dAtA []byte) error
- type DryUplinkResult
- func (*DryUplinkResult) Descriptor() ([]byte, []int)
- func (m *DryUplinkResult) GetFields() string
- func (m *DryUplinkResult) GetLogs() []*LogEntry
- func (m *DryUplinkResult) GetPayload() []byte
- func (m *DryUplinkResult) GetValid() bool
- func (m *DryUplinkResult) Marshal() (dAtA []byte, err error)
- func (m *DryUplinkResult) MarshalTo(dAtA []byte) (int, error)
- func (*DryUplinkResult) ProtoMessage()
- func (m *DryUplinkResult) Reset()
- func (m *DryUplinkResult) Size() (n int)
- func (m *DryUplinkResult) String() string
- func (m *DryUplinkResult) Unmarshal(dAtA []byte) error
- type HandlerClient
- type HandlerManagerClient
- type HandlerManagerServer
- type HandlerServer
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)
- func (m *LogEntry) GetFields() []string
- func (m *LogEntry) GetFunction() string
- func (m *LogEntry) Marshal() (dAtA []byte, err error)
- func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)
- func (*LogEntry) ProtoMessage()
- func (m *LogEntry) Reset()
- func (m *LogEntry) Size() (n int)
- func (m *LogEntry) String() string
- func (m *LogEntry) Unmarshal(dAtA []byte) error
- type ManagerClient
- func (h *ManagerClient) Close() error
- func (h *ManagerClient) DeleteApplication(appID string) error
- func (h *ManagerClient) DeleteDevice(appID string, devID string) error
- func (h *ManagerClient) DryDownlinkWithFields(fields map[string]interface{}, app *Application, port uint32) (*DryDownlinkResult, error)
- func (h *ManagerClient) DryDownlinkWithPayload(payload []byte, app *Application, port uint32) (*DryDownlinkResult, error)
- func (h *ManagerClient) DryUplink(payload []byte, app *Application, port uint32) (*DryUplinkResult, error)
- func (h *ManagerClient) GetApplication(appID string) (*Application, error)
- func (h *ManagerClient) GetContext() context.Context
- func (h *ManagerClient) GetContextWithLimitAndOffset(limit, offset int) context.Context
- func (h *ManagerClient) GetDevAddr(constraints ...string) (types.DevAddr, error)
- func (h *ManagerClient) GetDevice(appID string, devID string) (*Device, error)
- func (h *ManagerClient) GetDevicesForApplication(appID string, limit, offset int) (devices []*Device, err error)
- func (h *ManagerClient) RegisterApplication(appID string) error
- func (h *ManagerClient) SetApplication(in *Application) error
- func (h *ManagerClient) SetDevice(in *Device) error
- func (h *ManagerClient) SetID(id string)
- func (h *ManagerClient) SimulateUplink(appID string, devID string, port uint32, payload []byte) error
- func (h *ManagerClient) UpdateAccessToken(accessToken string)
- type SimulatedUplinkMessage
- func (*SimulatedUplinkMessage) Descriptor() ([]byte, []int)
- func (m *SimulatedUplinkMessage) GetAppId() string
- func (m *SimulatedUplinkMessage) GetDevId() string
- func (m *SimulatedUplinkMessage) GetPayload() []byte
- func (m *SimulatedUplinkMessage) GetPort() uint32
- func (m *SimulatedUplinkMessage) Marshal() (dAtA []byte, err error)
- func (m *SimulatedUplinkMessage) MarshalTo(dAtA []byte) (int, error)
- func (*SimulatedUplinkMessage) ProtoMessage()
- func (m *SimulatedUplinkMessage) Reset()
- func (m *SimulatedUplinkMessage) Size() (n int)
- func (m *SimulatedUplinkMessage) String() string
- func (m *SimulatedUplinkMessage) Unmarshal(dAtA []byte) error
- func (m *SimulatedUplinkMessage) Validate() error
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetActivations() *api.Rates
- func (m *Status) GetComponent() *api.ComponentStats
- func (m *Status) GetDownlink() *api.Rates
- func (m *Status) GetSystem() *api.SystemStats
- func (m *Status) GetUplink() *api.Rates
- func (m *Status) Marshal() (dAtA []byte, err error)
- func (m *Status) MarshalTo(dAtA []byte) (int, error)
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) Size() (n int)
- func (m *Status) String() string
- func (m *Status) Unmarshal(dAtA []byte) error
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)
- func (m *StatusRequest) Marshal() (dAtA []byte, err error)
- func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error)
- func (*StatusRequest) ProtoMessage()
- func (m *StatusRequest) Reset()
- func (m *StatusRequest) Size() (n int)
- func (m *StatusRequest) String() string
- func (m *StatusRequest) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHandler = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHandler = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterApplicationManagerHandler ¶
func RegisterApplicationManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterApplicationManagerHandler registers the http handlers for service ApplicationManager to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterApplicationManagerHandlerFromEndpoint ¶
func RegisterApplicationManagerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterApplicationManagerHandlerFromEndpoint is same as RegisterApplicationManagerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterApplicationManagerServer ¶
func RegisterApplicationManagerServer(s *grpc.Server, srv ApplicationManagerServer)
func RegisterHandlerManagerServer ¶
func RegisterHandlerManagerServer(s *grpc.Server, srv HandlerManagerServer)
func RegisterHandlerServer ¶
func RegisterHandlerServer(s *grpc.Server, srv HandlerServer)
Types ¶
type Application ¶
type Application struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // The decoder is a JavaScript function that decodes a byte array to an object. Decoder string `protobuf:"bytes,2,opt,name=decoder,proto3" json:"decoder,omitempty"` // The converter is a JavaScript function that can be used to convert values // in the object returned from the decoder. This can for example be useful to // convert a voltage to a temperature. Converter string `protobuf:"bytes,3,opt,name=converter,proto3" json:"converter,omitempty"` // The validator is a JavaScript function that checks the validity of the // object returned by the decoder or converter. If validation fails, the // message is dropped. Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` // The encoder is a JavaScript function that encodes an object to a byte array. Encoder string `protobuf:"bytes,5,opt,name=encoder,proto3" json:"encoder,omitempty"` }
The Application settings
func (*Application) Descriptor ¶
func (*Application) Descriptor() ([]byte, []int)
func (*Application) GetAppId ¶
func (m *Application) GetAppId() string
func (*Application) GetConverter ¶
func (m *Application) GetConverter() string
func (*Application) GetDecoder ¶
func (m *Application) GetDecoder() string
func (*Application) GetEncoder ¶
func (m *Application) GetEncoder() string
func (*Application) GetValidator ¶
func (m *Application) GetValidator() string
func (*Application) Marshal ¶
func (m *Application) Marshal() (dAtA []byte, err error)
func (*Application) ProtoMessage ¶
func (*Application) ProtoMessage()
func (*Application) Reset ¶
func (m *Application) Reset()
func (*Application) Size ¶
func (m *Application) Size() (n int)
func (*Application) String ¶
func (m *Application) String() string
func (*Application) Unmarshal ¶
func (m *Application) Unmarshal(dAtA []byte) error
func (*Application) Validate ¶
func (m *Application) Validate() error
Validate implements the api.Validator interface
type ApplicationIdentifier ¶
type ApplicationIdentifier struct {
AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
}
func (*ApplicationIdentifier) Descriptor ¶
func (*ApplicationIdentifier) Descriptor() ([]byte, []int)
func (*ApplicationIdentifier) GetAppId ¶
func (m *ApplicationIdentifier) GetAppId() string
func (*ApplicationIdentifier) Marshal ¶
func (m *ApplicationIdentifier) Marshal() (dAtA []byte, err error)
func (*ApplicationIdentifier) MarshalTo ¶
func (m *ApplicationIdentifier) MarshalTo(dAtA []byte) (int, error)
func (*ApplicationIdentifier) ProtoMessage ¶
func (*ApplicationIdentifier) ProtoMessage()
func (*ApplicationIdentifier) Reset ¶
func (m *ApplicationIdentifier) Reset()
func (*ApplicationIdentifier) Size ¶
func (m *ApplicationIdentifier) Size() (n int)
func (*ApplicationIdentifier) String ¶
func (m *ApplicationIdentifier) String() string
func (*ApplicationIdentifier) Unmarshal ¶
func (m *ApplicationIdentifier) Unmarshal(dAtA []byte) error
func (*ApplicationIdentifier) Validate ¶
func (m *ApplicationIdentifier) Validate() error
Validate implements the api.Validator interface
type ApplicationManagerClient ¶
type ApplicationManagerClient interface { // Applications should first be registered to the Handler with the `RegisterApplication` method RegisterApplication(ctx context.Context, in *ApplicationIdentifier, opts ...grpc.CallOption) (*google_protobuf.Empty, error) // GetApplication returns the application with the given identifier (app_id) GetApplication(ctx context.Context, in *ApplicationIdentifier, opts ...grpc.CallOption) (*Application, error) // SetApplication updates the settings for the application. All fields must be supplied. SetApplication(ctx context.Context, in *Application, opts ...grpc.CallOption) (*google_protobuf.Empty, error) // DeleteApplication deletes the application with the given identifier (app_id) DeleteApplication(ctx context.Context, in *ApplicationIdentifier, opts ...grpc.CallOption) (*google_protobuf.Empty, error) // GetDevice returns the device with the given identifier (app_id and dev_id) GetDevice(ctx context.Context, in *DeviceIdentifier, opts ...grpc.CallOption) (*Device, error) // SetDevice creates or updates a device. All fields must be supplied. SetDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*google_protobuf.Empty, error) // DeleteDevice deletes the device with the given identifier (app_id and dev_id) DeleteDevice(ctx context.Context, in *DeviceIdentifier, opts ...grpc.CallOption) (*google_protobuf.Empty, error) // GetDevicesForApplication returns all devices that belong to the application with the given identifier (app_id) GetDevicesForApplication(ctx context.Context, in *ApplicationIdentifier, opts ...grpc.CallOption) (*DeviceList, error) // DryUplink simulates processing a downlink message and returns the result DryDownlink(ctx context.Context, in *DryDownlinkMessage, opts ...grpc.CallOption) (*DryDownlinkResult, error) // DryUplink simulates processing an uplink message and returns the result DryUplink(ctx context.Context, in *DryUplinkMessage, opts ...grpc.CallOption) (*DryUplinkResult, error) // SimulateUplink simulates an uplink message SimulateUplink(ctx context.Context, in *SimulatedUplinkMessage, opts ...grpc.CallOption) (*google_protobuf.Empty, error) }
func NewApplicationManagerClient ¶
func NewApplicationManagerClient(cc *grpc.ClientConn) ApplicationManagerClient
type ApplicationManagerServer ¶
type ApplicationManagerServer interface { // Applications should first be registered to the Handler with the `RegisterApplication` method RegisterApplication(context.Context, *ApplicationIdentifier) (*google_protobuf.Empty, error) // GetApplication returns the application with the given identifier (app_id) GetApplication(context.Context, *ApplicationIdentifier) (*Application, error) // SetApplication updates the settings for the application. All fields must be supplied. SetApplication(context.Context, *Application) (*google_protobuf.Empty, error) // DeleteApplication deletes the application with the given identifier (app_id) DeleteApplication(context.Context, *ApplicationIdentifier) (*google_protobuf.Empty, error) // GetDevice returns the device with the given identifier (app_id and dev_id) GetDevice(context.Context, *DeviceIdentifier) (*Device, error) // SetDevice creates or updates a device. All fields must be supplied. SetDevice(context.Context, *Device) (*google_protobuf.Empty, error) // DeleteDevice deletes the device with the given identifier (app_id and dev_id) DeleteDevice(context.Context, *DeviceIdentifier) (*google_protobuf.Empty, error) // GetDevicesForApplication returns all devices that belong to the application with the given identifier (app_id) GetDevicesForApplication(context.Context, *ApplicationIdentifier) (*DeviceList, error) // DryUplink simulates processing a downlink message and returns the result DryDownlink(context.Context, *DryDownlinkMessage) (*DryDownlinkResult, error) // DryUplink simulates processing an uplink message and returns the result DryUplink(context.Context, *DryUplinkMessage) (*DryUplinkResult, error) // SimulateUplink simulates an uplink message SimulateUplink(context.Context, *SimulatedUplinkMessage) (*google_protobuf.Empty, error) }
type Device ¶
type Device struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` DevId string `protobuf:"bytes,2,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"` // The device can be of different kinds // // Types that are valid to be assigned to Device: // *Device_LorawanDevice Device isDevice_Device `protobuf_oneof:"device"` Latitude float32 `protobuf:"fixed32,10,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float32 `protobuf:"fixed32,11,opt,name=longitude,proto3" json:"longitude,omitempty"` Altitude int32 `protobuf:"varint,12,opt,name=altitude,proto3" json:"altitude,omitempty"` Description string `protobuf:"bytes,20,opt,name=description,proto3" json:"description,omitempty"` }
The Device settings
func (*Device) Descriptor ¶
func (*Device) GetAltitude ¶
func (*Device) GetDescription ¶
func (*Device) GetLatitude ¶
func (*Device) GetLongitude ¶
func (*Device) GetLorawanDevice ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
type DeviceActivationResponse ¶
type DeviceActivationResponse struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Message *protocol.Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` DownlinkOption *broker.DownlinkOption `protobuf:"bytes,11,opt,name=downlink_option,json=downlinkOption" json:"downlink_option,omitempty"` ActivationMetadata *protocol.ActivationMetadata `protobuf:"bytes,23,opt,name=activation_metadata,json=activationMetadata" json:"activation_metadata,omitempty"` Trace *trace.Trace `protobuf:"bytes,31,opt,name=trace" json:"trace,omitempty"` }
func (*DeviceActivationResponse) Descriptor ¶
func (*DeviceActivationResponse) Descriptor() ([]byte, []int)
func (*DeviceActivationResponse) GetActivationMetadata ¶
func (m *DeviceActivationResponse) GetActivationMetadata() *protocol.ActivationMetadata
func (*DeviceActivationResponse) GetDownlinkOption ¶
func (m *DeviceActivationResponse) GetDownlinkOption() *broker.DownlinkOption
func (*DeviceActivationResponse) GetMessage ¶
func (m *DeviceActivationResponse) GetMessage() *protocol.Message
func (*DeviceActivationResponse) GetPayload ¶
func (m *DeviceActivationResponse) GetPayload() []byte
func (*DeviceActivationResponse) GetTrace ¶
func (m *DeviceActivationResponse) GetTrace() *trace.Trace
func (*DeviceActivationResponse) Marshal ¶
func (m *DeviceActivationResponse) Marshal() (dAtA []byte, err error)
func (*DeviceActivationResponse) MarshalPayload ¶
func (m *DeviceActivationResponse) MarshalPayload() error
MarshalPayload marshals the Message into Payload if Payload is nil
func (*DeviceActivationResponse) MarshalTo ¶
func (m *DeviceActivationResponse) MarshalTo(dAtA []byte) (int, error)
func (*DeviceActivationResponse) ProtoMessage ¶
func (*DeviceActivationResponse) ProtoMessage()
func (*DeviceActivationResponse) Reset ¶
func (m *DeviceActivationResponse) Reset()
func (*DeviceActivationResponse) Size ¶
func (m *DeviceActivationResponse) Size() (n int)
func (*DeviceActivationResponse) String ¶
func (m *DeviceActivationResponse) String() string
func (*DeviceActivationResponse) Unmarshal ¶
func (m *DeviceActivationResponse) Unmarshal(dAtA []byte) error
func (*DeviceActivationResponse) UnmarshalPayload ¶
func (m *DeviceActivationResponse) UnmarshalPayload() error
UnmarshalPayload unmarshals the Payload into Message if Message is nil
func (*DeviceActivationResponse) Validate ¶
func (m *DeviceActivationResponse) Validate() error
Validate implements the api.Validator interface
type DeviceIdentifier ¶
type DeviceIdentifier struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` DevId string `protobuf:"bytes,2,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"` }
func (*DeviceIdentifier) Descriptor ¶
func (*DeviceIdentifier) Descriptor() ([]byte, []int)
func (*DeviceIdentifier) GetAppId ¶
func (m *DeviceIdentifier) GetAppId() string
func (*DeviceIdentifier) GetDevId ¶
func (m *DeviceIdentifier) GetDevId() string
func (*DeviceIdentifier) Marshal ¶
func (m *DeviceIdentifier) Marshal() (dAtA []byte, err error)
func (*DeviceIdentifier) ProtoMessage ¶
func (*DeviceIdentifier) ProtoMessage()
func (*DeviceIdentifier) Reset ¶
func (m *DeviceIdentifier) Reset()
func (*DeviceIdentifier) Size ¶
func (m *DeviceIdentifier) Size() (n int)
func (*DeviceIdentifier) String ¶
func (m *DeviceIdentifier) String() string
func (*DeviceIdentifier) Unmarshal ¶
func (m *DeviceIdentifier) Unmarshal(dAtA []byte) error
func (*DeviceIdentifier) Validate ¶
func (m *DeviceIdentifier) Validate() error
Validate implements the api.Validator interface
type DeviceList ¶
type DeviceList struct {
Devices []*Device `protobuf:"bytes,1,rep,name=devices" json:"devices,omitempty"`
}
func (*DeviceList) Descriptor ¶
func (*DeviceList) Descriptor() ([]byte, []int)
func (*DeviceList) GetDevices ¶
func (m *DeviceList) GetDevices() []*Device
func (*DeviceList) Marshal ¶
func (m *DeviceList) Marshal() (dAtA []byte, err error)
func (*DeviceList) ProtoMessage ¶
func (*DeviceList) ProtoMessage()
func (*DeviceList) Reset ¶
func (m *DeviceList) Reset()
func (*DeviceList) Size ¶
func (m *DeviceList) Size() (n int)
func (*DeviceList) String ¶
func (m *DeviceList) String() string
func (*DeviceList) Unmarshal ¶
func (m *DeviceList) Unmarshal(dAtA []byte) error
type Device_LorawanDevice ¶
type Device_LorawanDevice struct {
LorawanDevice *lorawan1.Device `protobuf:"bytes,3,opt,name=lorawan_device,json=lorawanDevice,oneof"`
}
func (*Device_LorawanDevice) MarshalTo ¶
func (m *Device_LorawanDevice) MarshalTo(dAtA []byte) (int, error)
func (*Device_LorawanDevice) Size ¶
func (m *Device_LorawanDevice) Size() (n int)
func (*Device_LorawanDevice) Validate ¶
func (m *Device_LorawanDevice) Validate() error
Validate implements the api.Validator interface
type DryDownlinkMessage ¶
type DryDownlinkMessage struct { // The binary payload to use Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // JSON-encoded object with fields to encode Fields string `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` // The Application containing the payload functions that should be executed App *Application `protobuf:"bytes,3,opt,name=app" json:"app,omitempty"` // The port number that should be passed to the payload function Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` }
DryDownlinkMessage is a simulated message to test downlink processing
func (*DryDownlinkMessage) Descriptor ¶
func (*DryDownlinkMessage) Descriptor() ([]byte, []int)
func (*DryDownlinkMessage) GetApp ¶
func (m *DryDownlinkMessage) GetApp() *Application
func (*DryDownlinkMessage) GetFields ¶
func (m *DryDownlinkMessage) GetFields() string
func (*DryDownlinkMessage) GetPayload ¶
func (m *DryDownlinkMessage) GetPayload() []byte
func (*DryDownlinkMessage) GetPort ¶
func (m *DryDownlinkMessage) GetPort() uint32
func (*DryDownlinkMessage) Marshal ¶
func (m *DryDownlinkMessage) Marshal() (dAtA []byte, err error)
func (*DryDownlinkMessage) MarshalTo ¶
func (m *DryDownlinkMessage) MarshalTo(dAtA []byte) (int, error)
func (*DryDownlinkMessage) ProtoMessage ¶
func (*DryDownlinkMessage) ProtoMessage()
func (*DryDownlinkMessage) Reset ¶
func (m *DryDownlinkMessage) Reset()
func (*DryDownlinkMessage) Size ¶
func (m *DryDownlinkMessage) Size() (n int)
func (*DryDownlinkMessage) String ¶
func (m *DryDownlinkMessage) String() string
func (*DryDownlinkMessage) Unmarshal ¶
func (m *DryDownlinkMessage) Unmarshal(dAtA []byte) error
type DryDownlinkResult ¶
type DryDownlinkResult struct { // The payload that was encoded Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // Logs that have been generated while processing Logs []*LogEntry `protobuf:"bytes,2,rep,name=logs" json:"logs,omitempty"` }
DryDownlinkResult is the result from a downlink simulation
func (*DryDownlinkResult) Descriptor ¶
func (*DryDownlinkResult) Descriptor() ([]byte, []int)
func (*DryDownlinkResult) GetLogs ¶
func (m *DryDownlinkResult) GetLogs() []*LogEntry
func (*DryDownlinkResult) GetPayload ¶
func (m *DryDownlinkResult) GetPayload() []byte
func (*DryDownlinkResult) Marshal ¶
func (m *DryDownlinkResult) Marshal() (dAtA []byte, err error)
func (*DryDownlinkResult) MarshalTo ¶
func (m *DryDownlinkResult) MarshalTo(dAtA []byte) (int, error)
func (*DryDownlinkResult) ProtoMessage ¶
func (*DryDownlinkResult) ProtoMessage()
func (*DryDownlinkResult) Reset ¶
func (m *DryDownlinkResult) Reset()
func (*DryDownlinkResult) Size ¶
func (m *DryDownlinkResult) Size() (n int)
func (*DryDownlinkResult) String ¶
func (m *DryDownlinkResult) String() string
func (*DryDownlinkResult) Unmarshal ¶
func (m *DryDownlinkResult) Unmarshal(dAtA []byte) error
type DryUplinkMessage ¶
type DryUplinkMessage struct { // The binary payload to use Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // The Application containing the payload functions that should be executed App *Application `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` // The port number that should be passed to the payload function Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` }
DryUplinkMessage is a simulated message to test uplink processing
func (*DryUplinkMessage) Descriptor ¶
func (*DryUplinkMessage) Descriptor() ([]byte, []int)
func (*DryUplinkMessage) GetApp ¶
func (m *DryUplinkMessage) GetApp() *Application
func (*DryUplinkMessage) GetPayload ¶
func (m *DryUplinkMessage) GetPayload() []byte
func (*DryUplinkMessage) GetPort ¶
func (m *DryUplinkMessage) GetPort() uint32
func (*DryUplinkMessage) Marshal ¶
func (m *DryUplinkMessage) Marshal() (dAtA []byte, err error)
func (*DryUplinkMessage) ProtoMessage ¶
func (*DryUplinkMessage) ProtoMessage()
func (*DryUplinkMessage) Reset ¶
func (m *DryUplinkMessage) Reset()
func (*DryUplinkMessage) Size ¶
func (m *DryUplinkMessage) Size() (n int)
func (*DryUplinkMessage) String ¶
func (m *DryUplinkMessage) String() string
func (*DryUplinkMessage) Unmarshal ¶
func (m *DryUplinkMessage) Unmarshal(dAtA []byte) error
type DryUplinkResult ¶
type DryUplinkResult struct { // The binary payload Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // The decoded fields Fields string `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` // Was validation of the message successful Valid bool `protobuf:"varint,3,opt,name=valid,proto3" json:"valid,omitempty"` // Logs that have been generated while processing Logs []*LogEntry `protobuf:"bytes,4,rep,name=logs" json:"logs,omitempty"` }
DryUplinkResult is the result from an uplink simulation
func (*DryUplinkResult) Descriptor ¶
func (*DryUplinkResult) Descriptor() ([]byte, []int)
func (*DryUplinkResult) GetFields ¶
func (m *DryUplinkResult) GetFields() string
func (*DryUplinkResult) GetLogs ¶
func (m *DryUplinkResult) GetLogs() []*LogEntry
func (*DryUplinkResult) GetPayload ¶
func (m *DryUplinkResult) GetPayload() []byte
func (*DryUplinkResult) GetValid ¶
func (m *DryUplinkResult) GetValid() bool
func (*DryUplinkResult) Marshal ¶
func (m *DryUplinkResult) Marshal() (dAtA []byte, err error)
func (*DryUplinkResult) ProtoMessage ¶
func (*DryUplinkResult) ProtoMessage()
func (*DryUplinkResult) Reset ¶
func (m *DryUplinkResult) Reset()
func (*DryUplinkResult) Size ¶
func (m *DryUplinkResult) Size() (n int)
func (*DryUplinkResult) String ¶
func (m *DryUplinkResult) String() string
func (*DryUplinkResult) Unmarshal ¶
func (m *DryUplinkResult) Unmarshal(dAtA []byte) error
type HandlerClient ¶
type HandlerClient interface { ActivationChallenge(ctx context.Context, in *broker.ActivationChallengeRequest, opts ...grpc.CallOption) (*broker.ActivationChallengeResponse, error) Activate(ctx context.Context, in *broker.DeduplicatedDeviceActivationRequest, opts ...grpc.CallOption) (*DeviceActivationResponse, error) }
func NewHandlerClient ¶
func NewHandlerClient(cc *grpc.ClientConn) HandlerClient
type HandlerManagerClient ¶
type HandlerManagerClient interface {
GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Status, error)
}
func NewHandlerManagerClient ¶
func NewHandlerManagerClient(cc *grpc.ClientConn) HandlerManagerClient
type HandlerManagerServer ¶
type HandlerManagerServer interface {
GetStatus(context.Context, *StatusRequest) (*Status, error)
}
type HandlerServer ¶
type HandlerServer interface { ActivationChallenge(context.Context, *broker.ActivationChallengeRequest) (*broker.ActivationChallengeResponse, error) Activate(context.Context, *broker.DeduplicatedDeviceActivationRequest) (*DeviceActivationResponse, error) }
type LogEntry ¶
type LogEntry struct { // The location where the log was created (what payload function) Function string `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` // A list of JSON-encoded fields that were logged Fields []string `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"` }
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetFunction ¶
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
type ManagerClient ¶
ManagerClient is used to manage applications and devices on a handler
func NewManagerClient ¶
func NewManagerClient(conn *grpc.ClientConn, accessToken string) (*ManagerClient, error)
NewManagerClient returns a new ManagerClient for a handler on the given conn that accepts the given access token
func (*ManagerClient) DeleteApplication ¶
func (h *ManagerClient) DeleteApplication(appID string) error
DeleteApplication deletes an application and all its devices from the Handler
func (*ManagerClient) DeleteDevice ¶
func (h *ManagerClient) DeleteDevice(appID string, devID string) error
DeleteDevice deletes a device from the Handler
func (*ManagerClient) DryDownlinkWithFields ¶
func (h *ManagerClient) DryDownlinkWithFields(fields map[string]interface{}, app *Application, port uint32) (*DryDownlinkResult, error)
DryDownlinkWithFields transforms the downlink fields with the payload functions provided in app.
func (*ManagerClient) DryDownlinkWithPayload ¶
func (h *ManagerClient) DryDownlinkWithPayload(payload []byte, app *Application, port uint32) (*DryDownlinkResult, error)
DryDownlinkWithPayload transforms the downlink payload with the payload functions provided in app.
func (*ManagerClient) DryUplink ¶
func (h *ManagerClient) DryUplink(payload []byte, app *Application, port uint32) (*DryUplinkResult, error)
DryUplink transforms the uplink payload with the payload functions provided in the app..
func (*ManagerClient) GetApplication ¶
func (h *ManagerClient) GetApplication(appID string) (*Application, error)
GetApplication retrieves an application from the Handler
func (*ManagerClient) GetContext ¶
func (h *ManagerClient) GetContext() context.Context
GetContext returns a new context with authentication
func (*ManagerClient) GetContextWithLimitAndOffset ¶
func (h *ManagerClient) GetContextWithLimitAndOffset(limit, offset int) context.Context
GetContext returns a new context with authentication, plus limit and offset for pagination
func (*ManagerClient) GetDevAddr ¶
func (h *ManagerClient) GetDevAddr(constraints ...string) (types.DevAddr, error)
GetDevAddr requests a random device address with the given constraints
func (*ManagerClient) GetDevice ¶
func (h *ManagerClient) GetDevice(appID string, devID string) (*Device, error)
GetDevice retrieves a device from the Handler
func (*ManagerClient) GetDevicesForApplication ¶
func (h *ManagerClient) GetDevicesForApplication(appID string, limit, offset int) (devices []*Device, err error)
GetDevicesForApplication retrieves all devices for an application from the Handler. Pass a limit to indicate the maximum number of results you want to receive, and the offset to indicate how many results should be skipped.
func (*ManagerClient) RegisterApplication ¶
func (h *ManagerClient) RegisterApplication(appID string) error
RegisterApplication registers an application on the Handler
func (*ManagerClient) SetApplication ¶
func (h *ManagerClient) SetApplication(in *Application) error
SetApplication sets an application on the Handler
func (*ManagerClient) SetDevice ¶
func (h *ManagerClient) SetDevice(in *Device) error
SetDevice sets a device on the Handler
func (*ManagerClient) SetID ¶
func (h *ManagerClient) SetID(id string)
SetID sets the ID of this client
func (*ManagerClient) SimulateUplink ¶
func (h *ManagerClient) SimulateUplink(appID string, devID string, port uint32, payload []byte) error
SimulateUplink simulates an uplink message
func (*ManagerClient) UpdateAccessToken ¶
func (h *ManagerClient) UpdateAccessToken(accessToken string)
UpdateAccessToken updates the access token that is used for running commands
type SimulatedUplinkMessage ¶
type SimulatedUplinkMessage struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` DevId string `protobuf:"bytes,2,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"` // The binary payload to use Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // The port number Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` }
SimulatedUplinkMessage is a simulated uplink message
func (*SimulatedUplinkMessage) Descriptor ¶
func (*SimulatedUplinkMessage) Descriptor() ([]byte, []int)
func (*SimulatedUplinkMessage) GetAppId ¶
func (m *SimulatedUplinkMessage) GetAppId() string
func (*SimulatedUplinkMessage) GetDevId ¶
func (m *SimulatedUplinkMessage) GetDevId() string
func (*SimulatedUplinkMessage) GetPayload ¶
func (m *SimulatedUplinkMessage) GetPayload() []byte
func (*SimulatedUplinkMessage) GetPort ¶
func (m *SimulatedUplinkMessage) GetPort() uint32
func (*SimulatedUplinkMessage) Marshal ¶
func (m *SimulatedUplinkMessage) Marshal() (dAtA []byte, err error)
func (*SimulatedUplinkMessage) MarshalTo ¶
func (m *SimulatedUplinkMessage) MarshalTo(dAtA []byte) (int, error)
func (*SimulatedUplinkMessage) ProtoMessage ¶
func (*SimulatedUplinkMessage) ProtoMessage()
func (*SimulatedUplinkMessage) Reset ¶
func (m *SimulatedUplinkMessage) Reset()
func (*SimulatedUplinkMessage) Size ¶
func (m *SimulatedUplinkMessage) Size() (n int)
func (*SimulatedUplinkMessage) String ¶
func (m *SimulatedUplinkMessage) String() string
func (*SimulatedUplinkMessage) Unmarshal ¶
func (m *SimulatedUplinkMessage) Unmarshal(dAtA []byte) error
func (*SimulatedUplinkMessage) Validate ¶
func (m *SimulatedUplinkMessage) Validate() error
Validate implements the api.Validator interface
type Status ¶
type Status struct { System *api.SystemStats `protobuf:"bytes,1,opt,name=system" json:"system,omitempty"` Component *api.ComponentStats `protobuf:"bytes,2,opt,name=component" json:"component,omitempty"` Uplink *api.Rates `protobuf:"bytes,11,opt,name=uplink" json:"uplink,omitempty"` Downlink *api.Rates `protobuf:"bytes,12,opt,name=downlink" json:"downlink,omitempty"` Activations *api.Rates `protobuf:"bytes,13,opt,name=activations" json:"activations,omitempty"` }
message Status is the response to the StatusRequest
func (*Status) Descriptor ¶
func (*Status) GetActivations ¶
func (*Status) GetComponent ¶
func (m *Status) GetComponent() *api.ComponentStats
func (*Status) GetDownlink ¶
func (*Status) GetSystem ¶
func (m *Status) GetSystem() *api.SystemStats
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
type StatusRequest ¶
type StatusRequest struct { }
message StatusRequest is used to request the status of this Handler
func (*StatusRequest) Descriptor ¶
func (*StatusRequest) Descriptor() ([]byte, []int)
func (*StatusRequest) Marshal ¶
func (m *StatusRequest) Marshal() (dAtA []byte, err error)
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) Reset ¶
func (m *StatusRequest) Reset()
func (*StatusRequest) Size ¶
func (m *StatusRequest) Size() (n int)
func (*StatusRequest) String ¶
func (m *StatusRequest) String() string
func (*StatusRequest) Unmarshal ¶
func (m *StatusRequest) Unmarshal(dAtA []byte) error