handler

package
v2.2.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 27 Imported by: 0

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
	LogEntry
	DryUplinkResult
	DryDownlinkResult

Package handler is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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) MarshalTo

func (m *Application) MarshalTo(dAtA []byte) (int, 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 an uplink message and returns the result
	DryDownlink(ctx context.Context, in *DryDownlinkMessage, opts ...grpc.CallOption) (*DryDownlinkResult, error)
	// DryUplink simulates processing a downlink message and returns the result
	DryUplink(ctx context.Context, in *DryUplinkMessage, opts ...grpc.CallOption) (*DryUplinkResult, 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 an uplink message and returns the result
	DryDownlink(context.Context, *DryDownlinkMessage) (*DryDownlinkResult, error)
	// DryUplink simulates processing a downlink message and returns the result
	DryUplink(context.Context, *DryUplinkMessage) (*DryUplinkResult, 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"`
}

The Device settings

func (*Device) Descriptor

func (*Device) Descriptor() ([]byte, []int)

func (*Device) GetAltitude

func (m *Device) GetAltitude() int32

func (*Device) GetAppId

func (m *Device) GetAppId() string

func (*Device) GetDevId

func (m *Device) GetDevId() string

func (*Device) GetDevice

func (m *Device) GetDevice() isDevice_Device

func (*Device) GetLatitude

func (m *Device) GetLatitude() float32

func (*Device) GetLongitude

func (m *Device) GetLongitude() float32

func (*Device) GetLorawanDevice

func (m *Device) GetLorawanDevice() *lorawan1.Device

func (*Device) Marshal

func (m *Device) Marshal() (dAtA []byte, err error)

func (*Device) MarshalTo

func (m *Device) MarshalTo(dAtA []byte) (int, error)

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) Size

func (m *Device) Size() (n int)

func (*Device) String

func (m *Device) String() string

func (*Device) Unmarshal

func (m *Device) Unmarshal(dAtA []byte) error

func (*Device) Validate

func (m *Device) Validate() error

Validate implements the api.Validator interface

func (*Device) XXX_OneofFuncs

func (*Device) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

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) MarshalTo

func (m *DeviceIdentifier) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *DeviceList) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *DryUplinkMessage) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *DryUplinkResult) MarshalTo(dAtA []byte) (int, 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 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 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) Descriptor() ([]byte, []int)

func (*LogEntry) GetFields

func (m *LogEntry) GetFields() []string

func (*LogEntry) GetFunction

func (m *LogEntry) GetFunction() string

func (*LogEntry) Marshal

func (m *LogEntry) Marshal() (dAtA []byte, err error)

func (*LogEntry) MarshalTo

func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) Size

func (m *LogEntry) Size() (n int)

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) Unmarshal

func (m *LogEntry) Unmarshal(dAtA []byte) error

type ManagerClient

type ManagerClient struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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) Close

func (h *ManagerClient) Close() error

Close closes the client

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 (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) 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) (devices []*Device, err error)

GetDevicesForApplication retrieves all devices for an application from the Handler

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) UpdateAccessToken

func (h *ManagerClient) UpdateAccessToken(accessToken string)

UpdateAccessToken updates the access token that is used for running commands

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) Descriptor() ([]byte, []int)

func (*Status) GetActivations

func (m *Status) GetActivations() *api.Rates

func (*Status) GetComponent

func (m *Status) GetComponent() *api.ComponentStats
func (m *Status) GetDownlink() *api.Rates

func (*Status) GetSystem

func (m *Status) GetSystem() *api.SystemStats
func (m *Status) GetUplink() *api.Rates

func (*Status) Marshal

func (m *Status) Marshal() (dAtA []byte, err error)

func (*Status) MarshalTo

func (m *Status) MarshalTo(dAtA []byte) (int, error)

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) Size

func (m *Status) Size() (n int)

func (*Status) String

func (m *Status) String() string

func (*Status) Unmarshal

func (m *Status) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *StatusRequest) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL