Documentation
¶
Index ¶
- Variables
- func BuildAppErrors()
- func CheckHashDetails(username string, password string, hash string) bool
- func HashDetails(username string, password string) (string, error)
- func InitMetaHandlers(r *mux.Router, prefix string)
- func OpenRouteHandler(path string, r *mux.Router, f http.Handler)
- func ProtectedRouteHandler(path string, r *mux.Router, f http.Handler, method string)
- func RouteBuilder(prefix string, namespace string, version string, method string) string
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var AppRespErrors appErrorsStruct
AppRespErrors variable
Functions ¶
func BuildAppErrors ¶
func BuildAppErrors()
BuildAppErrors builds all the error messages that the app
func CheckHashDetails ¶
CheckHashDetails takes username, password, hash - returns checked version
func HashDetails ¶
HashDetails takes username and password - returns hash
func InitMetaHandlers ¶
InitMetaHandlers starts the meta api handlers
func ProtectedRouteHandler ¶
Types ¶
type Response ¶
type Response struct { Data interface{} `json:"data,omitempty"` Meta interface{} `json:"meta,omitempty"` Errors []errorCode `json:"errors,omitempty"` }
Response is the generic resp that will be used for the api
func (*Response) Send ¶
func (i *Response) Send(w http.ResponseWriter)
Send marshal the response and write value
Click to show internal directories.
Click to hide internal directories.