Documentation
¶
Index ¶
- Variables
- func AuthFailed(c *gin.Context)
- func FindTensor() string
- func GenerateCookieSecrets()
- func GetAPIInfo(c *gin.Context)
- func GetAPIVersion(c *gin.Context)
- func GetIdParam(name string, c *gin.Context) (string, error)
- func GetIntParam(name string, c *gin.Context) (int, error)
- func GetPing(c *gin.Context)
- func GetU64IntParam(name string, c *gin.Context) (uint64, error)
- func ValidateEmail(email string) bool
- type MongoDBConfig
- type Pagination
- type QueryParser
- type SpaceValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLimit = int(10) MinLimit = int(1) MaxLimit = int(500) LimitParam = "page_size" DefaultPage = int(1) PageParam = "page" )
View Source
var Config *configType
View Source
var Cookie *securecookie.SecureCookie
View Source
var InteractiveSetup bool
View Source
var (
OrderParam = "order_by"
)
View Source
var Secrets bool
View Source
var Version = "0.1 alpha1"
Version is for hold the system version globally
Functions ¶
func AuthFailed ¶
func FindTensor ¶
func FindTensor() string
func GenerateCookieSecrets ¶
func GenerateCookieSecrets()
func GetAPIInfo ¶
func GetAPIVersion ¶
func GetIdParam ¶
GetIdParam is to Get ObjectID url parameter If the parameter is not an ObjectId it will terminate the request
func ValidateEmail ¶
Types ¶
type MongoDBConfig ¶
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func NewPagination ¶
func NewPagination(c *gin.Context, n int) *Pagination
func (*Pagination) HasPage ¶
func (p *Pagination) HasPage() bool
func (*Pagination) Limit ¶
func (p *Pagination) Limit() int
func (*Pagination) NextPage ¶
func (p *Pagination) NextPage() interface{}
func (*Pagination) Offset ¶
func (p *Pagination) Offset() int
func (*Pagination) Page ¶
func (p *Pagination) Page() int
func (*Pagination) PreviousPage ¶
func (p *Pagination) PreviousPage() interface{}
type QueryParser ¶
type QueryParser struct {
// contains filtered or unexported fields
}
func NewQueryParser ¶
func NewQueryParser(c *gin.Context) QueryParser
func (*QueryParser) OrderBy ¶
func (p *QueryParser) OrderBy() string
type SpaceValidator ¶
type SpaceValidator struct {
// contains filtered or unexported fields
}
func (*SpaceValidator) ValidateStruct ¶
func (v *SpaceValidator) ValidateStruct(obj interface{}) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.