Documentation ¶
Index ¶
- Variables
- func AddAuthorsApi(authors *gin.RouterGroup)
- func AddBooksApi(books *gin.RouterGroup)
- func AddImagessApi(images *gin.RouterGroup)
- func AddPermissionsApi(permissions *gin.RouterGroup)
- func AddUsersApi(users *gin.RouterGroup)
- func ExecuteTemplate(name, path string, f func(c *gin.Context) interface{}) gin.HandlerFunc
- func Index(c *gin.Context) interface{}
- func JsonFail(c *gin.Context, err error) bool
- func JsonInfer(c *gin.Context, object interface{}, err error)
- func QueryParamLogin(c *gin.Context) (*models.User, error)
- func QueryParamToken(c *gin.Context) (*models.User, error)
- func QueryParamUint(c *gin.Context, param string) (*uint64, error)
- type ErrorApiMessage
- type IndexVars
- type OkApiMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MissingLogin = errors.New("missing login query parameter") MissingPassword = errors.New("missing password query parameter") NoLoginInformation = errors.New("neither login nor password was provided") MissingToken = errors.New("missing token") TooManyAuthMethods = errors.New("gave too many authorization methods") )
View Source
var ( AuthorFirstNameInvalid = errors.New("author's first name is invalid") AuthorLastNameInvalid = errors.New("author's last name is invalid") )
View Source
var (
MissingPermissions = errors.New("missing permissions")
)
View Source
var (
TemplatesDir = pkger.Dir("/templates")
)
Functions ¶
func AddAuthorsApi ¶
func AddAuthorsApi(authors *gin.RouterGroup)
func AddBooksApi ¶
func AddBooksApi(books *gin.RouterGroup)
func AddImagessApi ¶
func AddImagessApi(images *gin.RouterGroup)
func AddPermissionsApi ¶
func AddPermissionsApi(permissions *gin.RouterGroup)
func AddUsersApi ¶
func AddUsersApi(users *gin.RouterGroup)
func ExecuteTemplate ¶
func ExecuteTemplate(name, path string, f func(c *gin.Context) interface{}) gin.HandlerFunc
Types ¶
type ErrorApiMessage ¶
type OkApiMessage ¶
type OkApiMessage struct { Status uint64 `json:"status"` Value interface{} `json:"value"` }
Click to show internal directories.
Click to hide internal directories.