Documentation ¶
Index ¶
- Constants
- Variables
- func CheckPasswordHash(password, hash string) bool
- func ComputeHmac256() string
- func Copy(to, from interface{}, params ...CopyEngine) (err error)
- func CopyFile(f, t string)
- func Dir() string
- func FileExist(path string) (exist bool)
- func FormatSourceCode(filename string)
- func GetFileSize(name string) (int64, error)
- func GetFullPath(name string) string
- func GetLinkPath(name string) string
- func HashPassword(password string) (string, error)
- func Int(v int) *int
- func Int64(v int64) *int64
- func Int64Value(v *int64) int64
- func IntValue(v *int) int
- func ParseHmacToken(tokenString string, key []byte) (jwt.MapClaims, error)
- func RandInt(min int, max int) int
- func RandStr(strSize int, dictionary string) string
- func RandomString(l int) string
- func Rounding(num float64, k uint) float64
- func Start(app *fx.App)
- func StaticPath() string
- func Stop(app *fx.App)
- func StoragePath() string
- func String(v string) *string
- func StringValue(v *string) string
- func Strtomd5(s string) string
- func TestMode() bool
- func Time(v time.Time) *time.Time
- func TimeValue(v *time.Time) time.Time
- func Work()
- type AttributeType
- type ConditionType
- type CopyEngine
- type EntityHistoryType
- type EntityId
- type EntityType
- type GinEngine
- type Icon
- type LogLevel
- type Logger
- func (l *Logger) Debug(format string, args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(format string, args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(format string, args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(format string, args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Warn(format string, args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- type MapElementPrototypeId
- type MapElementPrototypeType
- type MetricType
- type PageParams
- type PluginInfo
- type PluginManager
- type RunMode
- type ScriptLang
- type StatusType
Constants ¶
View Source
const ( // Alphanum ... Alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" // Alpha ... Alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" // Number ... Number = "0123456789" )
View Source
const ( // JsonEngine ... JsonEngine = CopyEngine("json") // GobEngine ... GobEngine = CopyEngine("gob") // GojayEngine ... GojayEngine = CopyEngine("gojay") )
View Source
const ( // ScriptLangTs ... ScriptLangTs = ScriptLang("ts") // ScriptLangCoffee ... ScriptLangCoffee = ScriptLang("coffeescript") // ScriptLangJavascript ... ScriptLangJavascript = ScriptLang("javascript") )
View Source
const ( // Enabled ... Enabled = StatusType("enabled") // Disabled ... Disabled = StatusType("disabled") // Frozen ... Frozen = StatusType("frozen") )
View Source
const ( // MapElementPrototypeText ... MapElementPrototypeText = MapElementPrototypeType("text") // MapElementPrototypeImage ... MapElementPrototypeImage = MapElementPrototypeType("image") // MapElementPrototypeEntity ... MapElementPrototypeEntity = MapElementPrototypeType("entity") // MapElementPrototypeEmpty ... MapElementPrototypeEmpty = MapElementPrototypeType("") )
View Source
const ( // LogLevelEmergency ... LogLevelEmergency = LogLevel("Emergency") // LogLevelAlert ... LogLevelAlert = LogLevel("Alert") // LogLevelCritical ... LogLevelCritical = LogLevel("Critical") // LogLevelError ... LogLevelError = LogLevel("Error") // LogLevelWarning ... LogLevelWarning = LogLevel("Warning") // LogLevelNotice ... LogLevelNotice = LogLevel("Notice") // LogLevelInfo ... LogLevelInfo = LogLevel("Info") // LogLevelDebug ... LogLevelDebug = LogLevel("Debug") )
View Source
const ( // EntityHistoryState ... EntityHistoryState = EntityHistoryType("state") // EntityHistoryOption ... EntityHistoryOption = EntityHistoryType("option") )
View Source
const ( // MetricTypeLine ... MetricTypeLine = MetricType("line") // MetricTypeBar ... MetricTypeBar = MetricType("bar") // MetricTypeDoughnut ... MetricTypeDoughnut = MetricType("doughnut") // MetricTypeRadar ... MetricTypeRadar = MetricType("radar") // MetricTypePie ... MetricTypePie = MetricType("pie") // MetricTypeHorizontalBar ... MetricTypeHorizontalBar = MetricType("horizontal bar") )
View Source
const ( // AttributeString ... AttributeString = AttributeType("string") // AttributeInt ... AttributeInt = AttributeType("int") // AttributeTime ... AttributeTime = AttributeType("time") // AttributeBool ... AttributeBool = AttributeType("bool") // AttributeFloat ... AttributeFloat = AttributeType("float") //DEPRECATED AttributeArray = AttributeType("array") // AttributeMap ... AttributeMap = AttributeType("map") )
View Source
const ( // ConditionOr ... ConditionOr = ConditionType("or") // ConditionAnd ... ConditionAnd = ConditionType("and") )
View Source
const ( // DebugMode ... DebugMode = RunMode("debug") // ReleaseMode ... ReleaseMode = RunMode("release") )
View Source
const DefaultPageSize int64 = 15
DefaultPageSize ...
Variables ¶
View Source
var ( // ErrInternal ... ErrInternal = errors.New("internal error") // ErrNotFound ... ErrNotFound = errors.New("not found") // ErrPassNotValid ... ErrPassNotValid = errors.New("password not valid") // ErrAccountIsBlocked ... ErrAccountIsBlocked = errors.New("account is blocked") // ErrNotAuthorized ... ErrNotAuthorized = errors.New("not authorized") // ErrMqttServerNoWorked ... ErrMqttServerNoWorked = errors.New("mqtt server not worked") )
Functions ¶
func ParseHmacToken ¶
ParseHmacToken ...
Types ¶
type Logger ¶ added in v0.1.3
type Logger struct {
// contains filtered or unexported fields
}
Logger ...
type MapElementPrototypeId ¶ added in v0.5.0
type MapElementPrototypeId interface{}
MapElementPrototypeId ...
type MapElementPrototypeType ¶ added in v0.5.0
type MapElementPrototypeType string
MapElementPrototypeType ...
type PageParams ¶ added in v0.5.1
type PageParams struct { Limit int64 `json:"limit" validate:"required,gte=1,lte=1000"` Offset int64 `json:"offset" validate:"required,gte=0,lte=1000"` Order string `json:"order" validate:"required,oneof=created_at"` SortBy string `json:"sort_by" validate:"required,oneof=desc asc"` }
PageParams ...
type PluginInfo ¶ added in v0.5.0
type PluginInfo struct { Name string `json:"name"` Version string `json:"version"` Enabled bool `json:"enabled"` System bool `json:"system"` }
PluginInfo ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.