Documentation ¶
Index ¶
- Constants
- Variables
- func ArrayToStrings(v *pgtype.ArrayType) ([]string, bool)
- func BPCharArrayToStrings(src []pgtype.BPChar) []string
- func BlobToURL(tableName string, colName string, id int32) string
- func CreateErrResult(err error) (interface{}, error)
- func DecodeDatetimeString(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func GetForeignName(ctx *fasthttp.RequestCtx, DB *DB, col Column, val interface{}) interface{}
- func GetForeignOptions(ctx *fasthttp.RequestCtx, DB *dbEngine.DB, colDec *forms.ColumnDecor, ...)
- func GetNameAccordingLang(table Table, name string, lang interface{}) string
- func GetNameOfTitleColumn(table Table, lang interface{}) string
- func Int4ArrToStrings(src []pgtype.Int4) []int32
- func Int8ArrToStrings(src []pgtype.Int8) []int64
- func RoutesFromDB(ctx context.Context, tables ...string) apis.ApiRoutes
- func TableForm(DB *DB, preRoute string, table, patternList Table, priColumns []string) apis.ApiRouteHandler
- func TableInsert(preRoute string, DB *dbEngine.DB, table dbEngine.Table, params []string) apis.ApiRouteHandler
- func TableSelect(preRoute string, table dbEngine.Table, params []string) apis.ApiRouteHandler
- func TableUpdate(preRoute string, table dbEngine.Table, columns, priColumns []string) apis.ApiRouteHandler
- func TextArrayToStrings(src []pgtype.Text) []string
- func TimeToString(v time.Time) string
- func ToColDev(ctx *fasthttp.RequestCtx, DB *dbEngine.DB, patternList dbEngine.Table, ...) *forms.ColumnDecor
- func ToStandartColumnValueType(tableName, colName string, id int32, values interface{}) interface{}
- func UnknownArrayToStrings(src []interface{}) []string
- func VarcharArrayToStrings(src []pgtype.Varchar) []string
- type DateTimeString
- type FormActions
Constants ¶
View Source
const ( UserPrivelegiesGrant = "grant" UsersPrivilegiesEdit = "edit" ActionsPropertyName = "actions" )
View Source
const PathVersion = "/api/v1"
Variables ¶
View Source
var ( ParamsID = apis.InParam{ Name: "id", Req: false, Type: apis.NewTypeInParam(types.Int32), } ParamsLang = apis.InParam{ Name: "lang", Desc: "need to get result on non-english", DefValue: "en", Req: true, Type: apis.NewTypeInParam(types.String), } ParamsGetFormActions = apis.InParam{ Name: "is_get_form_actions", Desc: "need to get form actions in response", Req: false, Type: apis.NewTypeInParam(types.Bool), } ParamsCounter = apis.InParam{ Name: "counter", Desc: "max count of results", DefValue: 10, Req: true, Type: apis.NewTypeInParam(types.Int), } ParamsHTML = apis.InParam{ Name: "html", Desc: "need for get result in html instead JSON", Req: false, Type: apis.NewTypeInParam(types.Bool), } ParamsValue = apis.InParam{ Name: "value", Desc: "part of polymers name, its Synonyms or Abbreviations", PartReq: []string{ParamsID.Name}, Req: false, Type: apis.NewTypeInParam(types.String), } ParamsName = apis.InParam{ Name: "name", Desc: "name of search table", DefValue: apis.ApisValues(apis.ChildRoutePath), Req: true, Type: apis.NewTypeInParam(types.String), } )
Functions ¶
func BPCharArrayToStrings ¶
func CreateErrResult ¶
func GetForeignName ¶
func GetForeignName(ctx *fasthttp.RequestCtx, DB *DB, col Column, val interface{}) interface{}
func GetForeignOptions ¶
func GetForeignOptions(ctx *fasthttp.RequestCtx, DB *dbEngine.DB, colDec *forms.ColumnDecor, id interface{})
func GetNameAccordingLang ¶
func GetNameOfTitleColumn ¶
func GetNameOfTitleColumn(table Table, lang interface{}) string
func Int4ArrToStrings ¶
func Int8ArrToStrings ¶
func TableForm ¶
func TableForm(DB *DB, preRoute string, table, patternList Table, priColumns []string) apis.ApiRouteHandler
func TableInsert ¶
func TableInsert(preRoute string, DB *dbEngine.DB, table dbEngine.Table, params []string) apis.ApiRouteHandler
TableInsert insert data of params into table
func TableSelect ¶
func TableUpdate ¶
func TableUpdate(preRoute string, table dbEngine.Table, columns, priColumns []string) apis.ApiRouteHandler
TableUpdate
func TextArrayToStrings ¶
func TimeToString ¶
func ToColDev ¶
func ToColDev(ctx *fasthttp.RequestCtx, DB *dbEngine.DB, patternList dbEngine.Table, col dbEngine.Column, value interface{}) *forms.ColumnDecor
func UnknownArrayToStrings ¶
func UnknownArrayToStrings(src []interface{}) []string
func VarcharArrayToStrings ¶
Types ¶
type DateTimeString ¶
func (*DateTimeString) CheckParams ¶
func (d *DateTimeString) CheckParams(ctx *fasthttp.RequestCtx, badParams map[string]string) bool
func (*DateTimeString) MarshalJSON ¶
func (d *DateTimeString) MarshalJSON() ([]byte, error)
func (*DateTimeString) Scan ¶
func (d *DateTimeString) Scan(src interface{}) error
func (*DateTimeString) UnmarshalJSON ¶
func (d *DateTimeString) UnmarshalJSON(src []byte) error
type FormActions ¶
Click to show internal directories.
Click to hide internal directories.