utils

package
v0.0.0-...-38f52fd Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogInfo = iota
	LogWarn
	LogError
)

Log types

Variables

This section is empty.

Functions

func HTTPGetData

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

HTTPGetData 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

func (*Configs) SaveToFile

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

SaveToFile Save configs to file

type Log

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

Log Logger struct

func NewLog

func NewLog() *Log

NewLog make new struct

func (*Log) Error

func (l *Log) Error(module string, msg string, err string) error

Error Error log message

func (*Log) Info

func (l *Log) Info(module string, msg string) error

Info Information log message

func (*Log) LogMessage

func (l *Log) LogMessage(module string, msg string, error string, logType int) error

LogMessage log save message

func (*Log) SetPath

func (l *Log) SetPath(path string)

SetPath Set log path

func (*Log) TodayMessages

func (l *Log) TodayMessages() ([]string, error)

TodayMessages get today messages

Jump to

Keyboard shortcuts

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