Documentation
¶
Index ¶
- Constants
- Variables
- func FieldType(name string) string
- type TypeCommand
- type TypeField
- type TypeGroup
- type TypeLink
- type TypeModule
- type TypeModuleField
- type TypeModuleLink
- type TypeModuleModule
- type TypeModulePath
- type TypeModuleTranslation
- type TypeModuleTree
- type TypeRow
- type TypeRows
- type TypeRun
- type TypeSearchColumn
- type TypeSelect
- type TypeSession
- func (session *TypeSession) AutoSearch(moduleId int64) (check bool)
- func (session *TypeSession) Bool(value any) bool
- func (session *TypeSession) Close() error
- func (session *TypeSession) Cols(query string, args ...any) ([]string, error)
- func (session *TypeSession) CommandExists(commands []TypeCommand, commandName string) bool
- func (session *TypeSession) Commands(userId int64, moduleId int64, actionType string) ([]TypeCommand, error)
- func (session *TypeSession) Del(ownerId int64, moduleId, ejaId int64) error
- func (session *TypeSession) FieldAdd(tableName string, fieldName string, fieldType string) error
- func (session *TypeSession) FieldExists(tableName string, fieldName string) (bool, error)
- func (session *TypeSession) FieldNameIsValid(name string) error
- func (session *TypeSession) FieldNameList(moduleId int64, actionType string) (fields []string)
- func (session *TypeSession) FieldTypeGet(moduleId int64, fieldName string) string
- func (session *TypeSession) Fields(ownerId int64, moduleId int64, actionType string, values map[string]string) ([]TypeField, error)
- func (session *TypeSession) Float(nameValue any) float64
- func (session *TypeSession) Get(ownerId int64, moduleId int64, ejaId int64) (TypeRow, error)
- func (session *TypeSession) GroupExport(groupId int64) (group TypeGroup, err error)
- func (session *TypeSession) GroupImport(group TypeGroup, groupName string) (err error)
- func (session *TypeSession) IncludeList(query string, args ...any) ([]int64, error)
- func (session *TypeSession) IsSubModule(moduleId int64) bool
- func (session *TypeSession) LinkAdd(ownerId int64, moduleId int64, fieldId int64, linkModuleId int64, ...) error
- func (session *TypeSession) LinkCopy(userId int64, dstFieldNew int64, dstModule int64, dstFieldOriginal int64) (TypeRun, error)
- func (session *TypeSession) LinkDel(ownerId int64, moduleId int64, fieldId int64, linkModuleId int64, ...) error
- func (session *TypeSession) ModuleAppend(module TypeModule, moduleName string) error
- func (session *TypeSession) ModuleExport(moduleId int64, data bool) (module TypeModule, err error)
- func (session *TypeSession) ModuleGetIdByName(name string) int64
- func (session *TypeSession) ModuleGetNameById(id int64) string
- func (session *TypeSession) ModuleImport(module TypeModule, moduleName string) error
- func (session *TypeSession) ModuleLinks(ownerId int64, moduleId int64) (result []TypeLink)
- func (session *TypeSession) ModuleLinksFieldName(moduleId, linkModuleId int64) string
- func (session *TypeSession) ModulePath(ownerId int64, moduleId int64) (result []TypeModulePath)
- func (session *TypeSession) ModuleTree(ownerId int64, moduleId int64, modulePath []TypeModulePath) (result []TypeModuleTree)
- func (session *TypeSession) New(ownerId int64, moduleId int64) (int64, error)
- func (session TypeSession) Now() string
- func (session *TypeSession) Number(nameValue any) int64
- func (session *TypeSession) NumbersToCsv(slice []int64) string
- func (session *TypeSession) Open(engine string, database string, username string, password string, host string, ...) (err error)
- func (session *TypeSession) Owners(ownerId int64, moduleId int64) (result []int64)
- func (session *TypeSession) OwnersCsv(ownerId int64, moduleId int64) string
- func (session *TypeSession) Password(value string) string
- func (session *TypeSession) PermissionAdd(userId int64, moduleId int64, commandName string) int64
- func (session *TypeSession) PermissionAddDefault(userId int64, moduleId int64) int64
- func (session *TypeSession) PermissionCount(moduleId int64) int64
- func (session *TypeSession) Put(ownerId int64, moduleId int64, ejaId int64, fieldName string, fieldValue any) error
- func (session *TypeSession) Row(query string, args ...any) (result TypeRow, err error)
- func (session *TypeSession) Rows(query string, args ...any) (result TypeRows, err error)
- func (session *TypeSession) Run(query string, args ...any) (result TypeRun, err error)
- func (session *TypeSession) SearchCount(query string, args []any) int64
- func (session *TypeSession) SearchLinks(ownerId int64, srcModuleId int64, srcFieldId int64, dstModuleId int64) []string
- func (session *TypeSession) SearchMatrix(ownerId int64, moduleId int64, query string, queryArgs []any) (resultRows TypeRows, resultCols []string, resultLabels map[string]string, ...)
- func (session *TypeSession) SearchQuery(ownerId int64, tableName string, values map[string]string) (string, []any, error)
- func (session *TypeSession) SearchQueryLinks(ownerId, srcModuleId, srcFieldId, dstModuleId int64) string
- func (session *TypeSession) SearchQueryOrderAndLimit(order string, limit int64, offset int64) string
- func (session *TypeSession) SelectSqlToRows(query string) []TypeSelect
- func (session *TypeSession) SelectToRows(value string) []TypeSelect
- func (session *TypeSession) SessionCleanLink(userId int64) error
- func (session *TypeSession) SessionCleanSearch(userId int64) error
- func (session *TypeSession) SessionInit(userId int64) string
- func (session *TypeSession) SessionLoad(userId int64, moduleId int64) (TypeRows, error)
- func (session *TypeSession) SessionPut(userId int64, name string, value string, subName ...string) (err error)
- func (session *TypeSession) SessionReset(userId int64) error
- func (session *TypeSession) SessionTokenUpdate(userId int64, sessionHash string) string
- func (session *TypeSession) Setup(setupPath string) error
- func (session *TypeSession) SetupAdmin(setupUser string, setupPass string) error
- func (session *TypeSession) Sha256(value string) string
- func (session *TypeSession) String(nameValue any) string
- func (session *TypeSession) SubModules(ownerId int64, moduleId int64) (result []TypeLink)
- func (session *TypeSession) TableAdd(name string, tmp ...bool) error
- func (session *TypeSession) TableDel(name string) error
- func (session *TypeSession) TableExists(name string) (bool, error)
- func (session *TypeSession) TableGetAllById(tableName string, ejaId int64) TypeRow
- func (session *TypeSession) TableNameIsValid(name string) error
- func (session *TypeSession) Translate(value string, user ...int64) string
- func (session *TypeSession) UserGetAllById(userId int64) TypeRow
- func (session *TypeSession) UserGetAllBySession(sessionHash string) TypeRow
- func (session *TypeSession) UserGetAllByUserAndPass(username string, password string) TypeRow
- func (session *TypeSession) UserGetAllByUsername(username string) TypeRow
- func (session *TypeSession) UserGroupCsv(userId int64) string
- func (session *TypeSession) UserGroupList(userId int64) []int64
- func (session *TypeSession) UserPermissionCopy(userId int64, moduleId int64)
- func (session *TypeSession) Value(query string, args ...any) (result string, err error)
Constants ¶
View Source
const (
SESSION_EXPIRE = 10000 //>2 <6 hours
)
Variables ¶
View Source
var Assets embed.FS
Functions ¶
Types ¶
type TypeCommand ¶
type TypeModule ¶
type TypeModule struct {
Module TypeModuleModule `json:"module"`
Command []string `json:"command"`
Field []TypeModuleField `json:"field"`
Link []TypeModuleLink `json:"link,omitempty"`
Translation []TypeModuleTranslation `json:"translation,omitempty"`
Name string `json:"name"`
Data []map[string]any `json:"data,omitempty"`
Type string `json:"type"`
}
type TypeModuleField ¶
type TypeModuleField struct {
Value string `json:"value"`
PowerEdit int64 `json:"powerEdit"`
PowerList int64 `json:"powerList"`
Type string `json:"type"`
Translate int64 `json:"translate"`
PowerSearch int64 `json:"powerSearch"`
Name string `json:"name"`
SizeSearch int64 `json:"sizeSearch"`
SizeList int64 `json:"sizeList"`
SizeEdit int64 `json:"sizeEdit"`
}
type TypeModuleLink ¶
type TypeModuleModule ¶
type TypeModulePath ¶
type TypeModuleTranslation ¶
type TypeModuleTree ¶
type TypeSearchColumn ¶
type TypeSelect ¶
type TypeSession ¶
func Session ¶
func Session() TypeSession
func (*TypeSession) AutoSearch ¶
func (session *TypeSession) AutoSearch(moduleId int64) (check bool)
func (*TypeSession) Bool ¶
func (session *TypeSession) Bool(value any) bool
func (*TypeSession) Close ¶
func (session *TypeSession) Close() error
func (*TypeSession) Cols ¶
func (session *TypeSession) Cols(query string, args ...any) ([]string, error)
func (*TypeSession) CommandExists ¶
func (session *TypeSession) CommandExists(commands []TypeCommand, commandName string) bool
func (*TypeSession) Commands ¶
func (session *TypeSession) Commands(userId int64, moduleId int64, actionType string) ([]TypeCommand, error)
func (*TypeSession) Del ¶
func (session *TypeSession) Del(ownerId int64, moduleId, ejaId int64) error
func (*TypeSession) FieldAdd ¶
func (session *TypeSession) FieldAdd(tableName string, fieldName string, fieldType string) error
func (*TypeSession) FieldExists ¶
func (session *TypeSession) FieldExists(tableName string, fieldName string) (bool, error)
func (*TypeSession) FieldNameIsValid ¶
func (session *TypeSession) FieldNameIsValid(name string) error
func (*TypeSession) FieldNameList ¶
func (session *TypeSession) FieldNameList(moduleId int64, actionType string) (fields []string)
func (*TypeSession) FieldTypeGet ¶
func (session *TypeSession) FieldTypeGet(moduleId int64, fieldName string) string
func (*TypeSession) Float ¶
func (session *TypeSession) Float(nameValue any) float64
func (*TypeSession) GroupExport ¶
func (session *TypeSession) GroupExport(groupId int64) (group TypeGroup, err error)
func (*TypeSession) GroupImport ¶
func (session *TypeSession) GroupImport(group TypeGroup, groupName string) (err error)
func (*TypeSession) IncludeList ¶
func (session *TypeSession) IncludeList(query string, args ...any) ([]int64, error)
func (*TypeSession) IsSubModule ¶
func (session *TypeSession) IsSubModule(moduleId int64) bool
func (*TypeSession) ModuleAppend ¶
func (session *TypeSession) ModuleAppend(module TypeModule, moduleName string) error
func (*TypeSession) ModuleExport ¶
func (session *TypeSession) ModuleExport(moduleId int64, data bool) (module TypeModule, err error)
func (*TypeSession) ModuleGetIdByName ¶
func (session *TypeSession) ModuleGetIdByName(name string) int64
func (*TypeSession) ModuleGetNameById ¶
func (session *TypeSession) ModuleGetNameById(id int64) string
func (*TypeSession) ModuleImport ¶
func (session *TypeSession) ModuleImport(module TypeModule, moduleName string) error
func (*TypeSession) ModuleLinks ¶
func (session *TypeSession) ModuleLinks(ownerId int64, moduleId int64) (result []TypeLink)
func (*TypeSession) ModuleLinksFieldName ¶
func (session *TypeSession) ModuleLinksFieldName(moduleId, linkModuleId int64) string
func (*TypeSession) ModulePath ¶
func (session *TypeSession) ModulePath(ownerId int64, moduleId int64) (result []TypeModulePath)
func (*TypeSession) ModuleTree ¶
func (session *TypeSession) ModuleTree(ownerId int64, moduleId int64, modulePath []TypeModulePath) (result []TypeModuleTree)
func (*TypeSession) New ¶
func (session *TypeSession) New(ownerId int64, moduleId int64) (int64, error)
func (TypeSession) Now ¶
func (session TypeSession) Now() string
func (*TypeSession) Number ¶
func (session *TypeSession) Number(nameValue any) int64
func (*TypeSession) NumbersToCsv ¶
func (session *TypeSession) NumbersToCsv(slice []int64) string
func (*TypeSession) Owners ¶
func (session *TypeSession) Owners(ownerId int64, moduleId int64) (result []int64)
func (*TypeSession) OwnersCsv ¶
func (session *TypeSession) OwnersCsv(ownerId int64, moduleId int64) string
func (*TypeSession) Password ¶
func (session *TypeSession) Password(value string) string
func (*TypeSession) PermissionAdd ¶
func (session *TypeSession) PermissionAdd(userId int64, moduleId int64, commandName string) int64
func (*TypeSession) PermissionAddDefault ¶
func (session *TypeSession) PermissionAddDefault(userId int64, moduleId int64) int64
func (*TypeSession) PermissionCount ¶
func (session *TypeSession) PermissionCount(moduleId int64) int64
func (*TypeSession) Row ¶
func (session *TypeSession) Row(query string, args ...any) (result TypeRow, err error)
func (*TypeSession) Rows ¶
func (session *TypeSession) Rows(query string, args ...any) (result TypeRows, err error)
func (*TypeSession) Run ¶
func (session *TypeSession) Run(query string, args ...any) (result TypeRun, err error)
func (*TypeSession) SearchCount ¶
func (session *TypeSession) SearchCount(query string, args []any) int64
func (*TypeSession) SearchLinks ¶
func (*TypeSession) SearchMatrix ¶
func (*TypeSession) SearchQuery ¶
func (*TypeSession) SearchQueryLinks ¶
func (session *TypeSession) SearchQueryLinks(ownerId, srcModuleId, srcFieldId, dstModuleId int64) string
func (*TypeSession) SearchQueryOrderAndLimit ¶
func (session *TypeSession) SearchQueryOrderAndLimit(order string, limit int64, offset int64) string
func (*TypeSession) SelectSqlToRows ¶
func (session *TypeSession) SelectSqlToRows(query string) []TypeSelect
func (*TypeSession) SelectToRows ¶
func (session *TypeSession) SelectToRows(value string) []TypeSelect
func (*TypeSession) SessionCleanLink ¶
func (session *TypeSession) SessionCleanLink(userId int64) error
func (*TypeSession) SessionCleanSearch ¶
func (session *TypeSession) SessionCleanSearch(userId int64) error
func (*TypeSession) SessionInit ¶
func (session *TypeSession) SessionInit(userId int64) string
func (*TypeSession) SessionLoad ¶
func (session *TypeSession) SessionLoad(userId int64, moduleId int64) (TypeRows, error)
func (*TypeSession) SessionPut ¶
func (*TypeSession) SessionReset ¶
func (session *TypeSession) SessionReset(userId int64) error
func (*TypeSession) SessionTokenUpdate ¶
func (session *TypeSession) SessionTokenUpdate(userId int64, sessionHash string) string
func (*TypeSession) Setup ¶
func (session *TypeSession) Setup(setupPath string) error
func (*TypeSession) SetupAdmin ¶
func (session *TypeSession) SetupAdmin(setupUser string, setupPass string) error
func (*TypeSession) Sha256 ¶
func (session *TypeSession) Sha256(value string) string
func (*TypeSession) String ¶
func (session *TypeSession) String(nameValue any) string
func (*TypeSession) SubModules ¶
func (session *TypeSession) SubModules(ownerId int64, moduleId int64) (result []TypeLink)
func (*TypeSession) TableDel ¶
func (session *TypeSession) TableDel(name string) error
func (*TypeSession) TableExists ¶
func (session *TypeSession) TableExists(name string) (bool, error)
func (*TypeSession) TableGetAllById ¶
func (session *TypeSession) TableGetAllById(tableName string, ejaId int64) TypeRow
func (*TypeSession) TableNameIsValid ¶
func (session *TypeSession) TableNameIsValid(name string) error
func (*TypeSession) Translate ¶
func (session *TypeSession) Translate(value string, user ...int64) string
func (*TypeSession) UserGetAllById ¶
func (session *TypeSession) UserGetAllById(userId int64) TypeRow
func (*TypeSession) UserGetAllBySession ¶
func (session *TypeSession) UserGetAllBySession(sessionHash string) TypeRow
func (*TypeSession) UserGetAllByUserAndPass ¶
func (session *TypeSession) UserGetAllByUserAndPass(username string, password string) TypeRow
func (*TypeSession) UserGetAllByUsername ¶
func (session *TypeSession) UserGetAllByUsername(username string) TypeRow
func (*TypeSession) UserGroupCsv ¶
func (session *TypeSession) UserGroupCsv(userId int64) string
func (*TypeSession) UserGroupList ¶
func (session *TypeSession) UserGroupList(userId int64) []int64
func (*TypeSession) UserPermissionCopy ¶
func (session *TypeSession) UserPermissionCopy(userId int64, moduleId int64)
Click to show internal directories.
Click to hide internal directories.