Documentation ¶
Index ¶
- Constants
- func ReturnJson(w http.ResponseWriter, statusCode int, data interface{})
- func ReturnJsonError(w http.ResponseWriter, statusCode int, err error)
- func ReturnJsonMessage(w http.ResponseWriter, statusCode int, message string)
- func ReturnJsonNoEscape(w http.ResponseWriter, statusCode int, data interface{})
- func ReturnJsonStatus(w http.ResponseWriter, statusCode int, status bool, message string)
- type Base64File
- type DynamicJson
- func (dyJs DynamicJson) AppendArray(name string, value interface{}) DynamicJson
- func (dyJs DynamicJson) GetArray(name string) *[]interface{}
- func (dyJs DynamicJson) GetNumber(name string) float64
- func (dyJs DynamicJson) GetObject(name string) DynamicJson
- func (dyJs DynamicJson) GetValue(name string) string
- func (dyJs DynamicJson) SetValue(name string, value interface{}) DynamicJson
- type JSONstring
- type NullTime
- type Unit
Constants ¶
const UNKNOWN = "UNKNOWN"
* Store the default name
Variables ¶
This section is empty.
Functions ¶
func ReturnJson ¶
func ReturnJson(w http.ResponseWriter, statusCode int, data interface{})
* Provide a support method to return json
func ReturnJsonError ¶
func ReturnJsonError(w http.ResponseWriter, statusCode int, err error)
* Provide a support method to return json
func ReturnJsonMessage ¶
func ReturnJsonMessage(w http.ResponseWriter, statusCode int, message string)
* Provide a support method to return json
func ReturnJsonNoEscape ¶
func ReturnJsonNoEscape(w http.ResponseWriter, statusCode int, data interface{})
* Provide a support method to return json
func ReturnJsonStatus ¶
func ReturnJsonStatus(w http.ResponseWriter, statusCode int, status bool, message string)
* Provide a support method to return json
Types ¶
type Base64File ¶
type Base64File struct {
// contains filtered or unexported fields
}
func NewBase64File ¶
func NewBase64File(data string) (*Base64File, error)
* Decode the base 64 string
func NewBase64FileFromForm ¶
func NewBase64FileFromForm(file multipart.File, fileInfo *multipart.FileHeader) (*Base64File, error)
* Decode the base 64 string
func (*Base64File) GetDataBytes ¶
func (file *Base64File) GetDataBytes() []byte
func (*Base64File) GetDataReader ¶
func (file *Base64File) GetDataReader() *bytes.Reader
func (*Base64File) GetEncodedData ¶
func (file *Base64File) GetEncodedData() string
func (*Base64File) GetMime ¶
func (file *Base64File) GetMime() string
func (*Base64File) GetName ¶
func (file *Base64File) GetName() string
type DynamicJson ¶
type DynamicJson map[string]interface{}
func NewDynamicJson ¶
func NewDynamicJson() DynamicJson
func WrapDynamicJson ¶
func WrapDynamicJson(input interface{}) DynamicJson
func (DynamicJson) AppendArray ¶
func (dyJs DynamicJson) AppendArray(name string, value interface{}) DynamicJson
* Return array
func (DynamicJson) GetArray ¶
func (dyJs DynamicJson) GetArray(name string) *[]interface{}
func (DynamicJson) GetNumber ¶
func (dyJs DynamicJson) GetNumber(name string) float64
* Returns the existing or new child object
func (DynamicJson) GetObject ¶
func (dyJs DynamicJson) GetObject(name string) DynamicJson
* Returns the existing or new child object
func (DynamicJson) GetValue ¶
func (dyJs DynamicJson) GetValue(name string) string
* Returns the existing or new child object
func (DynamicJson) SetValue ¶
func (dyJs DynamicJson) SetValue(name string, value interface{}) DynamicJson
* Returns the existing or new child object
type JSONstring ¶
type JSONstring string
func (*JSONstring) UnmarshalJSON ¶
func (str *JSONstring) UnmarshalJSON(data []byte) error
JSON to aliased string object
type NullTime ¶
NullTime represents a time.Time that may be null. NullTime implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.