Documentation ¶
Index ¶
- Variables
- func Dump(expression ...interface{})
- func Kind(element interface{}) reflect.Kind
- func MimeByExtension(filename string) (string, bool)
- func Name(element interface{}) string
- func Package(element interface{}) string
- type Collection
- func (c Collection) Contains(search interface{}) bool
- func (c Collection) Empty() bool
- func (c Collection) First() Value
- func (c Collection) Get(key string) Value
- func (c Collection) GetE(key string) (Value, error)
- func (c Collection) Len() int
- func (c Collection) Only(keys ...string) Collection
- func (c Collection) OnlyE(expectedKeys ...string) (Collection, error)
- func (c Collection) Push(item interface{}) Collection
- func (c Collection) Raw() interface{}
- func (c Collection) Reverse() Collection
- func (c Collection) SetE(key string, value interface{}) (Collection, error)
- type File
- type Files
- type Key
- type Map
- func (m Map) Collection() Collection
- func (m Map) Copy() Map
- func (m Map) Delete(key string)
- func (m Map) Empty() bool
- func (m Map) Except(keys ...string) Map
- func (m Map) Filled(keys ...string) bool
- func (m Map) First() Value
- func (m Map) Get(key string) Value
- func (m Map) GetE(key string) (Value, error)
- func (m Map) Has(keys ...string) bool
- func (m Map) HasAny(keys ...string) bool
- func (m Map) Merge(maps ...Map) Map
- func (m Map) Missing(keys ...string) bool
- func (m Map) Only(keys ...string) Map
- func (m Map) OnlyE(originKeys ...string) (Map, error)
- func (m Map) Push(key string, input interface{}) Map
- func (m Map) Raw() interface{}
- func (m Map) SetE(key string, input interface{}) (Map, error)
- type Value
- func (v Value) Bool() bool
- func (v Value) Collection() Collection
- func (v Value) Empty() bool
- func (v Value) Error() error
- func (v Value) Filled() bool
- func (v Value) Float() float64
- func (v Value) FloatE() (float64, error)
- func (v Value) Get(key string) Value
- func (v Value) GetE(key string) (Value, error)
- func (v Value) Int() int
- func (v Value) IntE() (int, error)
- func (v Value) Map() Map
- func (v Value) MapE() (Map, error)
- func (v Value) Only(keys ...string) Value
- func (v Value) OnlyE(keys ...string) (Value, error)
- func (v Value) Raw() interface{}
- func (v Value) Set(key string, input interface{}) Value
- func (v Value) SetE(key string, input interface{}) (Value, error)
- func (v Value) Source() interface{}
- func (v Value) Split(separator string) Collection
- func (v Value) String() string
- func (v Value) StringE() (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CanNotAppendValueError = errors.New("")
View Source
var CanNotCreateMapError = errors.New("can not create map")
View Source
var CanNotFoundValueError = errors.New("can not found value")
View Source
var InvalidCollectionKeyError = errors.New("")
Functions ¶
func MimeByExtension ¶
Types ¶
type Collection ¶
type Collection []Value
func NewCollection ¶
func NewCollection(items ...interface{}) Collection
func (Collection) Contains ¶
func (c Collection) Contains(search interface{}) bool
Determine if an item exists in the collection by a string
func (Collection) Empty ¶
func (c Collection) Empty() bool
func (Collection) First ¶
func (c Collection) First() Value
func (Collection) Get ¶
func (c Collection) Get(key string) Value
func (Collection) Len ¶
func (c Collection) Len() int
The len method returns the length of the collection
func (Collection) Only ¶
func (c Collection) Only(keys ...string) Collection
func (Collection) OnlyE ¶
func (c Collection) OnlyE(expectedKeys ...string) (Collection, error)
func (Collection) Push ¶
func (c Collection) Push(item interface{}) Collection
func (Collection) Raw ¶
func (c Collection) Raw() interface{}
func (Collection) Reverse ¶
func (c Collection) Reverse() Collection
func (Collection) SetE ¶
func (c Collection) SetE(key string, value interface{}) (Collection, error)
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (File) Header ¶
func (f File) Header() *multipart.FileHeader
type Key ¶
type Key = string
func GetSearchableKeys ¶
convert keys with an asterisk to usable keys
func GetSearchableKeysByOneKey ¶
convert key with an asterisk to usable keys
type Map ¶
func (Map) Collection ¶
func (m Map) Collection() Collection
func (Map) GetE ¶
GetE gets the first value associated with the given key. If there are no values associated with the key, GetE returns nil. To access multiple values, use GetCollection or Collection.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (Value) Split ¶
func (v Value) Split(separator string) Collection
Split slices Value into all substrings separated by separator and returns a slice of the strings between those separators.
If Value does not contain separator and separator is not empty, Split returns a slice of length 1 whose only element is Value.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.