Documentation ¶
Index ¶
- Constants
- Variables
- func Get(m map[string]interface{}, path string) interface{}
- func GetMap(m map[string]interface{}, path string) map[string]interface{}
- func GetString(m map[string]interface{}, path string) string
- 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 IsMap[T any](val interface{}) (response map[string]T, ok bool)
- func IsMapValue(val interface{}) (bool, reflect.Value)
- 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 Quote(v interface{}) string
- func ReadBytesFromFile(fileName string) ([]byte, error)
- func ReadTextFromFile(fileName string) (string, error)
- func Recover(args ...interface{})
- func String(val interface{}) string
- func Stringify(entity interface{}) string
- 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
- type ILogger
- type IName
- type ISerializable
- type ModelDataWrapper
- func (instance *ModelDataWrapper) Data(values ...interface{}) (response map[string]interface{})
- 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) 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 LibVersion = "0.2.59"
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 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 ReadBytesFromFile ¶ added in v0.2.59
func ReadTextFromFile ¶ added in v0.2.59
func UnmarshalFromFile ¶ added in v0.2.59
func UnmarshalFromString ¶ added in v0.2.59
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) 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) 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.