utils

package
v0.0.0-...-1ae953c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPDownloadFile

func HTTPDownloadFile(ip string, request string, fileName string, timeout int) error

HTTPDownloadFile get file from web

func HTTPGetData

func HTTPGetData(host string, request string, timeout int, response interface{}) error

HTTPGetData get data from micro controllers

func HTTPSyncData

func HTTPSyncData(ip string, timeout int, request string, response interface{}) error

HTTPSyncData get data from micro controllers

Types

type Configs

type Configs struct {
}

Configs App configs

func NewConfigs

func NewConfigs() *Configs

NewConfigs make new struct

func (*Configs) LoadFromFile

func (c *Configs) LoadFromFile(settings interface{}, fileName string) error

LoadFromFile Loading configs from file

type Log

type Log struct {
	// contains filtered or unexported fields
}

Log Logger struct

func NewLogger

func NewLogger() *Log

NewLogger make new struct

func (*Log) Error

func (l *Log) Error(module string, message string, errMsg string)

Error error level log message

func (*Log) Info

func (l *Log) Info(module string, message string)

Info information level log message

func (*Log) SetLogSettings

func (l *Log) SetLogSettings(ip string, port int, service string)

SetLogSettings set log settings

func (*Log) Warn

func (l *Log) Warn(module string, message string)

Warn information level log message

Jump to

Keyboard shortcuts

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