Documentation ¶
Index ¶
- Variables
- func BadRequest(ctx *gin.Context, msg string, err error)
- func ErrorResponse(ctx *gin.Context, msg string, status int)
- func Health(ctx *gin.Context)
- func InitializeDatabase() error
- func RegisterApps(r *gin.Engine)
- func Response(ctx *gin.Context, resp gin.H)
- func SetupApps()
- type App
- type BaseApp
- type BaseUser
- type Db
- type DbBackend
- type DbOperationType
- type Err
- type GlobalSettings
- type Query
- type QuerySet
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Apps []App
Apps array of all registered apps
View Source
var Settings = &GlobalSettings{ UserObjKey: "user", UserObjId: "id", DbBackends: nil, }
Functions ¶
func InitializeDatabase ¶
func InitializeDatabase() error
Types ¶
type BaseApp ¶ added in v0.0.13
type BaseApp struct { Title string Info string RouteHandler func(r *gin.Engine) SetUpHandler func() error }
func (*BaseApp) Description ¶ added in v0.0.13
type BaseUser ¶ added in v0.0.14
type BaseUser struct { Id string `json:"id"` Email string `json:"email"` FirstName string `json:"first_name"` LastName string `json:"last_name"` }
func (*BaseUser) GetFirstName ¶ added in v0.0.14
func (*BaseUser) GetLastName ¶ added in v0.0.14
type Db ¶ added in v0.0.13
type Db interface { Get(dest interface{}, key string) error Filter(dest interface{}, conds ...interface{}) error AutoMigrate(dst ...interface{}) error First(dest interface{}, conds ...interface{}) error Create(value interface{}) error GetUser(dest interface{}, id string) error }
var DB Db
type DbOperationType ¶ added in v0.0.13
type DbOperationType int
const ( CREATE DbOperationType = iota GET UPDATE DELETE )
type GlobalSettings ¶
type GlobalSettings struct { SecretKey string UserObjKey string UserObjId string DbBackends DbBackend AllowAnonymousUser bool }
GlobalSettings Global Project settings
type Query ¶ added in v0.0.13
type Query interface { Describe() (string, error) Operation() DbOperationType }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.