Documentation ¶
Index ¶
- Constants
- Variables
- func Bool(val interface{}, def bool) bool
- func Bytes(val interface{}) (response []byte)
- func Float32(val interface{}, def float32) float32
- func Float64(val interface{}, def float64) float64
- func Get(object interface{}, path string) (response interface{})
- func GetAt(array interface{}, index int, defValue interface{}) (response interface{})
- func GetBool(object interface{}, path string) bool
- func GetBytes(object interface{}, path string) []byte
- func GetFloat32(object interface{}, path string) float32
- func GetFloat64(object interface{}, path string) float64
- func GetInt(object interface{}, path string) int
- func GetInt16(object interface{}, path string) int16
- func GetInt32(object interface{}, path string) int32
- func GetInt64(object interface{}, path string) int64
- func GetInt8(object interface{}, path string) int8
- func GetMap(object interface{}, path string) map[string]interface{}
- func GetString(object interface{}, path string) string
- func GetUint(object interface{}, path string) uint
- func GetUint16(object interface{}, path string) uint16
- func GetUint32(object interface{}, path string) uint32
- func GetUint64(object interface{}, path string) uint64
- func GetUint8(object interface{}, path string) uint8
- func Int(val interface{}, def int) int
- func Int16(val interface{}, def int16) int16
- func Int32(val interface{}, def int32) int32
- func Int64(val interface{}, def int64) int64
- func Int8(val interface{}, def int8) int8
- func IsArray[T any](val interface{}) (response []T, ok bool)
- func IsArrayValue(val interface{}) (bool, reflect.Value)
- func IsArrayValueNotEmpty(array interface{}) (bool, reflect.Value)
- func IsHTML(text string) bool
- func IsMap[T any](val interface{}) (response map[string]T, ok bool)
- func IsMapValue(val interface{}) (bool, reflect.Value)
- func IsPath(path string) bool
- func IsString(val interface{}) (response string, ok bool)
- func IsStringValue(val interface{}) (bool, reflect.Value)
- func IsStructValue(val interface{}) (bool, reflect.Value)
- func IsValidJson(text string) bool
- func IsValidJsonArray(text string) bool
- func IsValidJsonObject(text string) bool
- func Map(val interface{}) (response map[string]interface{})
- func Marshal(entity interface{}) []byte
- func MatchBetween(text string, offset int, patternStart string, patternEnd string, cutset string) []string
- func Merge(override bool, context ...interface{}) (response map[string]interface{})
- func Number(s string, def interface{}) interface{}
- func PathExists(path string) (bool, error)
- func Quote(v interface{}) string
- func ReadBytesFromFile(fileName string) ([]byte, error)
- func ReadTextFromFile(fileName string) (string, error)
- func Recover(args ...interface{})
- func RegexpMatchBetween(text string, offset int, patternStart *regexp.Regexp, ...) []string
- func RegexpMatchIndex(text string, regex *regexp.Regexp) [][]int
- func String(val interface{}) string
- func Stringify(entity interface{}) string
- func Sub(s string, start int, end int) string
- func Uint(val interface{}, def uint) uint
- func Uint16(val interface{}, def uint16) uint16
- func Uint32(val interface{}, def uint32) uint32
- func Uint64(val interface{}, def uint64) uint64
- func Uint8(val interface{}, def uint8) uint8
- func Unmarshal(input interface{}, entity interface{}) (err error)
- func UnmarshalFromFile(fileName string, entity interface{}) error
- func UnmarshalFromString(s string, entity interface{}) (err error)
- func ValueOf(item interface{}) reflect.Value
- func WriteBytesToFile(data []byte, file string, append bool) (bytes int, err error)
- func WriteTextToFile(text, file string, append bool) (bytes int, err error)
- type ILogger
- type IName
- type ISerializable
- type ModelDataWrapper
- func (instance *ModelDataWrapper) Data(values ...interface{}) (response map[string]interface{})
- func (instance *ModelDataWrapper) DataJSON() (response []string)
- func (instance *ModelDataWrapper) DataObjects() (response []map[string]interface{})
- func (instance *ModelDataWrapper) DataString() (response []string)
- func (instance *ModelDataWrapper) Error() error
- func (instance *ModelDataWrapper) HasError() bool
- func (instance *ModelDataWrapper) Map() map[string]interface{}
- func (instance *ModelDataWrapper) Reload(values ...interface{}) *ModelDataWrapper
- func (instance *ModelDataWrapper) SaveToFile(filename string) (err error)
- func (instance *ModelDataWrapper) Source() (response []interface{})
- func (instance *ModelDataWrapper) String() string
Constants ¶
View Source
const ( EventOnStartApp = "on_start_app" EventOnCloseApp = "on_close_app" )
View Source
const ( ModeProduction = "production" ModeDebug = "debug" )
View Source
const DEF_TEMP = "./_temp"
View Source
const LibVersion = "0.2.69"
View Source
const OS_PATH_SEPARATOR = string(os.PathSeparator)
Variables ¶
View Source
var AppName = "New Application"
View Source
var AppSalt = "this-is-token-to-encrypt"
View Source
var AppVersion = "0.1.0" // change this for a global AppName variable
View Source
var PanicSystemError = errors.New("panic_system_error")
Functions ¶
func GetAt ¶ added in v0.2.61
func GetAt(array interface{}, index int, defValue interface{}) (response interface{})
func GetFloat32 ¶ added in v0.2.61
func GetFloat64 ¶ added in v0.2.61
func IsArrayValue ¶ added in v0.2.60
func IsArrayValueNotEmpty ¶ added in v0.2.60
func IsMapValue ¶ added in v0.2.60
func IsStringValue ¶ added in v0.2.60
func IsStructValue ¶ added in v0.2.60
func IsValidJson ¶ added in v0.2.59
func IsValidJsonArray ¶ added in v0.2.59
func IsValidJsonObject ¶ added in v0.2.59
func MatchBetween ¶ added in v0.2.61
func PathExists ¶ added in v0.2.62
PathExists Check if a path exists and returns a boolean value or an error if access is denied @param "path" the Path to check
func ReadBytesFromFile ¶ added in v0.2.59
func ReadTextFromFile ¶ added in v0.2.59
func RegexpMatchBetween ¶ added in v0.2.61
func RegexpMatchIndex ¶ added in v0.2.61
func Sub ¶ added in v0.2.61
Sub get a substring @param s string The string @param start int Start index @param end int End index
func UnmarshalFromFile ¶ added in v0.2.59
func UnmarshalFromString ¶ added in v0.2.59
func WriteBytesToFile ¶ added in v0.2.62
Types ¶
type ILogger ¶
type ILogger interface { Panic(args ...interface{}) Error(args ...interface{}) Warn(args ...interface{}) Info(args ...interface{}) Debug(args ...interface{}) Trace(args ...interface{}) }
type ISerializable ¶ added in v0.2.59
type ModelDataWrapper ¶ added in v0.2.60
type ModelDataWrapper struct { Uid string `json:"uid"` Group string `json:"group"` Name string `json:"name"` Description string `json:"description"` Payload map[string]interface{} `json:"payload"` // contains filtered or unexported fields }
ModelDataWrapper is a serializable object useful for data transport
func NewDataWrapper ¶ added in v0.2.60
func NewDataWrapper(data ...interface{}) (instance *ModelDataWrapper)
func (*ModelDataWrapper) Data ¶ added in v0.2.60
func (instance *ModelDataWrapper) Data(values ...interface{}) (response map[string]interface{})
func (*ModelDataWrapper) DataJSON ¶ added in v0.2.62
func (instance *ModelDataWrapper) DataJSON() (response []string)
DataJSON return wrapped data as an array of JSON "stringify" objects
func (*ModelDataWrapper) DataObjects ¶ added in v0.2.62
func (instance *ModelDataWrapper) DataObjects() (response []map[string]interface{})
DataObjects return wrapped data as an array of Map objects
func (*ModelDataWrapper) DataString ¶ added in v0.2.62
func (instance *ModelDataWrapper) DataString() (response []string)
DataString return wrapped data as an array of JSON "quoted string" objects
func (*ModelDataWrapper) Error ¶ added in v0.2.60
func (instance *ModelDataWrapper) Error() error
func (*ModelDataWrapper) HasError ¶ added in v0.2.60
func (instance *ModelDataWrapper) HasError() bool
func (*ModelDataWrapper) Map ¶ added in v0.2.60
func (instance *ModelDataWrapper) Map() map[string]interface{}
func (*ModelDataWrapper) Reload ¶ added in v0.2.60
func (instance *ModelDataWrapper) Reload(values ...interface{}) *ModelDataWrapper
func (*ModelDataWrapper) SaveToFile ¶ added in v0.2.62
func (instance *ModelDataWrapper) SaveToFile(filename string) (err error)
func (*ModelDataWrapper) Source ¶ added in v0.2.60
func (instance *ModelDataWrapper) Source() (response []interface{})
Source return original data
func (*ModelDataWrapper) String ¶ added in v0.2.60
func (instance *ModelDataWrapper) String() string
Click to show internal directories.
Click to hide internal directories.