Documentation ¶
Index ¶
- Constants
- func ArrayFromInterface(data interface{}) []string
- func ArrayFromJSON(data io.Reader) []string
- func ArrayToJSON(objmap []string) string
- func IsLower(s string) bool
- func MapFromJSON(data io.Reader) map[string]string
- func MapToJSON(objmap map[string]string) string
- func RemoveDuplicatesFromStringArray(arr []string) []string
- func StringArrayIntersection(arr1, arr2 []string) []string
- func StringFromJSON(data io.Reader) string
- func StringInArray(a string, array []string) bool
- func StringInterfaceFromJSON(data io.Reader) map[string]interface{}
- func StringInterfaceToJSON(objmap map[string]interface{}) string
- func StringToJSON(s string) string
- type AppError
- type StringArray
- type StringInterface
- type StringMap
Constants ¶
const (
//CurrentVersion exprt the current application version (Used for Etags)
CurrentVersion = "0.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func ArrayFromInterface ¶
func ArrayFromInterface(data interface{}) []string
ArrayFromInterface transfor an interface into a Json object
func ArrayFromJSON ¶
ArrayFromJSON Try to parse a json array into a go string array
func ArrayToJSON ¶
ArrayToJSON transfor an array into a json array
func MapFromJSON ¶
MapFromJSON will decode the key/value pair map
func RemoveDuplicatesFromStringArray ¶
RemoveDuplicatesFromStringArray remove duplicate string from array ...
func StringArrayIntersection ¶
StringArrayIntersection interesection between string arrays
func StringFromJSON ¶
StringFromJSON Convert providing json into string
func StringInArray ¶
StringInArray Search if provided string exist in provided array
func StringInterfaceFromJSON ¶
StringInterfaceFromJSON Try to parse a json into map[string]interace{}
func StringInterfaceToJSON ¶
StringInterfaceToJSON convert String interface into Json object
func StringToJSON ¶
StringToJSON convert provided string into Json object
Types ¶
type AppError ¶
type AppError struct { // ID for the error ID string `json:"id"` // Error's message Message string `json:"message"` // Message to be display to the end user without debugging information // EgenericErrorModelrror's status code StatusCode int `json:"status_code,omitempty"` // The http status code // Detail of error DetailedError string `json:"detailed_error"` // Internal error string to help the developer // Id of the request if exist RequestID string `json:"request_id,omitempty"` // The RequestID that's also set in the header Where string `json:"-"` // The function where it happened in the form of Struct.Func IsOAuth bool `json:"is_oauth,omitempty"` // Whether the error is OAuth specific // contains filtered or unexported fields }
AppError Type used to structure error reporting for popcube chat project. swagger:model genericErrorModel
func AppErrorFromJSON ¶
AppErrorFromJSON will decode the input and return an AppError
func NewAPIError ¶
NewAPIError is used to generate server errors
type StringInterface ¶
type StringInterface map[string]interface{}
StringInterface Interface for map[string]