Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolValue(v *bool) bool
- 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 Float32(v float32) *float32
- func Float32Value(v *float32) float32
- 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 IsRunningInDockerContainer() bool
- 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 Rounding32(num float64, k uint) float32
- func SetField(obj interface{}, name string, value interface{}) error
- func SetFields(obj interface{}, params map[string]interface{}) (err error)
- func StaticPath() string
- 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
- type AttributeType
- type ConditionType
- type CopyEngine
- type EntityHistoryType
- type EntityId
- type GinEngine
- type LogLevel
- type MetricRange
- type MetricType
- type PageParams
- type RunMode
- type ScriptLang
- type SearchParams
- 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 ( // 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 ( MetricRange6H = MetricRange("6h") MetricRange12H = MetricRange("12h") MetricRange24H = MetricRange("24h") MetricRange7d = MetricRange("7d") MetricRange30d = MetricRange("30d") MetricRange1m = MetricRange("1m") )
View Source
const ( // AttributeString ... AttributeString = AttributeType("string") // AttributeInt ... AttributeInt = AttributeType("int") // AttributeTime ... AttributeTime = AttributeType("time") // AttributeBool ... AttributeBool = AttributeType("bool") // AttributeFloat ... AttributeFloat = AttributeType("float") // AttributeImage ... AttributeImage = AttributeType("image") // AttributeIcon ... AttributeIcon = AttributeType("icon") // AttributePoint ... AttributePoint = AttributeType("point") // AttributeEncrypted ... AttributeEncrypted = AttributeType("encrypted") //DEPRECATED AttributeArray = AttributeType("array") //DEPRECATED AttributeMap = AttributeType("map") AttributeNotice = AttributeType("notice") )
View Source
const ( // ConditionOr ... ConditionOr = ConditionType("or") // ConditionAnd ... ConditionAnd = ConditionType("and") )
View Source
const ( // DebugMode ... DebugMode = RunMode("debug") // ReleaseMode ... ReleaseMode = RunMode("release") // DemoMode DemoMode = RunMode("demo") )
View Source
const DefaultPageSize int64 = 15
DefaultPageSize ...
Variables ¶
This section is empty.
Functions ¶
func IsRunningInDockerContainer ¶ added in v0.13.0
func IsRunningInDockerContainer() bool
func ParseHmacToken ¶
ParseHmacToken ...
Types ¶
type EntityId ¶ added in v0.5.0
type EntityId string
EntityId ...
func NewEntityIdFromPtr ¶ added in v0.11.0
NewEntityIdFromPtr ...
type MetricRange ¶ added in v0.7.0
type MetricRange string
func (MetricRange) Ptr ¶ added in v0.12.0
func (m MetricRange) Ptr() *MetricRange
func (MetricRange) String ¶ added in v0.7.0
func (m MetricRange) String() string
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"` PageReq int64 SortReq string }
PageParams ...
type SearchParams ¶ added in v0.5.2
type SearchParams struct { Query string `json:"query" validate:"required,min=1,max;255"` Limit int64 `json:"limit" validate:"required,gte=1,lte=1000"` Offset int64 `json:"offset" validate:"required,gte=0,lte=1000"` }
SearchParams ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.