Documentation
¶
Index ¶
- Constants
- func NewDB(cfg *Config) (model.DBer, error)
- func NewQueClient(db *sql.DB) (*qg.Client, error)
- func NewWorkerDB(config *Config) (*sql.DB, error)
- func RunServer(cfgPath string)
- func StartWorker(confPath string) error
- type APIApp
- func (app *APIApp) GetTodoByID(w http.ResponseWriter, r *http.Request) (int, interface{}, error)
- func (app *APIApp) GetTodos(w http.ResponseWriter, r *http.Request) (int, interface{}, error)
- func (app *APIApp) GetUserDetail(w http.ResponseWriter, r *http.Request) (int, interface{}, error)
- func (app *APIApp) Healthcheck(w http.ResponseWriter, r *http.Request) (int, interface{}, error)
- type AppHandler
- type AuthModel
- type BaseApp
- type Config
- type JobApp
- type UpdateUserInfoArgs
Constants ¶
View Source
const ( QueNameHighPriority = "high" QueNameLowPriority = "" )
Priority
Variables ¶
This section is empty.
Functions ¶
func NewQueClient ¶
NewQueClient create que client
Types ¶
type APIApp ¶
APIApp application
func (*APIApp) GetTodoByID ¶
GetTodoByID get todo by id
func (*APIApp) GetUserDetail ¶
GetUserDetail get user
func (*APIApp) Healthcheck ¶
Healthcheck healthcheck
type AppHandler ¶
type AppHandler struct {
// contains filtered or unexported fields
}
AppHandler internal
func (AppHandler) ServeHTTP ¶
func (ah AppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serve
type Config ¶
type Config struct {
Environment string `toml:"environment"`
ServerPort string `toml:"server_port"`
DBName string `toml:"db_name"`
DBUser string `toml:"db_user"`
DBHost string `toml:"db_host"`
DBPass string `toml:"db_pass"`
DBPort uint16 `toml:"db_port"`
DBSSLMode string `toml:"db_ssl_mode"`
PasswordPepper string `toml:"password_pepper"`
NumWorkers int `toml:"num_workers"`
EstcConfig *estc.Config `toml:"estc"`
}
Config app global config
Source Files
¶
Click to show internal directories.
Click to hide internal directories.