github.com/gogf/gf@v1.16.9/frame/g/g.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package g 8 9 import ( 10 "context" 11 "github.com/gogf/gf/container/gvar" 12 ) 13 14 type ( 15 Var = gvar.Var // Var is a universal variable interface, like generics. 16 Ctx = context.Context // Ctx is alias of frequently-used context.Context. 17 ) 18 19 type ( 20 Map = map[string]interface{} // Map is alias of frequently-used map type map[string]interface{}. 21 MapAnyAny = map[interface{}]interface{} // MapAnyAny is alias of frequently-used map type map[interface{}]interface{}. 22 MapAnyStr = map[interface{}]string // MapAnyStr is alias of frequently-used map type map[interface{}]string. 23 MapAnyInt = map[interface{}]int // MapAnyInt is alias of frequently-used map type map[interface{}]int. 24 MapStrAny = map[string]interface{} // MapStrAny is alias of frequently-used map type map[string]interface{}. 25 MapStrStr = map[string]string // MapStrStr is alias of frequently-used map type map[string]string. 26 MapStrInt = map[string]int // MapStrInt is alias of frequently-used map type map[string]int. 27 MapIntAny = map[int]interface{} // MapIntAny is alias of frequently-used map type map[int]interface{}. 28 MapIntStr = map[int]string // MapIntStr is alias of frequently-used map type map[int]string. 29 MapIntInt = map[int]int // MapIntInt is alias of frequently-used map type map[int]int. 30 MapAnyBool = map[interface{}]bool // MapAnyBool is alias of frequently-used map type map[interface{}]bool. 31 MapStrBool = map[string]bool // MapStrBool is alias of frequently-used map type map[string]bool. 32 MapIntBool = map[int]bool // MapIntBool is alias of frequently-used map type map[int]bool. 33 ) 34 35 type ( 36 List = []Map // List is alias of frequently-used slice type []Map. 37 ListAnyAny = []MapAnyAny // ListAnyAny is alias of frequently-used slice type []MapAnyAny. 38 ListAnyStr = []MapAnyStr // ListAnyStr is alias of frequently-used slice type []MapAnyStr. 39 ListAnyInt = []MapAnyInt // ListAnyInt is alias of frequently-used slice type []MapAnyInt. 40 ListStrAny = []MapStrAny // ListStrAny is alias of frequently-used slice type []MapStrAny. 41 ListStrStr = []MapStrStr // ListStrStr is alias of frequently-used slice type []MapStrStr. 42 ListStrInt = []MapStrInt // ListStrInt is alias of frequently-used slice type []MapStrInt. 43 ListIntAny = []MapIntAny // ListIntAny is alias of frequently-used slice type []MapIntAny. 44 ListIntStr = []MapIntStr // ListIntStr is alias of frequently-used slice type []MapIntStr. 45 ListIntInt = []MapIntInt // ListIntInt is alias of frequently-used slice type []MapIntInt. 46 ListAnyBool = []MapAnyBool // ListAnyBool is alias of frequently-used slice type []MapAnyBool. 47 ListStrBool = []MapStrBool // ListStrBool is alias of frequently-used slice type []MapStrBool. 48 ListIntBool = []MapIntBool // ListIntBool is alias of frequently-used slice type []MapIntBool. 49 ) 50 51 type ( 52 Slice = []interface{} // Slice is alias of frequently-used slice type []interface{}. 53 SliceAny = []interface{} // SliceAny is alias of frequently-used slice type []interface{}. 54 SliceStr = []string // SliceStr is alias of frequently-used slice type []string. 55 SliceInt = []int // SliceInt is alias of frequently-used slice type []int. 56 ) 57 58 type ( 59 Array = []interface{} // Array is alias of frequently-used slice type []interface{}. 60 ArrayAny = []interface{} // ArrayAny is alias of frequently-used slice type []interface{}. 61 ArrayStr = []string // ArrayStr is alias of frequently-used slice type []string. 62 ArrayInt = []int // ArrayInt is alias of frequently-used slice type []int. 63 )