Versions in this module Expand all Collapse all v0 v0.1.1 May 27, 2020 Changes in this version + const AuthSkipPrefix + const AuthSkipUri + var EmptyPageResult = &PageResult + func GetDatabase(config *conf.DBConfig) *sqlx.DB + func GetGrpcConn(config *conf.GrpcConfig) (*grpc.ClientConn, error) + func StartWebserver(config conf.AppConfig, appContext *AppContext, handler ...WebHandler) error + type AppContext struct + Context ContextManager + func NewAppContext(context ContextManager) *AppContext + func (m *AppContext) DBAdd(ca *CrudAdd) error + func (m *AppContext) DBDelete(table string, ids []string) error + func (m *AppContext) DBDeleteWithFilter(table string, filter map[string]interface{}) error + func (m *AppContext) DBDeleteWithFilterTx(tx *sql.Tx, table string, filter map[string]interface{}) error + func (m *AppContext) DBDeleteWithTx(tx *sql.Tx, table string, ids []string) error + func (m *AppContext) DBGet(cg *CrudGet) error + func (m *AppContext) DBGet2(table string, culumns []string, filter map[string]interface{}, ...) error + func (m *AppContext) DBInsert(table string, vals map[string]interface{}) error + func (m *AppContext) DBInsertWithTx(tx *sql.Tx, table string, vals map[string]interface{}) error + func (m *AppContext) DBQuery(cq *CrudQuery) error + func (m *AppContext) DBTrucate(table string) error + func (m *AppContext) DBUpdate(cu *CrudUpdate) error + func (m *AppContext) DBUpdate2(table string, vals map[string]interface{}, filter map[string]interface{}) error + func (m *AppContext) DBUpdate2WithTx(tx *sql.Tx, table string, vals map[string]interface{}, ...) error + func (m *AppContext) Get(key string) (interface{}, bool) + func (m *AppContext) Set(key string, val interface{}) + type ContextManager interface + DBPool func() *sqlx.DB + Get func(key string) (interface{}, bool) + GrpConn func() *grpc.ClientConn + Set func(key string, val interface{}) + type CrudAdd struct + Table string + Vals []map[string]interface{} + func NewCrudAdd(table string, vals []map[string]interface{}) *CrudAdd + type CrudFilterLike struct + Names []string + Value string + type CrudGet struct + Culumns []string + Filter map[string]interface{} + ResultRef interface{} + Table string + func NewCrudGet(table string, culumns []string, filter map[string]interface{}, ...) *CrudGet + type CrudQuery struct + Culumns []string + DateColumn string + DateRange DateRange + Eq sq.Eq + GtOrEq sq.GtOrEq + Joins []string + LeftJoins []string + LikeNames []string + LikeValue interface{} + LtOrEq sq.LtOrEq + PagePos uint64 + PageSize uint64 + Pager bool + ResultPage *PageResult + ResultRef interface{} + Table string + Tags string + Wheres []string + func NewCrudQuery(table string, culumns []string, resultRef interface{}) *CrudQuery + func (cq *CrudQuery) SetEqValue(key, val string) + type CrudUpdate struct + Eq sq.Eq + GtOrEq sq.GtOrEq + LtOrEq sq.LtOrEq + Table string + Vals map[string]interface{} + func NewCrudUpdate(table string, vals map[string]interface{}, filter map[string]interface{}) *CrudUpdate + type DateRange struct + End string + Start string + type HTTPError struct + Code int + Internal error + Message interface{} + func NewHTTPError(code int, message ...interface{}) *HTTPError + func (e *HTTPError) Error() string + type HttpHandler struct + Ctx *WebContext + func (h *HttpHandler) FetchExcelData(c echo.Context, sheet string) ([]map[string]string, error) + func (h *HttpHandler) GetAppContext() *AppContext + func (h *HttpHandler) GetConfig() *conf.AppConfig + func (h *HttpHandler) GetInternalError(err interface{}) *echo.HTTPError + func (h *HttpHandler) GoInternalErrPage(c echo.Context, err interface{}) error + func (h *HttpHandler) ParseFormInt64(c echo.Context, name string) (int64, error) + func (h *HttpHandler) RestError(msg string) *RestResult + func (h *HttpHandler) RestResult(data interface{}) *RestResult + func (h *HttpHandler) RestSucc(msg string) *RestResult + type JsonOptions struct + Id string + Value interface{} + type PageResult struct + Data interface{} + Pos int64 + TotalCount int64 + type RestResult struct + Code int + Data interface{} + Msg string + Msgtype string + type WebContext struct + AppConfig *conf.AppConfig + AppCtx *AppContext + func NewWebContext(appCtx *AppContext, config *conf.AppConfig) *WebContext + type WebForm struct + FormItem interface{} + Gets url.Values + Params map[string]string + Posts url.Values + func NewWebForm(c echo.Context) *WebForm + func (f *WebForm) GetDateRange(name string) (DateRange, error) + func (f *WebForm) GetInt64Val(name string, defval int64) int64 + func (f *WebForm) GetIntVal(name string, defval int) int + func (f *WebForm) GetMustVal(name string) (string, error) + func (f *WebForm) GetUpdateMap(names []string) map[string]interface{} + func (f *WebForm) GetVal(name string) string + func (f *WebForm) GetVal2(name string, defval string) string + func (f *WebForm) Param(name string) string + func (f *WebForm) Param2(name string, defval string) string + func (f *WebForm) Set(name string, value string) + type WebHandler interface + InitRouter func(webctx *WebContext, g *echo.Group) + type WebixTableColumn struct + Adjust interface{} + Css string + Fillspace interface{} + Header interface{} + Headermenu interface{} + Height int + Hidden interface{} + Id string + Sort string + Template string + Width int