Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindValid ¶
BindValid binds the request's body to a vm and then validates the vm through govalidator.
func ConnMongoDB ¶
func ConnMongoDB() (*mgo.Session, *mgo.Database, error)
func GetPostsTitleUrl ¶
Types ¶
type Error ¶
type Error struct {
Errors []interface{} `json:"errors"`
}
Error is a general purpose error view model.
func NewError ¶
func NewError(errs ...interface{}) *Error
NewError helps create an Error with multiple error values without the need to manually declare a []interface{} for the Errors field.
func ValidationErrors ¶
ValidationErrors receives a govalidator error and properly formats it into a viewmodel.Error
Click to show internal directories.
Click to hide internal directories.