Documentation ¶
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func NewCborHandle() *codec.CborHandle
- func RandStringBytes(n int) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func SetUpLogger()
- func ValidateJson(schemaName string, request string) error
- type Code
- type LogLevel
- type Type
Constants ¶
const ( DEFAULT_CLIENT_SOCKET_FILE = "/tmp/dots_client.sock" DEFAULT_SIGNAL_CHANNEL_PORT = 4646 DEFAULT_DATA_CHANNEL_PORT = 4647 DEFAULT_SIGNAL_MITIGATE_LIFETIME = 3600 )
const ( IPV4_HOST_PREFIX_LEN = "/32" IPV6_HOST_PREFIX_LEN = "/128" )
const SCHEMA_DIR string = "schemas"
const (
SERVICE_WORKER_QUEUE_SIZE = 10
)
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func NewCborHandle ¶
func NewCborHandle() *codec.CborHandle
func RandStringBytes ¶
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func SetUpLogger ¶
func SetUpLogger()
func ValidateJson ¶
* validate the Json strings.
Types ¶
type Code ¶
type Code uint8
*CoAP message codes.
const ( Created Code = 65 Deleted Code = 66 Valid Code = 67 Changed Code = 68 Content Code = 69 Limit2xxCode Code = 100 BadRequest Code = 128 BadOption Code = 130 Forbidden Code = 131 NotFound Code = 132 MethodNotAllowed Code = 133 NotAcceptable Code = 134 Conflict Code = 137 PreconditionFailed Code = 140 RequestEntityTooLarge Code = 141 UnsupportedMediaType Code = 143 UnprocessableEntity Code = 150 InternalServerError Code = 160 NotImplemented Code = 161 BadGateway Code = 162 GatewayTimeout Code = 164 ProxyingNotSupported Code = 165 )