Documentation ¶
Index ¶
- func Array(src interface{}) ([]interface{}, error)
- type Item
- func (s Item) Any(_default interface{}, atribs ...string) interface{}
- func (s Item) Array(atrib string) []interface{}
- func (s Item) ArrayInt(_default []int, atribs ...string) []int
- func (s Item) ArrayInt64(_default []int64, atribs ...string) []int64
- func (s Item) ArrayJson(_default []Json, atribs ...string) []Json
- func (s Item) ArrayStr(_default []string, atribs ...string) []string
- func (s Item) Bool(atribs ...string) bool
- func (s *Item) Delete(keys []string) bool
- func (s Item) ExistKey(key string) bool
- func (s Item) Get(key string) interface{}
- func (s Item) Id() string
- func (s Item) IdT() string
- func (s Item) Index() int
- func (s Item) Int(atribs ...string) int
- func (s Item) Int64(atribs ...string) int64
- func (s Item) Json(atrib string) Json
- func (s Item) Key(atribs ...string) string
- func (s Item) Num(atribs ...string) float64
- func (s *Item) Scan(src interface{}) error
- func (s *Item) ScanRows(rows *sql.Rows) error
- func (s *Item) Set(key string, val interface{})
- func (s Item) Str(atribs ...string) string
- func (s Item) Time(atribs ...string) time.Time
- func (s Item) ToByte() []byte
- func (s Item) ToJson() Json
- func (s Item) ToString() string
- func (s *Item) ValAny(_default interface{}, atribs ...string) interface{}
- func (s Item) ValArray(_default []interface{}, atribs ...string) []interface{}
- func (s *Item) ValBool(_default bool, atribs ...string) bool
- func (s *Item) ValInt(_default int, atribs ...string) int
- func (s Item) ValInt64(_default int64, atribs ...string) int64
- func (s *Item) ValJson(_default Json, atribs ...string) Json
- func (s *Item) ValNum(_default float64, atribs ...string) float64
- func (s *Item) ValStr(_default string, atribs ...string) string
- func (s *Item) ValTime(_default time.Time, atribs ...string) time.Time
- type Items
- func (s *Items) Any(idx int, _default interface{}, atribs ...string) interface{}
- func (s Items) Array(dx int, atrib string) []interface{}
- func (s Items) ArrayInt(dx int, _default []int, atribs ...string) []int
- func (s Items) ArrayInt64(dx int, _default []int64, atribs ...string) []int64
- func (s Items) ArrayJson(dx int, _default []Json, atribs ...string) []Json
- func (s Items) ArrayStr(dx int, _default []string, atribs ...string) []string
- func (s Items) Bool(dx int, atribs ...string) bool
- func (s *Items) Delete(dx int, keys []string) bool
- func (s Items) ExistKey(dx int, key string) bool
- func (s Items) Get(dx int, key string) interface{}
- func (s Items) Id(idx int) string
- func (s Items) IdT(dx int) string
- func (s Items) Index(dx int) int
- func (s Items) Int(dx int, atribs ...string) int
- func (s Items) Int64(dx int, atribs ...string) int64
- func (s Items) Json(dx int, atrib string) Json
- func (s Items) Key(dx int, atribs ...string) string
- func (s Items) Num(dx int, atribs ...string) float64
- func (s *Items) Scan(src interface{}) error
- func (s *Items) Set(dx int, key string, val interface{})
- func (s Items) Str(dx int, atribs ...string) string
- func (s Items) Time(dx int, atribs ...string) time.Time
- func (s Items) ToByte() []byte
- func (s Items) ToJson() Json
- func (s *Items) ToList(all, page, rows int) List
- func (s Items) ToString() string
- func (s *Items) ValAny(idx int, _default any, atribs ...string) interface{}
- func (s *Items) ValArray(idx int, _default []interface{}, atribs ...string) []interface{}
- func (s *Items) ValBool(idx int, _default bool, atribs ...string) bool
- func (s *Items) ValInt(idx int, _default int, atribs ...string) int
- func (s *Items) ValInt64(idx int64, _default int64, atribs ...string) int64
- func (s *Items) ValJson(idx int, _default Json, atribs ...string) Json
- func (s *Items) ValNum(idx int, _default float64, atribs ...string) float64
- func (s *Items) ValStr(idx int, _default string, atribs ...string) string
- func (s *Items) ValTime(idx int, _default time.Time, atribs ...string) time.Time
- type Json
- func (s Json) Any(_default interface{}, atribs ...string) interface{}
- func (s *Json) Append(from Json)
- func (s Json) Array(atrib string) []interface{}
- func (s Json) ArrayInt(_default []int, atribs ...string) []int
- func (s Json) ArrayInt64(_default []int64, atribs ...string) []int64
- func (s Json) ArrayJson(_default []Json, atribs ...string) []Json
- func (s Json) ArrayStr(_default []string, atribs ...string) []string
- func (s Json) Bool(atribs ...string) bool
- func (s Json) Clone() Json
- func (s *Json) Compare(from Json) Json
- func (s *Json) Delete(keys []string) bool
- func (s Json) ExistKey(key string) bool
- func (s Json) Get(key string) interface{}
- func (s Json) Id() string
- func (s Json) IdT() string
- func (s Json) Index() int
- func (s Json) Int(atribs ...string) int
- func (s Json) Int64(atribs ...string) int64
- func (s Json) IsEmpty() bool
- func (s Json) Json(atrib string) Json
- func (s Json) Key(atribs ...string) string
- func (s Json) Num(atribs ...string) float64
- func (s *Json) Scan(src interface{}) error
- func (s *Json) ScanRows(rows *sql.Rows) error
- func (s *Json) Set(key string, val interface{})
- func (s Json) Str(atribs ...string) string
- func (s Json) Time(atribs ...string) time.Time
- func (s Json) ToByte() []byte
- func (s Json) ToString() string
- func (s *Json) Update(from Json)
- func (s Json) ValAny(_default interface{}, atribs ...string) interface{}
- func (s Json) ValArray(_default []interface{}, atribs ...string) []interface{}
- func (s Json) ValBool(_default bool, atribs ...string) bool
- func (s Json) ValInt(_default int, atribs ...string) int
- func (s Json) ValInt64(_default int64, atribs ...string) int64
- func (s Json) ValJson(_default Json, atribs ...string) Json
- func (s Json) ValNum(_default float64, atribs ...string) float64
- func (s Json) ValStr(_default string, atribs ...string) string
- func (s Json) ValTime(_default time.Time, atribs ...string) time.Time
- type List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
Item struct to define a item
func ToItem ¶ added in v0.0.4
* * ToItem convert a json to a item * @param src interface{} * @return Item *
func (Item) Any ¶
* * Any return any value of the key * @param _default any * @param atribs ...string * @return *Any *
func (Item) ArrayInt ¶ added in v0.0.4
* * ArrayInt * @param _default []int * @param atribs ...string * @return []int *
func (Item) ArrayInt64 ¶ added in v0.0.4
* * ArrayInt64 * @param _default []int64 * @param atribs ...string * @return []int64 *
func (Item) ArrayJson ¶ added in v0.0.4
* * ArrayJson * @param _default []Json * @param atribs ...string * @return []Json *
func (Item) ArrayStr ¶
* * ArrayStr * @param _default []string * @param atribs ...string * @return []string *
func (*Item) Delete ¶ added in v0.0.4
* * Delete a value in the key * @param key string * @return bool *
func (Item) ExistKey ¶ added in v0.0.4
* * ExistKey return if the key exist * @param key string * @return bool *
func (Item) Int64 ¶ added in v0.0.4
* * Int64 return the value of the key * @param atribs ...string * @return int64 *
func (*Item) ScanRows ¶ added in v0.0.4
* * ScanRows load rows to a json * @param rows *sql.Rows * @return error *
func (*Item) Set ¶
* * Set a value in the key * @param key string * @param val interface{} * @return bool *
func (Item) Time ¶
* * Time return the value of the key * @param atribs ...string * @return time.Time *
func (*Item) ValAny ¶
* * ValAny return any value of the key * @param _default any * @param atribs ...string * @return any *
func (Item) ValArray ¶ added in v0.0.4
* * ValArray return []interface{} value of the key * @param _default []interface{} * @param atribs ...string * @return []interface{} *
func (*Item) ValBool ¶
* * ValBool return bool value of the key * @param _default bool * @param atribs ...string * @return bool *
func (*Item) ValInt ¶
* * ValInt return int value of the key * @param _default int * @param atribs ...string * @return int *
func (Item) ValInt64 ¶ added in v0.0.4
* * ValInt64 return int64 value of the key * @param _default int64 * @param atribs ...string * @return int64 *
func (*Item) ValJson ¶
* * ValJson return Json value of the key * @param _default Json * @param atribs ...string * @return Json *
func (*Item) ValNum ¶
* * ValNum return float64 value of the key * @param _default float64 * @param atribs ...string * @return float64 *
type Items ¶
Items struct to define a items
func (*Items) Any ¶ added in v0.0.4
* * Any return the value of the key * @param idx int * @param _default any * @param atribs ...string * @return any *
func (Items) Array ¶ added in v0.0.4
* * Array return the value of the key * @param atrib string * @return []Json *
func (Items) ArrayInt ¶ added in v0.0.4
* * ArrayInt * @param _default []int * @param atribs ...string * @return []int *
func (Items) ArrayInt64 ¶ added in v0.0.4
* * ArrayInt64 * @param _default []int64 * @param atribs ...string * @return []int64 *
func (Items) ArrayJson ¶ added in v0.0.4
* * ArrayJson * @param _default []Json * @param atribs ...string * @return []Json *
func (Items) ArrayStr ¶ added in v0.0.4
* * ArrayStr * @param _default []string * @param atribs ...string * @return []string *
func (*Items) Delete ¶ added in v0.0.4
* * Delete a value in the key * @param key string * @return bool *
func (Items) ExistKey ¶ added in v0.0.4
* * ExistKey return if the key exist * @param key string * @return bool *
func (Items) Int64 ¶ added in v0.0.4
* * Int64 return the value of the key * @param atribs ...string * @return int64 *
func (Items) Num ¶
* * Num return the value of the key * @param atribs ...string * @return float64 *
func (*Items) Set ¶
* * Set a value in the key * @param key string * @param val interface{} * @return bool *
func (Items) Time ¶ added in v0.0.4
* * Time return the value of the key * @param atribs ...string * @return time.Time *
func (*Items) ToList ¶
* * ToList return the value type List * @param all int * @param page int * @param rows int * @return List *
func (*Items) ValAny ¶
* * ValAny return the value of the key * @param idx int * @param _default any * @param atribs ...string * @return any *
func (*Items) ValArray ¶ added in v0.0.4
* * ValArray return the value of the key * @param idx int * @param _default []interface{} * @param atribs ...string * @return []interface{} *
func (*Items) ValBool ¶ added in v0.0.4
* * ValBool return bool value of the key * @param idx int * @param _default bool * @param atribs ...string * @return bool *
func (*Items) ValInt ¶ added in v0.0.4
* * ValInt return int value of the key * @param idx int * @param _default int * @param atribs ...string * @return int *
func (*Items) ValInt64 ¶ added in v0.0.4
* * ValInt64 return int64 value of the key * @param idx int * @param _default int64 * @param atribs ...string * @return int64 *
func (*Items) ValJson ¶ added in v0.0.4
* * ValJson return the value of the key * @param idx int * @param _default Json * @param atribs ...string * @return Json *
func (*Items) ValNum ¶ added in v0.0.4
* * ValNum return float64 value of the key * @param idx int * @param _default float64 * @param atribs ...string * @return float64 *
type Json ¶
type Json map[string]interface{}
* * Json type *
func Object ¶ added in v0.0.4
* * Object convert a interface to a json * @param src interface{} * @return Json * @return error *
func (Json) Any ¶
* * Any return any value of the key * @param _default any * @param atribs ...string * @return *Any *
func (*Json) Append ¶
* * Append: This method append the values in from to s. If the key exist in s, the value is not replaced. * @param from Json *
func (Json) ArrayInt ¶ added in v0.0.4
* * ArrayInt * @param _default []int * @param atribs ...string * @return []int *
func (Json) ArrayInt64 ¶ added in v0.0.4
* * ArrayInt64 * @param _default []int64 * @param atribs ...string * @return []int64 *
func (Json) ArrayJson ¶ added in v0.0.4
* * ArrayJson * @param _default []Json * @param atribs ...string * @return []Json *
func (Json) ArrayStr ¶
* * ArrayStr * @param _default []string * @param atribs ...string * @return []string *
func (*Json) Compare ¶ added in v0.0.4
* * Compare: This method return a new json with the diferent values between s and from. Also include the keys that not exist in s. * @param from Json * @return bool *
func (*Json) Delete ¶ added in v0.0.4
* * Delete a value in the key * @param key string * @return bool *
func (Json) Get ¶
* * IsDiferent return if the json is diferent * @param old Json * @param new Json * @return bool *
func (Json) Int64 ¶ added in v0.0.4
* * Int64 return the value of the key * @param atribs ...string * @return int64 *
func (*Json) ScanRows ¶ added in v0.0.4
* * ScanRows load rows to a json * @param rows *sql.Rows * @return error *
func (*Json) Set ¶
* * Set a value in the key * @param key string * @param val interface{} * @return bool *
func (Json) Time ¶
* * Time return the value of the key * @param atribs ...string * @return time.Time *
func (*Json) Update ¶
* * Update: This method update s with values in from. If the key exist in s, the value is replaced with the value in from. * @param fromJson Json * @return error *
func (Json) ValAny ¶
* * ValAny * @param _default interface{} * @param atribs ...string * @return any *
func (Json) ValArray ¶ added in v0.0.4
* * ValJson return Json value of the key * @param _default []interface{} * @param atribs ...string * @return []interface{} *
func (Json) ValBool ¶
* * ValBool return bool value of the key * @param _default bool * @param atribs ...string * @return bool *
func (Json) ValInt ¶
* * ValInt return int value of the key * @param _default int * @param atribs ...string * @return int *
func (Json) ValJson ¶
* * ValJson return Json value of the key * @param _default Json * @param atribs ...string * @return Json *
func (Json) ValNum ¶
* * ValNum return float64 value of the key * @param _default float64 * @param atribs ...string * @return float64 *