Versions in this module Expand all Collapse all v0 v0.2.0 Jun 12, 2023 Changes in this version + const OpCreate + const OpDelete + const OpList + const OpRead + const OpUpdate + const TypeInt + const TypeInt64 + const TypeString + const VERSION + type Controller struct + func NewController(dbConn *sql.DB, tblPrefix string) *Controller + func (c *Controller) GetModelIDInterface(obj interface{}) interface{} + func (c *Controller) GetModelIDValue(obj interface{}) int64 + func (c Controller) CreateDBTable(obj interface{}) *ErrController + func (c Controller) CreateDBTables(xobj ...interface{}) *ErrController + func (c Controller) DeleteFromDB(obj interface{}) *ErrController + func (c Controller) DropDBTable(obj interface{}) *ErrController + func (c Controller) DropDBTables(xobj ...interface{}) *ErrController + func (c Controller) GetFiltersInterfaces(mf map[string]interface{}) []interface{} + func (c Controller) GetFromDB(newObjFunc func() interface{}, order []string, limit int, offset int, ...) ([]interface{}, *ErrController) + func (c Controller) GetHTTPHandler(uri string, newObjFunc func() interface{}, newObjCreateFunc func() interface{}, ...) http.Handler + func (c Controller) GetModelFieldInterfaces(obj interface{}) []interface{} + func (c Controller) ResetFields(obj interface{}) + func (c Controller) SaveToDB(obj interface{}) *ErrController + func (c Controller) SetFromDB(obj interface{}, id string) *ErrController + func (c Controller) Validate(obj interface{}, filters map[string]interface{}) (bool, map[string]int, error) + type ErrController struct + Err error + Op string + func (e *ErrController) Error() string + func (e *ErrController) Unwrap() error + type ErrHelper struct + Err error + Op string + Tag string + func (e ErrHelper) Error() string + func (e ErrHelper) Unwrap() error + type ErrValidation struct + Err error + Fields map[string]int + func (e ErrValidation) Error() string + func (e ErrValidation) Unwrap() error + type HTTPResponse struct + Data map[string]interface{} + ErrText string + OK int8 + func NewHTTPResponse(ok int8, errText string) HTTPResponse + type Helper struct + func NewHelper(obj interface{}, dbTblPrefix string, forceName string, sourceHelper *Helper) *Helper + func (h *Helper) Err() *ErrHelper + func (h *Helper) GetFlags() int + func (h *Helper) GetQueryDeleteById() string + func (h *Helper) GetQueryInsert() string + func (h *Helper) GetQuerySelect(order []string, limit int, offset int, filters map[string]interface{}, ...) string + func (h *Helper) GetQuerySelectById() string + func (h *Helper) GetQueryUpdateById() string + func (h Helper) GetQueryCreateTable() string + func (h Helper) GetQueryDropTable() string