Documentation ¶
Overview ¶
Package restapi contains the REST API implementation for the LoRa Core server.
The most relevant endpoints are as follows (GET and POST methods are supported):
/applications /applications/{EUI}/devices /applications/{EUI}/devices/{EUI} /gateways
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromUnixMillis ¶
FromUnixMillis converts a millisecond timestamp into nanosecond timestamp. Note that this assumes that time.Nanosecond = 1 (which it is)
func ToUnixMillis ¶
ToUnixMillis converts a nanosecond timestamp into a millisecond timestamp. the general assumption is that time.Nanosecond = 1 (which it is)
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a type capable of serving the REST API for Congress. It can be started and dhut down only once reliably since the port lingers. There is no check if the server is running so calling Start() twice will result in errors
func NewServer ¶
func NewServer(loopbackOnly bool, scontext *server.Context, config *server.Configuration) (*Server, error)
NewServer returns a new server instance. if the port is set to 0 it will pick a random port. If loopbackOnly is true only the loopback adapter will be used.