Documentation
¶
Index ¶
- Constants
- Variables
- func ClearProjectModels()
- func CloneNetURL(url1 *url.URL) *url.URL
- func Contains(s []string, e string) bool
- func ContainsInt64(s []int64, e int64) bool
- func GenerateNumberSequence(start int, stop int) <-chan int
- func GetBluePrintNameFromMigrationName(migrationName string) string
- func GetDB(alias1 ...string) *gorm.DB
- func GetID(m reflect.Value) uint
- func IsTruthyValue(value interface{}) bool
- func LoadPermissions()
- func LoadSessions()
- func NewSwaggerSpec(file string) *loads.Document
- func PrepareStringToBeUsedForHTMLID(text string) string
- func Remove(items []string, item string) []string
- func RenderHTML(ctx *gin.Context, fsys fs.FS, path string, data interface{}, ...) error
- func RenderHTMLAsString(writer *bytes.Buffer, fsys fs.FS, path string, data interface{}, ...) error
- func RenderWidget(renderer ITemplateRenderer, templateName string, data map[string]interface{}, ...) string
- func SetUpStructField(structF reflect.Value, v interface{}) error
- func Syslogf(level int, msg string, a ...interface{})
- func Tf(path string, lang string, term string, args ...interface{}) string
- func Trail(level int, msg interface{}, i ...interface{})
- func TransformDateTimeValueForWidget(value interface{}) interface{}
- func TransformValueForListDisplay(value interface{}, forExportP ...bool) string
- func TransformValueForOperator(value interface{}) interface{}
- func TransformValueForWidget(value interface{}) interface{}
- func Translate(c *gin.Context, raw string, lang string, args ...bool) string
- func TraverseRemovalTreeNode(nodeToVisit *RemovalTreeNode, removalOrderList *RemovalOrderList)
- type AdminActionPlacement
- type AdminBreadCrumbsRegistry
- type AdminBreadcrumb
- type AdminContext
- func (c *AdminContext) GetCtx() *gin.Context
- func (c *AdminContext) GetID() uint
- func (c *AdminContext) GetLanguage() *Language
- func (c *AdminContext) GetPostForm() *multipart.Form
- func (c *AdminContext) GetRootURL() string
- func (c *AdminContext) GetSessionKey() string
- func (c *AdminContext) GetUserObject() *User
- func (c *AdminContext) SetBreadCrumbs(breadcrumbs *AdminBreadCrumbsRegistry)
- func (c *AdminContext) SetCtx(ctx *gin.Context)
- func (c *AdminContext) SetCurrentQuery(currentQuery string)
- func (c *AdminContext) SetCurrentURL(currentURL string)
- func (c *AdminContext) SetDemo()
- func (c *AdminContext) SetError(err string)
- func (c *AdminContext) SetErrorExists()
- func (c *AdminContext) SetFavIcon(favicon string)
- func (c *AdminContext) SetForm(form IForm)
- func (c *AdminContext) SetFullURL(fullURL *url.URL)
- func (c *AdminContext) SetID(ID uint)
- func (c *AdminContext) SetLanguage(language *Language)
- func (c *AdminContext) SetLanguages(langs []Language)
- func (c *AdminContext) SetLogo(logo string)
- func (c *AdminContext) SetPageTitle(pageTitle string)
- func (c *AdminContext) SetPostForm(formD *multipart.Form)
- func (c *AdminContext) SetRootAdminURL(rootAdminURL string)
- func (c *AdminContext) SetRootURL(rootURL string)
- func (c *AdminContext) SetSessionKey(sessionKey string)
- func (c *AdminContext) SetSiteName(siteName string)
- func (c *AdminContext) SetUser(user string)
- func (c *AdminContext) SetUserExists(userExists bool)
- func (c *AdminContext) SetUserObject(u *User)
- func (c *AdminContext) SetUserPermissionRegistry(permRegistry *UserPermRegistry)
- type AdminFilterObjects
- func (afo *AdminFilterObjects) CreateNew(model interface{}) error
- func (afo *AdminFilterObjects) GenerateModelInterface() (interface{}, interface{})
- func (afo *AdminFilterObjects) GetCurrentModel() interface{}
- func (afo *AdminFilterObjects) GetFullQuerySet() IPersistenceStorage
- func (afo *AdminFilterObjects) GetInitialQuerySet() IPersistenceStorage
- func (afo *AdminFilterObjects) GetPaginated() <-chan *IterateAdminObjects
- func (afo *AdminFilterObjects) GetPaginatedQuerySet() IPersistenceStorage
- func (afo *AdminFilterObjects) GetUadminDatabase() *UadminDatabase
- func (afo *AdminFilterObjects) IterateThroughWholeQuerySet() <-chan *IterateAdminObjects
- func (afo *AdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{})
- func (afo *AdminFilterObjects) RemoveModelPermanently(model interface{}) error
- func (afo *AdminFilterObjects) SaveModel(model interface{}) error
- func (afo *AdminFilterObjects) SetFullQuerySet(storage IPersistenceStorage)
- func (afo *AdminFilterObjects) SetInitialQuerySet(storage IPersistenceStorage)
- func (afo *AdminFilterObjects) SetPaginatedQuerySet(storage IPersistenceStorage)
- func (afo *AdminFilterObjects) WithTransaction(handler func(afo1 IAdminFilterObjects) error)
- type AdminModelAction
- type AdminModelActionRegistry
- func (amar *AdminModelActionRegistry) AddModelAction(ma *AdminModelAction)
- func (amar *AdminModelActionRegistry) GetAllModelActions() <-chan *AdminModelAction
- func (amar *AdminModelActionRegistry) GetModelActionByName(actionName string) (*AdminModelAction, error)
- func (amar *AdminModelActionRegistry) IsThereAnyActions() bool
- type AdminPage
- type AdminPageInline
- func (api *AdminPageInline) GetAll(model interface{}, rp *AdminRequestParams) <-chan *IterateAdminObjects
- func (api *AdminPageInline) GetFormForExample(adminContext IAdminContext) *FormListEditable
- func (api *AdminPageInline) GetFormIdenForNewItems() string
- func (api *AdminPageInline) GetInlineID() string
- func (api *AdminPageInline) ProceedRequest(afo IAdminFilterObjects, ctx *gin.Context, f *multipart.Form, ...) (InlineFormListEditableCollection, error)
- func (api *AdminPageInline) RenderExampleForm(adminContext IAdminContext) string
- type AdminPageInlineRegistry
- type AdminPageRegistry
- func (apr *AdminPageRegistry) AddAdminPage(adminPage *AdminPage) error
- func (apr *AdminPageRegistry) GetAll() <-chan *AdminPage
- func (apr *AdminPageRegistry) GetByModelName(modelName string) *AdminPage
- func (apr *AdminPageRegistry) GetBySlug(slug string) (*AdminPage, error)
- func (apr *AdminPageRegistry) PreparePagesForTemplate(permRegistry *UserPermRegistry) []byte
- type AdminPagesList
- type AdminRequestPaginator
- type AdminRequestParams
- type Blueprint
- type BlueprintRegistry
- func (r BlueprintRegistry) GetByName(name string) (IBlueprint, error)
- func (r BlueprintRegistry) GetMigrationTree() IMigrationTree
- func (r BlueprintRegistry) Initialize()
- func (r BlueprintRegistry) InitializeRouting(router *gin.Engine)
- func (r BlueprintRegistry) Iterate() <-chan IBlueprint
- func (r BlueprintRegistry) Register(blueprint IBlueprint)
- func (r BlueprintRegistry) ResetMigrationTree()
- func (r BlueprintRegistry) TraverseMigrations() <-chan *TraverseMigrationResult
- func (r BlueprintRegistry) TraverseMigrationsDownTo(downToMigration int64) <-chan *TraverseMigrationResult
- type CheckboxSelectMultipleWidget
- func (w *CheckboxSelectMultipleWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
- func (w *CheckboxSelectMultipleWidget) GetTemplateName() string
- func (w *CheckboxSelectMultipleWidget) GetWidgetType() WidgetType
- func (w *CheckboxSelectMultipleWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *CheckboxSelectMultipleWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *CheckboxSelectMultipleWidget) SetID(ID string)
- type CheckboxWidget
- func (w *CheckboxWidget) GetTemplateName() string
- func (w *CheckboxWidget) GetWidgetType() WidgetType
- func (w *CheckboxWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *CheckboxWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *CheckboxWidget) SetValue(v interface{})
- type ChooseFromSelectWidget
- func (w *ChooseFromSelectWidget) GetTemplateName() string
- func (w *ChooseFromSelectWidget) GetWidgetType() WidgetType
- func (w *ChooseFromSelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *ChooseFromSelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type ClearableFileWidget
- func (w *ClearableFileWidget) GetTemplateName() string
- func (w *ClearableFileWidget) GetWidgetType() WidgetType
- func (w *ClearableFileWidget) IsInitial() bool
- func (w *ClearableFileWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *ClearableFileWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *ClearableFileWidget) SetID(ID string)
- type ColumnSchema
- type ConnectionToParentModel
- type ContainsGormOperator
- func (ego *ContainsGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *ContainsGormOperator) GetName() string
- func (ego *ContainsGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *ContainsGormOperator) TransformValue(value string) interface{}
- type ContentType
- type ContentTypeSelectorWidget
- func (w *ContentTypeSelectorWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *ContentTypeSelectorWidget) GetTemplateName() string
- func (w *ContentTypeSelectorWidget) GetWidgetType() WidgetType
- func (w *ContentTypeSelectorWidget) PopulateSelectorOptions(afo IAdminFilterObjects)
- func (w *ContentTypeSelectorWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *ContentTypeSelectorWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type CustomPermission
- type DBSettings
- type DashboardAdminPanel
- type Database
- type DatabaseSettings
- type DateGormOperator
- func (ego *DateGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *DateGormOperator) GetName() string
- func (ego *DateGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *DateGormOperator) TransformValue(value string) interface{}
- type DateTimeWidget
- type DateWidget
- type DayGormOperator
- func (ego *DayGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *DayGormOperator) GetName() string
- func (ego *DayGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *DayGormOperator) TransformValue(value string) interface{}
- type DeleteRowStructure
- type DisplayFilterOption
- type DynamicWidget
- type EmailWidget
- type EndsWithGormOperator
- func (ego *EndsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *EndsWithGormOperator) GetName() string
- func (ego *EndsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *EndsWithGormOperator) TransformValue(value string) interface{}
- type ExactGormOperator
- func (ego *ExactGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *ExactGormOperator) GetName() string
- func (ego *ExactGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *ExactGormOperator) TransformValue(value string) interface{}
- type Field
- type FieldChoice
- type FieldChoiceRegistry
- type FieldConfig
- type FieldFormOptions
- func (ffo *FieldFormOptions) GetChoices() *FieldChoiceRegistry
- func (ffo *FieldFormOptions) GetDisplayName() string
- func (ffo *FieldFormOptions) GetHelpText() string
- func (ffo *FieldFormOptions) GetInitial() interface{}
- func (ffo *FieldFormOptions) GetIsRequired() bool
- func (ffo *FieldFormOptions) GetName() string
- func (ffo *FieldFormOptions) GetReadOnly() bool
- func (ffo *FieldFormOptions) GetValidators() *ValidatorRegistry
- func (ffo *FieldFormOptions) GetWidgetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
- func (ffo *FieldFormOptions) GetWidgetType() string
- func (ffo *FieldFormOptions) IsItFk() bool
- type FieldRegistry
- type FileForStorage
- type FileWidget
- type FilterOption
- type FilterOptionsRegistry
- type FkLinkWidget
- type ForeignKeyWidget
- func (w *ForeignKeyWidget) BuildChoices(formRenderContext *FormRenderContext)
- func (w *ForeignKeyWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *ForeignKeyWidget) GetTemplateName() string
- func (w *ForeignKeyWidget) GetWidgetType() WidgetType
- func (w *ForeignKeyWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *ForeignKeyWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type Form
- type FormError
- type FormListEditable
- type FormListEditableCollection
- func (flec *FormListEditableCollection) AddForInline(prefix string, ID string, formListEditable *FormListEditable)
- func (flec *FormListEditableCollection) AddForInlineWholeCollection(prefix string, collection InlineFormListEditableCollection)
- func (flec *FormListEditableCollection) GetForInlineAndForModel(prefix string, ID uint) *FormListEditable
- func (flec *FormListEditableCollection) GetForInlineNew(prefix string) <-chan *FormListEditable
- type FormRenderContext
- type FormRow
- type FsStorage
- func (s *FsStorage) Delete(filename string) (bool, error)
- func (s *FsStorage) Exists(filename string) (bool, error)
- func (s *FsStorage) GetUploadURL() string
- func (s *FsStorage) Read(filename string) ([]byte, error)
- func (s *FsStorage) Save(f *FileForStorage) (string, error)
- func (s *FsStorage) Stats(filename string) (os.FileInfo, error)
- type GormOperatorContext
- type GormOperatorRegistry
- type GormPersistenceStorage
- func (gps *GormPersistenceStorage) AddError(err error) error
- func (gps *GormPersistenceStorage) Assign(attrs ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Association(column string) IPersistenceAssociation
- func (gps *GormPersistenceStorage) Attrs(attrs ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) AutoMigrate(dst ...interface{}) error
- func (gps *GormPersistenceStorage) Begin(opts ...*sql.TxOptions) IPersistenceStorage
- func (gps *GormPersistenceStorage) Clauses(conds ...clause.Expression) IPersistenceStorage
- func (gps *GormPersistenceStorage) Commit() IPersistenceStorage
- func (gps *GormPersistenceStorage) Count(count *int64) IPersistenceStorage
- func (gps *GormPersistenceStorage) Create(value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) CreateInBatches(value interface{}, batchSize int) IPersistenceStorage
- func (gps *GormPersistenceStorage) DB() (*sql.DB, error)
- func (gps *GormPersistenceStorage) Debug() IPersistenceStorage
- func (gps *GormPersistenceStorage) Delete(value interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Distinct(args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Exec(sql string, values ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Find(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) FindInBatches(dest interface{}, batchSize int, fc func(tx *gorm.DB, batch int) error) IPersistenceStorage
- func (gps *GormPersistenceStorage) First(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) FirstOrCreate(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) FirstOrInit(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Get(key string) (interface{}, bool)
- func (gps *GormPersistenceStorage) GetCurrentDB() *gorm.DB
- func (gps *GormPersistenceStorage) Group(name string) IPersistenceStorage
- func (gps *GormPersistenceStorage) Having(query interface{}, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) InstanceGet(key string) (interface{}, bool)
- func (gps *GormPersistenceStorage) InstanceSet(key string, value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Joins(query string, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Last(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Limit(limit int) IPersistenceStorage
- func (gps *GormPersistenceStorage) Migrator() IPersistenceMigrator
- func (gps *GormPersistenceStorage) Model(value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Not(query interface{}, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Offset(offset int) IPersistenceStorage
- func (gps *GormPersistenceStorage) Omit(columns ...string) IPersistenceStorage
- func (gps *GormPersistenceStorage) Or(query interface{}, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Order(value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Pluck(column string, dest interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Preload(query string, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Raw(sql string, values ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Rollback() IPersistenceStorage
- func (gps *GormPersistenceStorage) RollbackTo(name string) IPersistenceStorage
- func (gps *GormPersistenceStorage) Row() IPersistenceIterateRow
- func (gps *GormPersistenceStorage) Rows() (IPersistenceIterateRows, error)
- func (gps *GormPersistenceStorage) Save(value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) SavePoint(name string) IPersistenceStorage
- func (gps *GormPersistenceStorage) Scan(dest interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) ScanRows(rows IPersistenceIterateRows, dest interface{}) error
- func (gps *GormPersistenceStorage) Scopes(funcs ...func(*gorm.DB) *gorm.DB) IPersistenceStorage
- func (gps *GormPersistenceStorage) Select(query interface{}, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Session(config *gorm.Session) IPersistenceStorage
- func (gps *GormPersistenceStorage) Set(key string, value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) SetupJoinTable(model interface{}, field string, joinTable interface{}) error
- func (gps *GormPersistenceStorage) Table(name string, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Take(dest interface{}, conds ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Transaction(fc func(*gorm.DB) error, opts ...*sql.TxOptions) (err error)
- func (gps *GormPersistenceStorage) Unscoped() IPersistenceStorage
- func (gps *GormPersistenceStorage) Update(column string, value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) UpdateColumn(column string, value interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) UpdateColumns(values interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Updates(values interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) Use(plugin gorm.Plugin) error
- func (gps *GormPersistenceStorage) Where(query interface{}, args ...interface{}) IPersistenceStorage
- func (gps *GormPersistenceStorage) WithContext(ctx context.Context) IPersistenceStorage
- type GormQueryBuilder
- type GrouppedFields
- type GrouppedFieldsRegistry
- type GtGormOperator
- func (ego *GtGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *GtGormOperator) GetName() string
- func (ego *GtGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *GtGormOperator) TransformValue(value string) interface{}
- type GteGormOperator
- func (ego *GteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *GteGormOperator) GetName() string
- func (ego *GteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *GteGormOperator) TransformValue(value string) interface{}
- type HiddenWidget
- type HourGormOperator
- func (ego *HourGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *HourGormOperator) GetName() string
- func (ego *HourGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *HourGormOperator) TransformValue(value string) interface{}
- type IAdminContext
- type IAdminFilterObjects
- type IAdminModelActionInterface
- type IBlueprint
- type IBlueprintRegistry
- type ICommand
- type IContainsGormOperator
- func (ego *IContainsGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IContainsGormOperator) GetName() string
- func (ego *IContainsGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IContainsGormOperator) TransformValue(value string) interface{}
- type IDbAdapter
- type IEndsWithGormOperator
- func (ego *IEndsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IEndsWithGormOperator) GetName() string
- func (ego *IEndsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IEndsWithGormOperator) TransformValue(value string) interface{}
- type IExactGormOperator
- func (ego *IExactGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IExactGormOperator) GetName() string
- func (ego *IExactGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IExactGormOperator) TransformValue(value string) interface{}
- type IFieldChoiceRegistryInterface
- type IFieldFormOptions
- type IFieldRegistry
- type IForm
- type IGormOperator
- type IGrouppedFieldsRegistry
- type IListDisplayInterface
- type IListFilterInterface
- type IMigration
- type IMigrationNode
- type IMigrationRegistry
- type IMigrationTree
- type IPaginationInterface
- type IPermissionRegistry
- type IPersistenceAssociation
- type IPersistenceIterateRow
- type IPersistenceIterateRows
- type IPersistenceMigrator
- type IPersistenceStorage
- type IRegexGormOperator
- func (ego *IRegexGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IRegexGormOperator) GetName() string
- func (ego *IRegexGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IRegexGormOperator) TransformValue(value string) interface{}
- type IRegisterDbHandler
- type ISearchFieldInterface
- type ISortBy
- type ISortInterface
- type IStartsWithGormOperator
- func (ego *IStartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IStartsWithGormOperator) GetName() string
- func (ego *IStartsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IStartsWithGormOperator) TransformValue(value string) interface{}
- type IStorageInterface
- type ITemplateRenderer
- type IUserPermissionRegistry
- type IValidator
- type IWidget
- type InGormOperator
- func (ego *InGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *InGormOperator) GetName() string
- func (ego *InGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *InGormOperator) TransformValue(value string) interface{}
- type IncludeContext
- type InlineFormListEditableCollection
- type InlineType
- type IsNullGormOperator
- func (ego *IsNullGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *IsNullGormOperator) GetName() string
- func (ego *IsNullGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *IsNullGormOperator) TransformValue(value string) interface{}
- type IterateAdminObjects
- type Language
- type ListDisplay
- type ListDisplayRegistry
- func (ldr *ListDisplayRegistry) AddField(ld *ListDisplay)
- func (ldr *ListDisplayRegistry) BuildFormForListEditable(adminContext IAdminContext, ID uint, model interface{}) *FormListEditable
- func (ldr *ListDisplayRegistry) BuildListEditableFormForNewModel(adminContext IAdminContext, ID string, model interface{}) *FormListEditable
- func (ldr *ListDisplayRegistry) ClearAllFields()
- func (ldr *ListDisplayRegistry) GetAllFields() <-chan *ListDisplay
- func (ldr *ListDisplayRegistry) GetFieldByDisplayName(displayName string) (*ListDisplay, error)
- func (ldr *ListDisplayRegistry) GetFieldsCount() int
- func (ldr *ListDisplayRegistry) IsThereAnyEditable() bool
- func (ldr *ListDisplayRegistry) SetPrefix(prefix string)
- type ListFilter
- func (lf *ListFilter) FilterQs(afo IAdminFilterObjects, filterString string)
- func (lf *ListFilter) GetURLForOption(option *FieldChoice, fullURL *url.URL) string
- func (lf *ListFilter) GetURLToClearFilter(fullURL *url.URL) string
- func (lf *ListFilter) IsItActive(fullURL *url.URL) bool
- func (lf *ListFilter) IsThatOptionActive(option *FieldChoice, fullURL *url.URL) bool
- type ListFilterList
- type ListFilterRegistry
- type LtGormOperator
- func (ego *LtGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *LtGormOperator) GetName() string
- func (ego *LtGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *LtGormOperator) TransformValue(value string) interface{}
- type LteGormOperator
- func (ego *LteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *LteGormOperator) GetName() string
- func (ego *LteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *LteGormOperator) TransformValue(value string) interface{}
- type MigrationDepList
- type MigrationList
- type MigrationNode
- func (n MigrationNode) AddChild(node IMigrationNode)
- func (n MigrationNode) AddDep(node IMigrationNode)
- func (n MigrationNode) Apply(uadminDatabase *UadminDatabase) error
- func (n MigrationNode) Downgrade(uadminDatabase *UadminDatabase) error
- func (n MigrationNode) GetChildren() *list.List
- func (n MigrationNode) GetChildrenCount() int
- func (n MigrationNode) GetDeps() *list.List
- func (n MigrationNode) GetMigration() IMigration
- func (n MigrationNode) IsApplied() bool
- func (n MigrationNode) IsDummy() bool
- func (n MigrationNode) IsRoot() bool
- func (n MigrationNode) SetItAsRoot()
- func (n MigrationNode) TraverseChildren(migrationList []int64) []int64
- func (n MigrationNode) TraverseDeps(migrationList []int64, depList MigrationDepList) MigrationDepList
- type MigrationRegistry
- type MigrationTree
- func (t MigrationTree) AddNode(node IMigrationNode) error
- func (t MigrationTree) GetNodeByMigrationID(migrationID int64) (IMigrationNode, error)
- func (t MigrationTree) GetNodeByMigrationName(migrationName string) (IMigrationNode, error)
- func (t MigrationTree) GetRoot() IMigrationNode
- func (t MigrationTree) IsTreeBuilt() bool
- func (t MigrationTree) SetRoot(root IMigrationNode)
- func (t MigrationTree) TreeBuilt()
- type MinuteGormOperator
- func (ego *MinuteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *MinuteGormOperator) GetName() string
- func (ego *MinuteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *MinuteGormOperator) TransformValue(value string) interface{}
- type Model
- type ModelActionRequestParams
- type ModelDescription
- type MonthGormOperator
- func (ego *MonthGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *MonthGormOperator) GetName() string
- func (ego *MonthGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *MonthGormOperator) TransformValue(value string) interface{}
- type MultipleInputHiddenWidget
- func (w *MultipleInputHiddenWidget) GetTemplateName() string
- func (w *MultipleInputHiddenWidget) GetWidgetType() WidgetType
- func (w *MultipleInputHiddenWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *MultipleInputHiddenWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type NullBooleanWidget
- func (w *NullBooleanWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *NullBooleanWidget) GetOptGroups() map[string][]*SelectOptGroup
- func (w *NullBooleanWidget) GetTemplateName() string
- func (w *NullBooleanWidget) GetWidgetType() WidgetType
- func (w *NullBooleanWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *NullBooleanWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type NumberWidget
- func (w *NumberWidget) GetTemplateName() string
- func (w *NumberWidget) GetWidgetType() WidgetType
- func (w *NumberWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *NumberWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *NumberWidget) TransformValueForOutput(v string) interface{}
- type OneTimeAction
- type OneTimeActionType
- type PaginationType
- type Paginator
- type PasswordWidget
- type PermBitInteger
- type PermRegistry
- func (ap *PermRegistry) AddPermission(permission CustomPermission, permissionBit PermBitInteger)
- func (ap *PermRegistry) GetAllPermissions() <-chan *PermissionDescribed
- func (ap *PermRegistry) GetPermissionBit(permission CustomPermission) PermBitInteger
- func (ap *PermRegistry) GetPermissionName(permissionBit PermBitInteger) CustomPermission
- type Permission
- type PermissionDescribed
- type ProjectModelRegistry
- func (pmr *ProjectModelRegistry) GetModelByName(modelName string) *ModelDescription
- func (pmr *ProjectModelRegistry) GetModelFromInterface(model interface{}) *ModelDescription
- func (pmr *ProjectModelRegistry) Iterate() <-chan *ModelDescription
- func (pmr *ProjectModelRegistry) RegisterModel(generateModelI func() interface{})
- type QuarterGormOperator
- func (ego *QuarterGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *QuarterGormOperator) GetName() string
- func (ego *QuarterGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *QuarterGormOperator) TransformValue(value string) interface{}
- type RadioOptGroup
- type RadioOptGroupStringified
- type RadioSelectWidget
- func (w *RadioSelectWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
- func (w *RadioSelectWidget) GetTemplateName() string
- func (w *RadioSelectWidget) GetWidgetType() WidgetType
- func (w *RadioSelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *RadioSelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *RadioSelectWidget) SetID(ID string)
- type RangeGormOperator
- func (ego *RangeGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *RangeGormOperator) GetName() string
- func (ego *RangeGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *RangeGormOperator) TransformValue(value string) interface{}
- type RegexGormOperator
- func (ego *RegexGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *RegexGormOperator) GetName() string
- func (ego *RegexGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *RegexGormOperator) TransformValue(value string) interface{}
- type RemovalOrderList
- type RemovalTreeList
- type RemovalTreeNode
- type RemovalTreeNodeStringified
- type SearchField
- type SearchFieldRegistry
- type SecondGormOperator
- func (ego *SecondGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *SecondGormOperator) GetName() string
- func (ego *SecondGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *SecondGormOperator) TransformValue(value string) interface{}
- type SelectDateWidget
- func (w *SelectDateWidget) GetTemplateName() string
- func (w *SelectDateWidget) GetWidgetType() WidgetType
- func (w *SelectDateWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *SelectDateWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type SelectMultipleWidget
- func (w *SelectMultipleWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
- func (w *SelectMultipleWidget) GetTemplateName() string
- func (w *SelectMultipleWidget) GetWidgetType() WidgetType
- func (w *SelectMultipleWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *SelectMultipleWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type SelectOptGroup
- type SelectOptGroupStringified
- type SelectWidget
- func (w *SelectWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *SelectWidget) GetTemplateName() string
- func (w *SelectWidget) GetWidgetType() WidgetType
- func (w *SelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *SelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type Session
- func (s *Session) AfterFind(tx *gorm.DB) (err error)
- func (s *Session) BeforeSave(tx *gorm.DB) error
- func (s *Session) ClearAll() bool
- func (s *Session) GenerateKey()
- func (s *Session) GetData(name string) (string, error)
- func (Session) HideInDashboard() bool
- func (s *Session) Logout()
- func (s *Session) Save()
- func (s *Session) SetData(name string, value string) error
- func (s *Session) String() string
- type SortBy
- type SplitDateTimeWidget
- func (w *SplitDateTimeWidget) GetTemplateName() string
- func (w *SplitDateTimeWidget) GetWidgetType() WidgetType
- func (w *SplitDateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *SplitDateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type SplitHiddenDateTimeWidget
- func (w *SplitHiddenDateTimeWidget) GetTemplateName() string
- func (w *SplitHiddenDateTimeWidget) GetWidgetType() WidgetType
- func (w *SplitHiddenDateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *SplitHiddenDateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- type SqliteDialect
- func (d *SqliteDialect) BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure
- func (d *SqliteDialect) Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) CreateDb() error
- func (d *SqliteDialect) Date(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Day(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Delete(db *gorm.DB, model reflect.Value, query interface{}, args ...interface{}) *gorm.DB
- func (d *SqliteDialect) EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Equals(name interface{}, args ...interface{})
- func (d *SqliteDialect) Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) GetDb(alias string, dryRun bool) (*gorm.DB, error)
- func (d *SqliteDialect) GetLastInsertID()
- func (d *SqliteDialect) GetSQLDialectStrings() map[string]string
- func (d *SqliteDialect) GetStringToExtractMonthFromField(filterOptionField string) string
- func (d *SqliteDialect) GetStringToExtractYearFromField(filterOptionField string) string
- func (d *SqliteDialect) Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) In(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) LikeOperator() string
- func (d *SqliteDialect) Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Month(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Quote(name interface{}) string
- func (d *SqliteDialect) QuoteTableName(tableName string) string
- func (d *SqliteDialect) Range(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) ReadRows(db *gorm.DB, customSchema bool, SQL string, m interface{}, args ...interface{}) (*sql.Rows, error)
- func (d *SqliteDialect) Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Second(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Time(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) ToString() string
- func (d *SqliteDialect) Transaction(handler func()) error
- func (d *SqliteDialect) Week(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteDialect) Year(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- type StartsWithGormOperator
- func (ego *StartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *StartsWithGormOperator) GetName() string
- func (ego *StartsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *StartsWithGormOperator) TransformValue(value string) interface{}
- type StaticFiles
- type TemplateRenderer
- func (tr *TemplateRenderer) AddFuncMap(funcName string, concreteFunc interface{})
- func (tr *TemplateRenderer) Render(ctx *gin.Context, fsys fs.FS, path string, data interface{}, ...)
- func (tr *TemplateRenderer) RenderAsString(fsys fs.FS, path string, data interface{}, baseFuncMap template.FuncMap, ...) string
- type TextWidget
- type TextareaWidget
- type TimeGormOperator
- func (ego *TimeGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *TimeGormOperator) GetName() string
- func (ego *TimeGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *TimeGormOperator) TransformValue(value string) interface{}
- type TimeWidget
- type TraverseMigrationResult
- type URLValue
- type URLWidget
- type UadminAPIOptions
- type UadminAdminOptions
- type UadminAuthOptions
- type UadminConfig
- type UadminConfigOptions
- type UadminConfigurableConfig
- type UadminDatabase
- type UadminDbOptions
- type UadminFieldType
- type UadminFormConfigurableOptionRegistry
- type UadminSwaggerOptions
- type User
- func (u *User) BuildPermissionRegistry() *UserPermRegistry
- func (u *User) FullName() string
- func (u *User) GetAccess(modelName string) Permission
- func (u *User) GetOTP() string
- func (u *User) HasAccess(modelName string) Permission
- func (u *User) Reset()
- func (u *User) Save()
- func (u *User) String() string
- func (u User) Validate() (ret map[string]string)
- func (u *User) VerifyOTP(pass string) bool
- type UserAuthToken
- type UserGroup
- type UserPerm
- func (ap *UserPerm) AddPermission(permBitInteger PermBitInteger)
- func (ap *UserPerm) DoesUserHaveRightFor(permissionName CustomPermission) bool
- func (ap *UserPerm) HasAddPermission() bool
- func (ap *UserPerm) HasDeletePermission() bool
- func (ap *UserPerm) HasEditPermission() bool
- func (ap *UserPerm) HasPublishPermission() bool
- func (ap *UserPerm) HasReadPermission() bool
- func (ap *UserPerm) HasRevertPermission() bool
- type UserPermRegistry
- func (upr *UserPermRegistry) AddPermissionForBlueprint(blueprintName string, modelName string, userPerm *UserPerm)
- func (upr *UserPermRegistry) GetPermissionForBlueprint(blueprintName string, modelName string) *UserPerm
- func (upr *UserPermRegistry) IsThereAnyPermissionForBlueprint(blueprintName string) bool
- type ValidationError
- type ValidatorRegistry
- type WeekDayGormOperator
- func (ego *WeekDayGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *WeekDayGormOperator) GetName() string
- func (ego *WeekDayGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *WeekDayGormOperator) TransformValue(value string) interface{}
- type WeekGormOperator
- func (ego *WeekGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *WeekGormOperator) GetName() string
- func (ego *WeekGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *WeekGormOperator) TransformValue(value string) interface{}
- type Widget
- func (w *Widget) GetAttrs() map[string]string
- func (w *Widget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *Widget) GetFieldDisplayName() string
- func (w *Widget) GetHTMLInputName() string
- func (w *Widget) GetName() string
- func (w *Widget) GetOutputValue() interface{}
- func (w *Widget) GetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
- func (w *Widget) GetRenderer() ITemplateRenderer
- func (w *Widget) GetTemplateName() string
- func (w *Widget) GetValue() interface{}
- func (w *Widget) GetWidgetType() WidgetType
- func (w *Widget) IDForLabel(model interface{}, F *Field) string
- func (w *Widget) InitializeAttrs()
- func (w *Widget) IsReadOnly() bool
- func (w *Widget) IsValueChanged() bool
- func (w *Widget) IsValueConfigured() bool
- func (w *Widget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *Widget) Render(formRenderContext *FormRenderContext, currentField *Field) string
- func (w *Widget) RenderForAdmin()
- func (w *Widget) RenderUsingRenderer(r ITemplateRenderer)
- func (w *Widget) SetAttr(attrName string, value string)
- func (w *Widget) SetBaseFuncMap(baseFuncMap template.FuncMap)
- func (w *Widget) SetErrors(validationErrors ValidationError)
- func (w *Widget) SetFieldDisplayName(fieldDisplayName string)
- func (w *Widget) SetHelpText(helpText string)
- func (w *Widget) SetName(name string)
- func (w *Widget) SetOutputValue(v interface{})
- func (w *Widget) SetPopulate(pFunc func(renderContext *FormRenderContext, currentField *Field) interface{})
- func (w *Widget) SetPrefix(prefix string)
- func (w *Widget) SetReadonly(readonly bool)
- func (w *Widget) SetRequired()
- func (w *Widget) SetShowOnlyHTMLInput()
- func (w *Widget) SetTemplateName(templateName string)
- func (w *Widget) SetValue(v interface{})
- func (w *Widget) SetValueConfigured()
- type WidgetData
- type WidgetType
- type YearGormOperator
- func (ego *YearGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, ...) *GormOperatorContext
- func (ego *YearGormOperator) GetName() string
- func (ego *YearGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
- func (ego *YearGormOperator) TransformValue(value string) interface{}
Constants ¶
const ( DEBUG = 0 WORKING = 1 INFO = 2 OK = 3 WARNING = 4 ERROR = 5 CRITICAL = 6 ALERT = 7 EMERGENCY = 8 )
Reporting Levels
Variables ¶
var ASCIIRegex = regexp.MustCompile("[[:^ascii:]]")
var AddedObjectInPopup *template.Template
var Db *gorm.DB
var FuncMap = template.FuncMap{ "Tf": Tf, "add": add, "mul": mul, }
var PopulateTemplateContextForAdminPanel func(ctx *gin.Context, context IAdminContext, adminRequestParams *AdminRequestParams)
var ReportingLevel = DEBUG
ReportingLevel is the standard reporting level.
var TrailLoggingLevel = INFO
TrailLoggingLevel is the minimum level to be logged into syslog
Functions ¶
func ClearProjectModels ¶
func ClearProjectModels()
func ContainsInt64 ¶ added in v1.0.5
func GenerateNumberSequence ¶
func IsTruthyValue ¶
func IsTruthyValue(value interface{}) bool
func LoadPermissions ¶
func LoadPermissions()
func LoadSessions ¶
func LoadSessions()
func RenderHTML ¶
func RenderHTML(ctx *gin.Context, fsys fs.FS, path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap) error
RenderHTML creates a new template and applies a parsed template to the specified data object. For function, Tf is available by default and if you want to add functions to your template, just add them to funcs which will add them to the template with their original function names. If you added anonymous functions, they will be available in your templates as func1, func2 ...etc.
func RenderHTMLAsString ¶
func RenderHTMLAsString(writer *bytes.Buffer, fsys fs.FS, path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap) error
RenderHTML creates a new template and applies a parsed template to the specified data object. For function, Tf is available by default and if you want to add functions to your template, just add them to funcs which will add them to the template with their original function names. If you added anonymous functions, they will be available in your templates as func1, func2 ...etc.
func RenderWidget ¶
func SetUpStructField ¶
func Syslogf ¶
Syslogf records a log in the system in syslog. For Windows it created a file and records the logs there.
func Tf ¶
@todo, redo Tf is a function for translating strings into any given language Parameters: ===========
path (string): This is where to get the translation from. It is in the
format of "GROUPNAME/FILENAME" for example: "uadmin/system"
lang (string): Is the language code. If empty string is passed we will use
the default language.
term (string): The term to translate.
args (...interface{}): Is a list of args to fill the term with place holders
func TransformDateTimeValueForWidget ¶
func TransformDateTimeValueForWidget(value interface{}) interface{}
func TransformValueForOperator ¶
func TransformValueForOperator(value interface{}) interface{}
func TransformValueForWidget ¶
func TransformValueForWidget(value interface{}) interface{}
func TraverseRemovalTreeNode ¶
func TraverseRemovalTreeNode(nodeToVisit *RemovalTreeNode, removalOrderList *RemovalOrderList)
Types ¶
type AdminActionPlacement ¶
type AdminBreadCrumbsRegistry ¶
type AdminBreadCrumbsRegistry struct {
BreadCrumbs []*AdminBreadcrumb
}
func NewAdminBreadCrumbsRegistry ¶
func NewAdminBreadCrumbsRegistry() *AdminBreadCrumbsRegistry
func (*AdminBreadCrumbsRegistry) AddBreadCrumb ¶
func (abcr *AdminBreadCrumbsRegistry) AddBreadCrumb(breadcrumb *AdminBreadcrumb)
func (*AdminBreadCrumbsRegistry) GetAll ¶
func (abcr *AdminBreadCrumbsRegistry) GetAll() <-chan *AdminBreadcrumb
type AdminBreadcrumb ¶
type AdminContext ¶
type AdminContext struct {
Err string
PageTitle string
ErrExists bool
SiteName string
Languages []Language
RootURL string
OTPRequired bool
Language *Language
Username string
Password string
Logo string
FavIcon string
SessionKey string
RootAdminURL string
User string
UserExists bool
UserObject *User
Demo bool
UserPermissionRegistry *UserPermRegistry
CurrentURL string
CurrentQuery string
FullURL *url.URL
Form IForm
BreadCrumbs *AdminBreadCrumbsRegistry
ID uint
FormD *multipart.Form
Ctx *gin.Context
}
func (*AdminContext) GetCtx ¶
func (c *AdminContext) GetCtx() *gin.Context
func (*AdminContext) GetID ¶
func (c *AdminContext) GetID() uint
func (*AdminContext) GetLanguage ¶
func (c *AdminContext) GetLanguage() *Language
func (*AdminContext) GetPostForm ¶
func (c *AdminContext) GetPostForm() *multipart.Form
func (*AdminContext) GetRootURL ¶
func (c *AdminContext) GetRootURL() string
func (*AdminContext) GetSessionKey ¶
func (c *AdminContext) GetSessionKey() string
func (*AdminContext) GetUserObject ¶
func (c *AdminContext) GetUserObject() *User
func (*AdminContext) SetBreadCrumbs ¶
func (c *AdminContext) SetBreadCrumbs(breadcrumbs *AdminBreadCrumbsRegistry)
func (*AdminContext) SetCtx ¶
func (c *AdminContext) SetCtx(ctx *gin.Context)
func (*AdminContext) SetCurrentQuery ¶
func (c *AdminContext) SetCurrentQuery(currentQuery string)
func (*AdminContext) SetCurrentURL ¶
func (c *AdminContext) SetCurrentURL(currentURL string)
func (*AdminContext) SetDemo ¶
func (c *AdminContext) SetDemo()
func (*AdminContext) SetError ¶
func (c *AdminContext) SetError(err string)
func (*AdminContext) SetErrorExists ¶
func (c *AdminContext) SetErrorExists()
func (*AdminContext) SetFavIcon ¶
func (c *AdminContext) SetFavIcon(favicon string)
func (*AdminContext) SetForm ¶
func (c *AdminContext) SetForm(form IForm)
func (*AdminContext) SetFullURL ¶
func (c *AdminContext) SetFullURL(fullURL *url.URL)
func (*AdminContext) SetID ¶
func (c *AdminContext) SetID(ID uint)
func (*AdminContext) SetLanguage ¶
func (c *AdminContext) SetLanguage(language *Language)
func (*AdminContext) SetLanguages ¶
func (c *AdminContext) SetLanguages(langs []Language)
func (*AdminContext) SetLogo ¶
func (c *AdminContext) SetLogo(logo string)
func (*AdminContext) SetPageTitle ¶
func (c *AdminContext) SetPageTitle(pageTitle string)
func (*AdminContext) SetPostForm ¶
func (c *AdminContext) SetPostForm(formD *multipart.Form)
func (*AdminContext) SetRootAdminURL ¶
func (c *AdminContext) SetRootAdminURL(rootAdminURL string)
func (*AdminContext) SetRootURL ¶
func (c *AdminContext) SetRootURL(rootURL string)
func (*AdminContext) SetSessionKey ¶
func (c *AdminContext) SetSessionKey(sessionKey string)
func (*AdminContext) SetSiteName ¶
func (c *AdminContext) SetSiteName(siteName string)
func (*AdminContext) SetUser ¶
func (c *AdminContext) SetUser(user string)
func (*AdminContext) SetUserExists ¶
func (c *AdminContext) SetUserExists(userExists bool)
func (*AdminContext) SetUserObject ¶
func (c *AdminContext) SetUserObject(u *User)
func (*AdminContext) SetUserPermissionRegistry ¶
func (c *AdminContext) SetUserPermissionRegistry(permRegistry *UserPermRegistry)
type AdminFilterObjects ¶
type AdminFilterObjects struct {
InitialGormQuerySet IPersistenceStorage
GormQuerySet IPersistenceStorage
PaginatedGormQuerySet IPersistenceStorage
Model interface{}
UadminDatabase *UadminDatabase
GenerateModelI func() (interface{}, interface{})
}
func (*AdminFilterObjects) CreateNew ¶
func (afo *AdminFilterObjects) CreateNew(model interface{}) error
func (*AdminFilterObjects) GenerateModelInterface ¶
func (afo *AdminFilterObjects) GenerateModelInterface() (interface{}, interface{})
func (*AdminFilterObjects) GetCurrentModel ¶
func (afo *AdminFilterObjects) GetCurrentModel() interface{}
func (*AdminFilterObjects) GetFullQuerySet ¶
func (afo *AdminFilterObjects) GetFullQuerySet() IPersistenceStorage
func (*AdminFilterObjects) GetInitialQuerySet ¶
func (afo *AdminFilterObjects) GetInitialQuerySet() IPersistenceStorage
func (*AdminFilterObjects) GetPaginated ¶
func (afo *AdminFilterObjects) GetPaginated() <-chan *IterateAdminObjects
func (*AdminFilterObjects) GetPaginatedQuerySet ¶
func (afo *AdminFilterObjects) GetPaginatedQuerySet() IPersistenceStorage
func (*AdminFilterObjects) GetUadminDatabase ¶
func (afo *AdminFilterObjects) GetUadminDatabase() *UadminDatabase
func (*AdminFilterObjects) IterateThroughWholeQuerySet ¶
func (afo *AdminFilterObjects) IterateThroughWholeQuerySet() <-chan *IterateAdminObjects
func (*AdminFilterObjects) LoadDataForModelByID ¶
func (afo *AdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{})
func (*AdminFilterObjects) RemoveModelPermanently ¶
func (afo *AdminFilterObjects) RemoveModelPermanently(model interface{}) error
func (*AdminFilterObjects) SaveModel ¶
func (afo *AdminFilterObjects) SaveModel(model interface{}) error
func (*AdminFilterObjects) SetFullQuerySet ¶
func (afo *AdminFilterObjects) SetFullQuerySet(storage IPersistenceStorage)
func (*AdminFilterObjects) SetInitialQuerySet ¶
func (afo *AdminFilterObjects) SetInitialQuerySet(storage IPersistenceStorage)
func (*AdminFilterObjects) SetPaginatedQuerySet ¶
func (afo *AdminFilterObjects) SetPaginatedQuerySet(storage IPersistenceStorage)
func (*AdminFilterObjects) WithTransaction ¶
func (afo *AdminFilterObjects) WithTransaction(handler func(afo1 IAdminFilterObjects) error)
type AdminModelAction ¶
type AdminModelAction struct {
ActionName string
Description string
ShowFutureChanges bool
RedirectToRootModelPage bool
Placement *AdminActionPlacement
PermName CustomPermission
Handler func(adminPage *AdminPage, afo IAdminFilterObjects, ctx *gin.Context) (bool, int64)
IsDisabled func(afo IAdminFilterObjects, ctx *gin.Context) bool
SlugifiedActionName string
RequestMethod string
RequiresExtraSteps bool
}
func NewAdminModelAction ¶
func NewAdminModelAction(actionName string, placement *AdminActionPlacement) *AdminModelAction
type AdminModelActionRegistry ¶
type AdminModelActionRegistry struct {
AdminModelActions map[string]*AdminModelAction
}
var GlobalModelActionRegistry *AdminModelActionRegistry
func NewAdminModelActionRegistry ¶
func NewAdminModelActionRegistry() *AdminModelActionRegistry
func (*AdminModelActionRegistry) AddModelAction ¶
func (amar *AdminModelActionRegistry) AddModelAction(ma *AdminModelAction)
func (*AdminModelActionRegistry) GetAllModelActions ¶
func (amar *AdminModelActionRegistry) GetAllModelActions() <-chan *AdminModelAction
func (*AdminModelActionRegistry) GetModelActionByName ¶
func (amar *AdminModelActionRegistry) GetModelActionByName(actionName string) (*AdminModelAction, error)
func (*AdminModelActionRegistry) IsThereAnyActions ¶
func (amar *AdminModelActionRegistry) IsThereAnyActions() bool
type AdminPage ¶
type AdminPage struct {
Model interface{} `json:"-"`
GenerateModelI func() (interface{}, interface{}) `json:"-"`
GenerateForm func(modelI interface{}, ctx IAdminContext) *Form `json:"-"`
GetQueryset func(*AdminPage, *AdminRequestParams) IAdminFilterObjects `json:"-"`
ModelActionsRegistry *AdminModelActionRegistry `json:"-"`
FilterOptions *FilterOptionsRegistry `json:"-"`
ActionsSelectionCounter bool `json:"-"`
BlueprintName string
EmptyValueDisplay string `json:"-"`
ExcludeFields IFieldRegistry `json:"-"`
FieldsToShow IFieldRegistry `json:"-"`
Form *Form `json:"-"`
ShowAllFields bool `json:"-"`
Validators *ValidatorRegistry `json:"-"`
InlineRegistry *AdminPageInlineRegistry `json:"-"`
ListDisplay *ListDisplayRegistry `json:"-"`
ListFilter *ListFilterRegistry `json:"-"`
MaxShowAll int `json:"-"`
PreserveFilters bool `json:"-"`
SaveAndContinue bool `json:"-"`
SaveOnTop bool `json:"-"`
SearchFields *SearchFieldRegistry `json:"-"`
ShowFullResultCount bool `json:"-"`
ViewOnSite bool `json:"-"`
ListTemplate string `json:"-"`
AddTemplate string `json:"-"`
EditTemplate string `json:"-"`
DeleteConfirmationTemplate string `json:"-"`
DeleteSelectedConfirmationTemplate string `json:"-"`
ObjectHistoryTemplate string `json:"-"`
PopupResponseTemplate string `json:"-"`
Paginator *Paginator `json:"-"`
SubPages *AdminPageRegistry `json:"-"`
Ordering int
PageName string
ModelName string
Slug string
ToolTip string
Icon string
ListHandler func(ctx *gin.Context) `json:"-"`
EditHandler func(ctx *gin.Context) `json:"-"`
AddHandler func(ctx *gin.Context) `json:"-"`
DeleteHandler func(ctx *gin.Context) `json:"-"`
Router *gin.Engine `json:"-"`
ParentPage *AdminPage `json:"-"`
SaveModel func(modelI interface{}, ID uint, afo IAdminFilterObjects) interface{} `json:"-"`
RegisteredHTTPHandlers bool
NoPermissionToAddNew bool
NoPermissionToEdit bool
}
func NewGormAdminPage ¶
func NewGormAdminPage(parentPage *AdminPage, genModelI func() (interface{}, interface{}), generateForm func(modelI interface{}, ctx IAdminContext) *Form) *AdminPage
func (*AdminPage) FetchFilterOptions ¶
func (ap *AdminPage) FetchFilterOptions() []*DisplayFilterOption
func (*AdminPage) GenerateLinkToAddNewModel ¶
func (*AdminPage) GenerateLinkToEditModel ¶
type AdminPageInline ¶
type AdminPageInline struct {
Ordering int
GenerateModelI func(m interface{}) (interface{}, interface{})
GetQueryset func(afo IAdminFilterObjects, model interface{}, rp *AdminRequestParams) IAdminFilterObjects
Actions *AdminModelActionRegistry
EmptyValueDisplay string
ExcludeFields IFieldRegistry
FieldsToShow IFieldRegistry
ShowAllFields bool
Validators *ValidatorRegistry
Classes []string
Extra int
MaxNum int
MinNum int
VerboseName string
VerboseNamePlural string
ShowChangeLink bool
Template string
ContentType *ContentType
Permission CustomPermission
InlineType InlineType
Prefix string
ListDisplay *ListDisplayRegistry `json:"-"`
}
func NewAdminPageInline ¶
func NewAdminPageInline( inlineIden string, inlineType InlineType, generateModelI func(m interface{}) (interface{}, interface{}), getQuerySet func(afo IAdminFilterObjects, model interface{}, rp *AdminRequestParams) IAdminFilterObjects, ) *AdminPageInline
func (*AdminPageInline) GetAll ¶
func (api *AdminPageInline) GetAll(model interface{}, rp *AdminRequestParams) <-chan *IterateAdminObjects
func (*AdminPageInline) GetFormForExample ¶
func (api *AdminPageInline) GetFormForExample(adminContext IAdminContext) *FormListEditable
func (*AdminPageInline) GetFormIdenForNewItems ¶
func (api *AdminPageInline) GetFormIdenForNewItems() string
func (*AdminPageInline) GetInlineID ¶
func (api *AdminPageInline) GetInlineID() string
func (*AdminPageInline) ProceedRequest ¶
func (api *AdminPageInline) ProceedRequest(afo IAdminFilterObjects, ctx *gin.Context, f *multipart.Form, model interface{}, rp *AdminRequestParams, adminContext IAdminContext) (InlineFormListEditableCollection, error)
func (*AdminPageInline) RenderExampleForm ¶
func (api *AdminPageInline) RenderExampleForm(adminContext IAdminContext) string
type AdminPageInlineRegistry ¶
type AdminPageInlineRegistry struct {
Inlines []*AdminPageInline
}
func NewAdminPageInlineRegistry ¶
func NewAdminPageInlineRegistry() *AdminPageInlineRegistry
func (*AdminPageInlineRegistry) Add ¶
func (apir *AdminPageInlineRegistry) Add(pageInline *AdminPageInline)
func (*AdminPageInlineRegistry) GetAll ¶
func (apir *AdminPageInlineRegistry) GetAll() <-chan *AdminPageInline
type AdminPageRegistry ¶
var CurrentAdminPageRegistry *AdminPageRegistry
func NewAdminPageRegistry ¶
func NewAdminPageRegistry() *AdminPageRegistry
func (*AdminPageRegistry) AddAdminPage ¶
func (apr *AdminPageRegistry) AddAdminPage(adminPage *AdminPage) error
func (*AdminPageRegistry) GetAll ¶
func (apr *AdminPageRegistry) GetAll() <-chan *AdminPage
func (*AdminPageRegistry) GetByModelName ¶
func (apr *AdminPageRegistry) GetByModelName(modelName string) *AdminPage
func (*AdminPageRegistry) GetBySlug ¶
func (apr *AdminPageRegistry) GetBySlug(slug string) (*AdminPage, error)
func (*AdminPageRegistry) PreparePagesForTemplate ¶
func (apr *AdminPageRegistry) PreparePagesForTemplate(permRegistry *UserPermRegistry) []byte
type AdminPagesList ¶
type AdminPagesList []*AdminPage
func (AdminPagesList) Len ¶
func (apl AdminPagesList) Len() int
func (AdminPagesList) Less ¶
func (apl AdminPagesList) Less(i, j int) bool
func (AdminPagesList) Swap ¶
func (apl AdminPagesList) Swap(i, j int)
type AdminRequestPaginator ¶
type AdminRequestParams ¶
type AdminRequestParams struct {
CreateSession bool
GenerateCSRFToken bool
NeedAllLanguages bool
Paginator *AdminRequestPaginator
RequestURL string
Search string
Ordering []string
}
func NewAdminRequestParams ¶
func NewAdminRequestParams() *AdminRequestParams
func NewAdminRequestParamsFromGinContext ¶
func NewAdminRequestParamsFromGinContext(ctx *gin.Context) *AdminRequestParams
func (*AdminRequestParams) GetOrdering ¶
func (arp *AdminRequestParams) GetOrdering() string
type Blueprint ¶
type Blueprint struct {
Name string
Description string
MigrationRegistry IMigrationRegistry
}
func (Blueprint) GetDescription ¶
func (Blueprint) GetMigrationRegistry ¶
func (b Blueprint) GetMigrationRegistry() IMigrationRegistry
func (Blueprint) InitRouter ¶
func (b Blueprint) InitRouter(mainRouter *gin.Engine, group *gin.RouterGroup)
type BlueprintRegistry ¶
type BlueprintRegistry struct {
RegisteredBlueprints map[string]IBlueprint
MigrationTree IMigrationTree
}
func (BlueprintRegistry) GetByName ¶
func (r BlueprintRegistry) GetByName(name string) (IBlueprint, error)
func (BlueprintRegistry) GetMigrationTree ¶
func (r BlueprintRegistry) GetMigrationTree() IMigrationTree
func (BlueprintRegistry) Initialize ¶
func (r BlueprintRegistry) Initialize()
func (BlueprintRegistry) InitializeRouting ¶
func (r BlueprintRegistry) InitializeRouting(router *gin.Engine)
func (BlueprintRegistry) Iterate ¶
func (r BlueprintRegistry) Iterate() <-chan IBlueprint
func (BlueprintRegistry) Register ¶
func (r BlueprintRegistry) Register(blueprint IBlueprint)
func (BlueprintRegistry) ResetMigrationTree ¶
func (r BlueprintRegistry) ResetMigrationTree()
func (BlueprintRegistry) TraverseMigrations ¶
func (r BlueprintRegistry) TraverseMigrations() <-chan *TraverseMigrationResult
func (BlueprintRegistry) TraverseMigrationsDownTo ¶
func (r BlueprintRegistry) TraverseMigrationsDownTo(downToMigration int64) <-chan *TraverseMigrationResult
type CheckboxSelectMultipleWidget ¶
type CheckboxSelectMultipleWidget struct {
Widget
OptGroups map[string][]*RadioOptGroup
ID string
WrapLabel bool
}
func (*CheckboxSelectMultipleWidget) GetDataForRendering ¶
func (w *CheckboxSelectMultipleWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
func (*CheckboxSelectMultipleWidget) GetTemplateName ¶
func (w *CheckboxSelectMultipleWidget) GetTemplateName() string
func (*CheckboxSelectMultipleWidget) GetWidgetType ¶
func (w *CheckboxSelectMultipleWidget) GetWidgetType() WidgetType
func (*CheckboxSelectMultipleWidget) ProceedForm ¶
func (w *CheckboxSelectMultipleWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*CheckboxSelectMultipleWidget) Render ¶
func (w *CheckboxSelectMultipleWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*CheckboxSelectMultipleWidget) SetID ¶
func (w *CheckboxSelectMultipleWidget) SetID(ID string)
type CheckboxWidget ¶
type CheckboxWidget struct {
Widget
}
func (*CheckboxWidget) GetTemplateName ¶
func (w *CheckboxWidget) GetTemplateName() string
func (*CheckboxWidget) GetWidgetType ¶
func (w *CheckboxWidget) GetWidgetType() WidgetType
func (*CheckboxWidget) ProceedForm ¶
func (w *CheckboxWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*CheckboxWidget) Render ¶
func (w *CheckboxWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*CheckboxWidget) SetValue ¶
func (w *CheckboxWidget) SetValue(v interface{})
type ChooseFromSelectWidget ¶
type ChooseFromSelectWidget struct {
Widget
PopulateLeftSide func() []*SelectOptGroup
PopulateRightSide func() []*SelectOptGroup
LeftSelectTitle string
LeftSelectHelp string
LeftHelpChooseAll string
LeftSearchSelectHelp string
LeftChooseAllText string
RightSelectTitle string
RightSelectHelp string
RightHelpChooseAll string
RightSearchSelectHelp string
RightChooseAllText string
AddNewLink string
AddNewTitle string
}
func (*ChooseFromSelectWidget) GetTemplateName ¶
func (w *ChooseFromSelectWidget) GetTemplateName() string
func (*ChooseFromSelectWidget) GetWidgetType ¶
func (w *ChooseFromSelectWidget) GetWidgetType() WidgetType
func (*ChooseFromSelectWidget) ProceedForm ¶
func (w *ChooseFromSelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*ChooseFromSelectWidget) Render ¶
func (w *ChooseFromSelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type ClearableFileWidget ¶
type ClearableFileWidget struct {
Widget
InitialText string
CurrentValue *URLValue
Required bool
ID string
ClearCheckboxLabel string
InputText string
Storage IStorageInterface
UploadPath string
Multiple bool
}
func (*ClearableFileWidget) GetTemplateName ¶
func (w *ClearableFileWidget) GetTemplateName() string
func (*ClearableFileWidget) GetWidgetType ¶
func (w *ClearableFileWidget) GetWidgetType() WidgetType
func (*ClearableFileWidget) IsInitial ¶
func (w *ClearableFileWidget) IsInitial() bool
func (*ClearableFileWidget) ProceedForm ¶
func (w *ClearableFileWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*ClearableFileWidget) Render ¶
func (w *ClearableFileWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*ClearableFileWidget) SetID ¶
func (w *ClearableFileWidget) SetID(ID string)
type ColumnSchema ¶
type ConnectionToParentModel ¶
type ConnectionToParentModel struct {
FieldNameToValue map[string]interface{}
}
type ContainsGormOperator ¶
type ContainsGormOperator struct {
}
func (*ContainsGormOperator) Build ¶
func (ego *ContainsGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*ContainsGormOperator) GetName ¶
func (ego *ContainsGormOperator) GetName() string
func (*ContainsGormOperator) RegisterDbHandlers ¶
func (ego *ContainsGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*ContainsGormOperator) TransformValue ¶
func (ego *ContainsGormOperator) TransformValue(value string) interface{}
type ContentType ¶
type ContentType struct {
Model
BlueprintName string `sql:"unique_index:idx_contenttype_content_type"`
ModelName string `sql:"unique_index:idx_contenttype_content_type"`
}
func (*ContentType) String ¶
func (ct *ContentType) String() string
type ContentTypeSelectorWidget ¶
type ContentTypeSelectorWidget struct {
Widget
OptGroups map[string][]*SelectOptGroup
LoadFieldsOfAllModels bool
}
func (*ContentTypeSelectorWidget) GetDataForRendering ¶
func (w *ContentTypeSelectorWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*ContentTypeSelectorWidget) GetTemplateName ¶
func (w *ContentTypeSelectorWidget) GetTemplateName() string
func (*ContentTypeSelectorWidget) GetWidgetType ¶
func (w *ContentTypeSelectorWidget) GetWidgetType() WidgetType
func (*ContentTypeSelectorWidget) PopulateSelectorOptions ¶
func (w *ContentTypeSelectorWidget) PopulateSelectorOptions(afo IAdminFilterObjects)
func (*ContentTypeSelectorWidget) ProceedForm ¶
func (w *ContentTypeSelectorWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*ContentTypeSelectorWidget) Render ¶
func (w *ContentTypeSelectorWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type CustomPermission ¶
type CustomPermission string
type DBSettings ¶
type DBSettings struct {
Type string `json:"type"` // sqlite, mysql
Name string `json:"name"` // File/DB name
User string `json:"user"`
Password string `json:"password"`
Host string `json:"host"`
Port int `json:"port"`
}
DBSettings !
type DashboardAdminPanel ¶
type DashboardAdminPanel struct {
AdminPages *AdminPageRegistry
ListHandler func(ctx *gin.Context)
}
var CurrentDashboardAdminPanel *DashboardAdminPanel
func NewDashboardAdminPanel ¶
func NewDashboardAdminPanel() *DashboardAdminPanel
func (*DashboardAdminPanel) FindPageForGormModel ¶
func (dap *DashboardAdminPanel) FindPageForGormModel(m interface{}) *AdminPage
func (*DashboardAdminPanel) RegisterHTTPHandlers ¶
func (dap *DashboardAdminPanel) RegisterHTTPHandlers(router *gin.Engine)
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase(config *UadminConfig) *Database
type DatabaseSettings ¶
type DatabaseSettings struct {
Default *DBSettings
}
var CurrentDatabaseSettings *DatabaseSettings
type DateGormOperator ¶
type DateGormOperator struct {
}
func (*DateGormOperator) Build ¶
func (ego *DateGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*DateGormOperator) GetName ¶
func (ego *DateGormOperator) GetName() string
func (*DateGormOperator) RegisterDbHandlers ¶
func (ego *DateGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*DateGormOperator) TransformValue ¶
func (ego *DateGormOperator) TransformValue(value string) interface{}
type DateTimeWidget ¶
func (*DateTimeWidget) GetTemplateName ¶
func (w *DateTimeWidget) GetTemplateName() string
func (*DateTimeWidget) GetWidgetType ¶
func (w *DateTimeWidget) GetWidgetType() WidgetType
func (*DateTimeWidget) ProceedForm ¶
func (w *DateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*DateTimeWidget) Render ¶
func (w *DateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type DateWidget ¶
func (*DateWidget) GetTemplateName ¶
func (w *DateWidget) GetTemplateName() string
func (*DateWidget) GetWidgetType ¶
func (w *DateWidget) GetWidgetType() WidgetType
func (*DateWidget) ProceedForm ¶
func (w *DateWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*DateWidget) Render ¶
func (w *DateWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type DayGormOperator ¶
type DayGormOperator struct {
}
func (*DayGormOperator) Build ¶
func (ego *DayGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*DayGormOperator) GetName ¶
func (ego *DayGormOperator) GetName() string
func (*DayGormOperator) RegisterDbHandlers ¶
func (ego *DayGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*DayGormOperator) TransformValue ¶
func (ego *DayGormOperator) TransformValue(value string) interface{}
type DeleteRowStructure ¶
type DisplayFilterOption ¶
func FetchOptionsFromGormModelFromDateTimeField ¶
func FetchOptionsFromGormModelFromDateTimeField(afo IAdminFilterObjects, filterOptionField string) []*DisplayFilterOption
type DynamicWidget ¶
type DynamicWidget struct {
Widget
GetRealWidget func(formRenderContext *FormRenderContext, currentField *Field) IWidget
GetRealWidgetForFormProceeding func(form *multipart.Form, afo IAdminFilterObjects) IWidget
}
func (*DynamicWidget) GetTemplateName ¶
func (tw *DynamicWidget) GetTemplateName() string
func (*DynamicWidget) GetWidgetType ¶
func (tw *DynamicWidget) GetWidgetType() WidgetType
func (*DynamicWidget) ProceedForm ¶
func (tw *DynamicWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*DynamicWidget) Render ¶
func (tw *DynamicWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type EmailWidget ¶
type EmailWidget struct {
Widget
}
func (*EmailWidget) GetTemplateName ¶
func (w *EmailWidget) GetTemplateName() string
func (*EmailWidget) GetWidgetType ¶
func (w *EmailWidget) GetWidgetType() WidgetType
func (*EmailWidget) ProceedForm ¶
func (w *EmailWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*EmailWidget) Render ¶
func (w *EmailWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type EndsWithGormOperator ¶
type EndsWithGormOperator struct {
}
func (*EndsWithGormOperator) Build ¶
func (ego *EndsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*EndsWithGormOperator) GetName ¶
func (ego *EndsWithGormOperator) GetName() string
func (*EndsWithGormOperator) RegisterDbHandlers ¶
func (ego *EndsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*EndsWithGormOperator) TransformValue ¶
func (ego *EndsWithGormOperator) TransformValue(value string) interface{}
type ExactGormOperator ¶
type ExactGormOperator struct {
}
func (*ExactGormOperator) Build ¶
func (ego *ExactGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*ExactGormOperator) GetName ¶
func (ego *ExactGormOperator) GetName() string
func (*ExactGormOperator) RegisterDbHandlers ¶
func (ego *ExactGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*ExactGormOperator) TransformValue ¶
func (ego *ExactGormOperator) TransformValue(value string) interface{}
type Field ¶
type Field struct {
schema.Field
ReadOnly bool
UadminFieldType UadminFieldType
FieldConfig *FieldConfig
Required bool
DisplayName string
HelpText string
Choices *FieldChoiceRegistry
Validators *ValidatorRegistry
SortingDisabled bool
Populate func(field *Field, m interface{}) interface{}
Initial interface{}
WidgetType string
SetUpField func(w IWidget, modelI interface{}, v interface{}, afo IAdminFilterObjects) error
Ordering int
}
func NewFieldFromGormField ¶
func (*Field) ProceedForm ¶
func (f *Field) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) ValidationError
type FieldChoice ¶
type FieldChoice struct {
DisplayAs string
Value interface{}
}
type FieldChoiceRegistry ¶
type FieldChoiceRegistry struct {
Choices []*FieldChoice
}
func (*FieldChoiceRegistry) IsValidChoice ¶
func (fcr *FieldChoiceRegistry) IsValidChoice(v interface{}) bool
type FieldConfig ¶
type FieldFormOptions ¶
type FieldFormOptions struct {
Name string
Initial interface{}
DisplayName string
Validators *ValidatorRegistry
Choices *FieldChoiceRegistry
HelpText string
WidgetType string
ReadOnly bool
Required bool
WidgetPopulate func(renderContext *FormRenderContext, currentField *Field) interface{}
IsFk bool
}
func (*FieldFormOptions) GetChoices ¶
func (ffo *FieldFormOptions) GetChoices() *FieldChoiceRegistry
func (*FieldFormOptions) GetDisplayName ¶
func (ffo *FieldFormOptions) GetDisplayName() string
func (*FieldFormOptions) GetHelpText ¶
func (ffo *FieldFormOptions) GetHelpText() string
func (*FieldFormOptions) GetInitial ¶
func (ffo *FieldFormOptions) GetInitial() interface{}
func (*FieldFormOptions) GetIsRequired ¶
func (ffo *FieldFormOptions) GetIsRequired() bool
func (*FieldFormOptions) GetName ¶
func (ffo *FieldFormOptions) GetName() string
func (*FieldFormOptions) GetReadOnly ¶
func (ffo *FieldFormOptions) GetReadOnly() bool
func (*FieldFormOptions) GetValidators ¶
func (ffo *FieldFormOptions) GetValidators() *ValidatorRegistry
func (*FieldFormOptions) GetWidgetPopulate ¶
func (ffo *FieldFormOptions) GetWidgetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
func (*FieldFormOptions) GetWidgetType ¶
func (ffo *FieldFormOptions) GetWidgetType() string
func (*FieldFormOptions) IsItFk ¶
func (ffo *FieldFormOptions) IsItFk() bool
type FieldRegistry ¶
func NewFieldRegistry ¶
func NewFieldRegistry() *FieldRegistry
func (*FieldRegistry) AddField ¶
func (fr *FieldRegistry) AddField(field *Field)
func (*FieldRegistry) GetAllFields ¶
func (fr *FieldRegistry) GetAllFields() map[string]*Field
func (*FieldRegistry) GetAllFieldsWithOrdering ¶
func (fr *FieldRegistry) GetAllFieldsWithOrdering() []*Field
func (*FieldRegistry) GetPrimaryKey ¶
func (fr *FieldRegistry) GetPrimaryKey() (*Field, error)
type FileForStorage ¶
type FileWidget ¶
type FileWidget struct {
Widget
Storage IStorageInterface
UploadPath string
Multiple bool
}
func (*FileWidget) GetTemplateName ¶
func (w *FileWidget) GetTemplateName() string
func (*FileWidget) GetWidgetType ¶
func (w *FileWidget) GetWidgetType() WidgetType
func (*FileWidget) ProceedForm ¶
func (w *FileWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*FileWidget) Render ¶
func (w *FileWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type FilterOption ¶
type FilterOption struct {
FieldName string
FetchOptions func(afo IAdminFilterObjects) []*DisplayFilterOption
}
func NewFilterOption ¶
func NewFilterOption() *FilterOption
type FilterOptionsRegistry ¶
type FilterOptionsRegistry struct {
FilterOption []*FilterOption
}
func NewFilterOptionsRegistry ¶
func NewFilterOptionsRegistry() *FilterOptionsRegistry
func (*FilterOptionsRegistry) AddFilterOption ¶
func (for1 *FilterOptionsRegistry) AddFilterOption(fo *FilterOption)
func (*FilterOptionsRegistry) GetAll ¶
func (for1 *FilterOptionsRegistry) GetAll() <-chan *FilterOption
type FkLinkWidget ¶
type FkLinkWidget struct {
Widget
}
func (*FkLinkWidget) GetTemplateName ¶
func (w *FkLinkWidget) GetTemplateName() string
func (*FkLinkWidget) GetWidgetType ¶
func (w *FkLinkWidget) GetWidgetType() WidgetType
func (*FkLinkWidget) Render ¶
func (w *FkLinkWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type ForeignKeyWidget ¶
type ForeignKeyWidget struct {
Widget
OptGroups map[string][]*SelectOptGroup
DontValidateForExistence bool
AddNewLink string
GetQuerySet func(formRenderContext *FormRenderContext) IPersistenceStorage
GenerateModelInterface func() (interface{}, interface{})
}
func (*ForeignKeyWidget) BuildChoices ¶
func (w *ForeignKeyWidget) BuildChoices(formRenderContext *FormRenderContext)
func (*ForeignKeyWidget) GetDataForRendering ¶
func (w *ForeignKeyWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*ForeignKeyWidget) GetTemplateName ¶
func (w *ForeignKeyWidget) GetTemplateName() string
func (*ForeignKeyWidget) GetWidgetType ¶
func (w *ForeignKeyWidget) GetWidgetType() WidgetType
func (*ForeignKeyWidget) ProceedForm ¶
func (w *ForeignKeyWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*ForeignKeyWidget) Render ¶
func (w *ForeignKeyWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type Form ¶
type Form struct {
ExcludeFields IFieldRegistry
FieldsToShow IFieldRegistry
FieldRegistry IFieldRegistry
GroupsOfTheFields *GrouppedFieldsRegistry
TemplateName string
FormTitle string
Renderer ITemplateRenderer
RequestContext map[string]interface{}
ErrorMessage string
ExtraStatic *StaticFiles `json:"-"`
ForAdminPanel bool
FormError *FormError
DontGenerateFormTag bool
Prefix string
RenderContext *FormRenderContext
}
func NewFormFromModel ¶
func (*Form) ProceedRequest ¶
type FormError ¶
type FormError struct {
FieldError map[string]ValidationError
GeneralErrors ValidationError
}
func (*FormError) AddGeneralError ¶
func (*FormError) GetErrorForField ¶
func (fe *FormError) GetErrorForField(fieldName string) ValidationError
type FormListEditable ¶
type FormListEditable struct {
FieldRegistry IFieldRegistry
Prefix string
FormRenderContext *FormRenderContext
FormError *FormError
}
func NewFormListEditableForNewModelFromListDisplayRegistry ¶
func NewFormListEditableForNewModelFromListDisplayRegistry(adminContext IAdminContext, prefix string, ID string, model interface{}, listDisplayRegistry *ListDisplayRegistry) *FormListEditable
func NewFormListEditableFromListDisplayRegistry ¶
func NewFormListEditableFromListDisplayRegistry(adminContext IAdminContext, prefix string, ID uint, model interface{}, listDisplayRegistry *ListDisplayRegistry) *FormListEditable
func (*FormListEditable) ExistsField ¶
func (f *FormListEditable) ExistsField(ld *ListDisplay) bool
func (*FormListEditable) ProceedRequest ¶
func (*FormListEditable) SetPrefix ¶
func (f *FormListEditable) SetPrefix(prefix string)
type FormListEditableCollection ¶
type FormListEditableCollection struct {
InlineCollection map[string]InlineFormListEditableCollection
}
func NewFormListEditableCollection ¶
func NewFormListEditableCollection() *FormListEditableCollection
func (*FormListEditableCollection) AddForInline ¶
func (flec *FormListEditableCollection) AddForInline(prefix string, ID string, formListEditable *FormListEditable)
func (*FormListEditableCollection) AddForInlineWholeCollection ¶
func (flec *FormListEditableCollection) AddForInlineWholeCollection(prefix string, collection InlineFormListEditableCollection)
func (*FormListEditableCollection) GetForInlineAndForModel ¶
func (flec *FormListEditableCollection) GetForInlineAndForModel(prefix string, ID uint) *FormListEditable
func (*FormListEditableCollection) GetForInlineNew ¶
func (flec *FormListEditableCollection) GetForInlineNew(prefix string) <-chan *FormListEditable
type FormRenderContext ¶
func NewFormRenderContext ¶
func NewFormRenderContext() *FormRenderContext
type FormRow ¶
type FormRow struct {
Columns []*ColumnSchema
}
type FsStorage ¶
func (*FsStorage) GetUploadURL ¶
type GormOperatorContext ¶
type GormOperatorContext struct {
TableName string
Tx IPersistenceStorage
Statement *gorm.Statement
}
func FilterGormModel ¶
func FilterGormModel(adapter IDbAdapter, db IPersistenceStorage, schema1 *schema.Schema, filterString []string, model interface{}) *GormOperatorContext
func NewGormOperatorContext ¶
func NewGormOperatorContext(db IPersistenceStorage, model interface{}) *GormOperatorContext
type GormOperatorRegistry ¶
type GormOperatorRegistry struct {
Operators map[string]IGormOperator
}
var ProjectGormOperatorRegistry *GormOperatorRegistry
func (*GormOperatorRegistry) GetAll ¶
func (gor *GormOperatorRegistry) GetAll() <-chan IGormOperator
func (*GormOperatorRegistry) GetOperatorByName ¶
func (gor *GormOperatorRegistry) GetOperatorByName(operatorName string) (IGormOperator, error)
func (*GormOperatorRegistry) RegisterOperator ¶
func (gor *GormOperatorRegistry) RegisterOperator(operator IGormOperator)
type GormPersistenceStorage ¶
func NewGormPersistenceStorage ¶
func NewGormPersistenceStorage(db *gorm.DB) *GormPersistenceStorage
func (*GormPersistenceStorage) AddError ¶
func (gps *GormPersistenceStorage) AddError(err error) error
func (*GormPersistenceStorage) Assign ¶
func (gps *GormPersistenceStorage) Assign(attrs ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Association ¶
func (gps *GormPersistenceStorage) Association(column string) IPersistenceAssociation
func (*GormPersistenceStorage) Attrs ¶
func (gps *GormPersistenceStorage) Attrs(attrs ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) AutoMigrate ¶
func (gps *GormPersistenceStorage) AutoMigrate(dst ...interface{}) error
func (*GormPersistenceStorage) Begin ¶
func (gps *GormPersistenceStorage) Begin(opts ...*sql.TxOptions) IPersistenceStorage
func (*GormPersistenceStorage) Clauses ¶
func (gps *GormPersistenceStorage) Clauses(conds ...clause.Expression) IPersistenceStorage
func (*GormPersistenceStorage) Commit ¶
func (gps *GormPersistenceStorage) Commit() IPersistenceStorage
func (*GormPersistenceStorage) Count ¶
func (gps *GormPersistenceStorage) Count(count *int64) IPersistenceStorage
func (*GormPersistenceStorage) Create ¶
func (gps *GormPersistenceStorage) Create(value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) CreateInBatches ¶
func (gps *GormPersistenceStorage) CreateInBatches(value interface{}, batchSize int) IPersistenceStorage
func (*GormPersistenceStorage) Debug ¶
func (gps *GormPersistenceStorage) Debug() IPersistenceStorage
func (*GormPersistenceStorage) Delete ¶
func (gps *GormPersistenceStorage) Delete(value interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Distinct ¶
func (gps *GormPersistenceStorage) Distinct(args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Exec ¶
func (gps *GormPersistenceStorage) Exec(sql string, values ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Find ¶
func (gps *GormPersistenceStorage) Find(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) FindInBatches ¶
func (gps *GormPersistenceStorage) FindInBatches(dest interface{}, batchSize int, fc func(tx *gorm.DB, batch int) error) IPersistenceStorage
func (*GormPersistenceStorage) First ¶
func (gps *GormPersistenceStorage) First(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) FirstOrCreate ¶
func (gps *GormPersistenceStorage) FirstOrCreate(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) FirstOrInit ¶
func (gps *GormPersistenceStorage) FirstOrInit(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Get ¶
func (gps *GormPersistenceStorage) Get(key string) (interface{}, bool)
func (*GormPersistenceStorage) GetCurrentDB ¶
func (gps *GormPersistenceStorage) GetCurrentDB() *gorm.DB
func (*GormPersistenceStorage) Group ¶
func (gps *GormPersistenceStorage) Group(name string) IPersistenceStorage
func (*GormPersistenceStorage) Having ¶
func (gps *GormPersistenceStorage) Having(query interface{}, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) InstanceGet ¶
func (gps *GormPersistenceStorage) InstanceGet(key string) (interface{}, bool)
func (*GormPersistenceStorage) InstanceSet ¶
func (gps *GormPersistenceStorage) InstanceSet(key string, value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Joins ¶
func (gps *GormPersistenceStorage) Joins(query string, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Last ¶
func (gps *GormPersistenceStorage) Last(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Limit ¶
func (gps *GormPersistenceStorage) Limit(limit int) IPersistenceStorage
func (*GormPersistenceStorage) Migrator ¶
func (gps *GormPersistenceStorage) Migrator() IPersistenceMigrator
func (*GormPersistenceStorage) Model ¶
func (gps *GormPersistenceStorage) Model(value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Not ¶
func (gps *GormPersistenceStorage) Not(query interface{}, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Offset ¶
func (gps *GormPersistenceStorage) Offset(offset int) IPersistenceStorage
func (*GormPersistenceStorage) Omit ¶
func (gps *GormPersistenceStorage) Omit(columns ...string) IPersistenceStorage
func (*GormPersistenceStorage) Or ¶
func (gps *GormPersistenceStorage) Or(query interface{}, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Order ¶
func (gps *GormPersistenceStorage) Order(value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Pluck ¶
func (gps *GormPersistenceStorage) Pluck(column string, dest interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Preload ¶
func (gps *GormPersistenceStorage) Preload(query string, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Raw ¶
func (gps *GormPersistenceStorage) Raw(sql string, values ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Rollback ¶
func (gps *GormPersistenceStorage) Rollback() IPersistenceStorage
func (*GormPersistenceStorage) RollbackTo ¶
func (gps *GormPersistenceStorage) RollbackTo(name string) IPersistenceStorage
func (*GormPersistenceStorage) Row ¶
func (gps *GormPersistenceStorage) Row() IPersistenceIterateRow
func (*GormPersistenceStorage) Rows ¶
func (gps *GormPersistenceStorage) Rows() (IPersistenceIterateRows, error)
func (*GormPersistenceStorage) Save ¶
func (gps *GormPersistenceStorage) Save(value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) SavePoint ¶
func (gps *GormPersistenceStorage) SavePoint(name string) IPersistenceStorage
func (*GormPersistenceStorage) Scan ¶
func (gps *GormPersistenceStorage) Scan(dest interface{}) IPersistenceStorage
func (*GormPersistenceStorage) ScanRows ¶
func (gps *GormPersistenceStorage) ScanRows(rows IPersistenceIterateRows, dest interface{}) error
func (*GormPersistenceStorage) Scopes ¶
func (gps *GormPersistenceStorage) Scopes(funcs ...func(*gorm.DB) *gorm.DB) IPersistenceStorage
func (*GormPersistenceStorage) Select ¶
func (gps *GormPersistenceStorage) Select(query interface{}, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Session ¶
func (gps *GormPersistenceStorage) Session(config *gorm.Session) IPersistenceStorage
func (*GormPersistenceStorage) Set ¶
func (gps *GormPersistenceStorage) Set(key string, value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) SetupJoinTable ¶
func (gps *GormPersistenceStorage) SetupJoinTable(model interface{}, field string, joinTable interface{}) error
func (*GormPersistenceStorage) Table ¶
func (gps *GormPersistenceStorage) Table(name string, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Take ¶
func (gps *GormPersistenceStorage) Take(dest interface{}, conds ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Transaction ¶
func (*GormPersistenceStorage) Unscoped ¶
func (gps *GormPersistenceStorage) Unscoped() IPersistenceStorage
func (*GormPersistenceStorage) Update ¶
func (gps *GormPersistenceStorage) Update(column string, value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) UpdateColumn ¶
func (gps *GormPersistenceStorage) UpdateColumn(column string, value interface{}) IPersistenceStorage
func (*GormPersistenceStorage) UpdateColumns ¶
func (gps *GormPersistenceStorage) UpdateColumns(values interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Updates ¶
func (gps *GormPersistenceStorage) Updates(values interface{}) IPersistenceStorage
func (*GormPersistenceStorage) Use ¶
func (gps *GormPersistenceStorage) Use(plugin gorm.Plugin) error
func (*GormPersistenceStorage) Where ¶
func (gps *GormPersistenceStorage) Where(query interface{}, args ...interface{}) IPersistenceStorage
func (*GormPersistenceStorage) WithContext ¶
func (gps *GormPersistenceStorage) WithContext(ctx context.Context) IPersistenceStorage
type GormQueryBuilder ¶
type GormQueryBuilder struct {
FilterString []string
OperatorRegistry *GormOperatorRegistry
Model interface{}
}
type GrouppedFields ¶
type GrouppedFieldsRegistry ¶
type GrouppedFieldsRegistry struct {
GrouppedFields map[string]*GrouppedFields
}
func (*GrouppedFieldsRegistry) AddGroup ¶
func (tfr *GrouppedFieldsRegistry) AddGroup(grouppedFields *GrouppedFields)
func (*GrouppedFieldsRegistry) GetGroupByName ¶
func (tfr *GrouppedFieldsRegistry) GetGroupByName(name string) (*GrouppedFields, error)
type GtGormOperator ¶
type GtGormOperator struct {
}
func (*GtGormOperator) Build ¶
func (ego *GtGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*GtGormOperator) GetName ¶
func (ego *GtGormOperator) GetName() string
func (*GtGormOperator) RegisterDbHandlers ¶
func (ego *GtGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*GtGormOperator) TransformValue ¶
func (ego *GtGormOperator) TransformValue(value string) interface{}
type GteGormOperator ¶
type GteGormOperator struct {
}
func (*GteGormOperator) Build ¶
func (ego *GteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*GteGormOperator) GetName ¶
func (ego *GteGormOperator) GetName() string
func (*GteGormOperator) RegisterDbHandlers ¶
func (ego *GteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*GteGormOperator) TransformValue ¶
func (ego *GteGormOperator) TransformValue(value string) interface{}
type HiddenWidget ¶
type HiddenWidget struct {
Widget
}
func (*HiddenWidget) GetTemplateName ¶
func (w *HiddenWidget) GetTemplateName() string
func (*HiddenWidget) GetWidgetType ¶
func (w *HiddenWidget) GetWidgetType() WidgetType
func (*HiddenWidget) ProceedForm ¶
func (w *HiddenWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*HiddenWidget) Render ¶
func (w *HiddenWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type HourGormOperator ¶
type HourGormOperator struct {
}
func (*HourGormOperator) Build ¶
func (ego *HourGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*HourGormOperator) GetName ¶
func (ego *HourGormOperator) GetName() string
func (*HourGormOperator) RegisterDbHandlers ¶
func (ego *HourGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*HourGormOperator) TransformValue ¶
func (ego *HourGormOperator) TransformValue(value string) interface{}
type IAdminContext ¶
type IAdminContext interface {
SetSiteName(siteName string)
SetCurrentURL(currentURL string)
SetFullURL(fullURL *url.URL)
SetRootAdminURL(rootAdminURL string)
SetSessionKey(sessionKey string)
SetRootURL(rootURL string)
SetLanguage(language *Language)
SetLogo(logo string)
SetFavIcon(favicon string)
SetLanguages(langs []Language)
SetPageTitle(pageTitle string)
SetUser(user string)
SetUserExists(userExists bool)
SetDemo()
SetError(err string)
SetErrorExists()
GetLanguage() *Language
GetRootURL() string
SetUserPermissionRegistry(permRegistry *UserPermRegistry)
SetForm(form IForm)
SetCurrentQuery(currentQuery string)
SetBreadCrumbs(breadcrumbs *AdminBreadCrumbsRegistry)
GetSessionKey() string
SetID(ID uint)
GetID() uint
SetUserObject(u *User)
GetUserObject() *User
SetPostForm(formD *multipart.Form)
GetPostForm() *multipart.Form
GetCtx() *gin.Context
SetCtx(ctx *gin.Context)
}
type IAdminFilterObjects ¶
type IAdminFilterObjects interface {
WithTransaction(handler func(afo1 IAdminFilterObjects) error)
LoadDataForModelByID(ID interface{}, model interface{})
SaveModel(model interface{}) error
CreateNew(model interface{}) error
GetPaginated() <-chan *IterateAdminObjects
IterateThroughWholeQuerySet() <-chan *IterateAdminObjects
GetPaginatedQuerySet() IPersistenceStorage
GetFullQuerySet() IPersistenceStorage
SetFullQuerySet(IPersistenceStorage)
SetPaginatedQuerySet(IPersistenceStorage)
GetUadminDatabase() *UadminDatabase
GetCurrentModel() interface{}
GetInitialQuerySet() IPersistenceStorage
SetInitialQuerySet(IPersistenceStorage)
GenerateModelInterface() (interface{}, interface{})
RemoveModelPermanently(model interface{}) error
}
type IAdminModelActionInterface ¶
type IAdminModelActionInterface interface {
}
type IBlueprint ¶
type IBlueprint interface {
GetName() string
GetDescription() string
GetMigrationRegistry() IMigrationRegistry
InitRouter(mainRouter *gin.Engine, group *gin.RouterGroup)
Init()
}
type IBlueprintRegistry ¶
type IBlueprintRegistry interface {
Iterate() <-chan IBlueprint
GetByName(name string) (IBlueprint, error)
Register(blueprint IBlueprint)
GetMigrationTree() IMigrationTree
TraverseMigrations() <-chan *TraverseMigrationResult
TraverseMigrationsDownTo(downToMigration int64) <-chan *TraverseMigrationResult
InitializeRouting(router *gin.Engine)
Initialize()
ResetMigrationTree()
}
func NewBlueprintRegistry ¶
func NewBlueprintRegistry() IBlueprintRegistry
type IContainsGormOperator ¶
type IContainsGormOperator struct {
}
func (*IContainsGormOperator) Build ¶
func (ego *IContainsGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IContainsGormOperator) GetName ¶
func (ego *IContainsGormOperator) GetName() string
func (*IContainsGormOperator) RegisterDbHandlers ¶
func (ego *IContainsGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IContainsGormOperator) TransformValue ¶
func (ego *IContainsGormOperator) TransformValue(value string) interface{}
type IDbAdapter ¶
type IDbAdapter interface {
Equals(name interface{}, args ...interface{})
Quote(name interface{}) string
LikeOperator() string
ToString() string
GetLastInsertID()
QuoteTableName(tableName string) string
Delete(db *gorm.DB, model reflect.Value, query interface{}, args ...interface{}) *gorm.DB
ReadRows(db *gorm.DB, customSchema bool, SQL string, m interface{}, args ...interface{}) (*sql.Rows, error)
GetSQLDialectStrings() map[string]string
GetDb(alias string, dryRun bool) (*gorm.DB, error)
CreateDb() error
Transaction(handler func()) error
GetStringToExtractYearFromField(filterOptionField string) string
GetStringToExtractMonthFromField(filterOptionField string) string
Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
In(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Range(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Date(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Year(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Month(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Day(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Week(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Time(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Second(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure
// contains filtered or unexported methods
}
func GetAdapterForDb ¶
func GetAdapterForDb(alias1 ...string) IDbAdapter
func NewDbAdapter ¶
func NewDbAdapter(db *gorm.DB, dbType string) IDbAdapter
type IEndsWithGormOperator ¶
type IEndsWithGormOperator struct {
}
func (*IEndsWithGormOperator) Build ¶
func (ego *IEndsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IEndsWithGormOperator) GetName ¶
func (ego *IEndsWithGormOperator) GetName() string
func (*IEndsWithGormOperator) RegisterDbHandlers ¶
func (ego *IEndsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IEndsWithGormOperator) TransformValue ¶
func (ego *IEndsWithGormOperator) TransformValue(value string) interface{}
type IExactGormOperator ¶
type IExactGormOperator struct {
}
func (*IExactGormOperator) Build ¶
func (ego *IExactGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IExactGormOperator) GetName ¶
func (ego *IExactGormOperator) GetName() string
func (*IExactGormOperator) RegisterDbHandlers ¶
func (ego *IExactGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IExactGormOperator) TransformValue ¶
func (ego *IExactGormOperator) TransformValue(value string) interface{}
type IFieldChoiceRegistryInterface ¶
type IFieldChoiceRegistryInterface interface {
IsValidChoice(v interface{}) bool
}
type IFieldFormOptions ¶
type IFieldFormOptions interface {
GetName() string
GetInitial() interface{}
GetDisplayName() string
GetValidators() *ValidatorRegistry
GetChoices() *FieldChoiceRegistry
GetHelpText() string
GetWidgetType() string
GetReadOnly() bool
GetIsRequired() bool
GetWidgetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
IsItFk() bool
}
type IFieldRegistry ¶
type IGormOperator ¶
type IGormOperator interface {
Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
GetName() string
RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
TransformValue(value string) interface{}
}
type IGrouppedFieldsRegistry ¶
type IGrouppedFieldsRegistry interface {
AddGroup(grouppedFields *GrouppedFields)
GetGroupByName(name string) *GrouppedFields
}
type IListDisplayInterface ¶
type IListDisplayInterface interface {
GetValue(m interface{}) string
}
type IListFilterInterface ¶
type IListFilterInterface interface {
FilterQs(afo IAdminFilterObjects, filterString string)
}
type IMigration ¶
type IMigration interface {
Up(uadminDatabase *UadminDatabase) error
Down(uadminDatabase *UadminDatabase) error
GetName() string
GetID() int64
Deps() []string
}
type IMigrationNode ¶
type IMigrationNode interface {
IsApplied() bool
GetMigration() IMigration
SetItAsRoot()
IsRoot() bool
AddChild(node IMigrationNode)
AddDep(node IMigrationNode)
GetChildrenCount() int
GetChildren() *list.List
GetDeps() *list.List
TraverseDeps(migrationList []int64, depList MigrationDepList) MigrationDepList
TraverseChildren(migrationList []int64) []int64
IsDummy() bool
Downgrade(uadminDatabase *UadminDatabase) error
Apply(uadminDatabase *UadminDatabase) error
}
func NewMigrationNode ¶
func NewMigrationNode(dep IMigrationNode, node IMigration, child IMigrationNode) IMigrationNode
func NewMigrationRootNode ¶
func NewMigrationRootNode() IMigrationNode
type IMigrationRegistry ¶
type IMigrationRegistry interface {
GetByName(migrationName string) (IMigration, error)
AddMigration(migration IMigration)
GetSortedMigrations() MigrationList
}
type IMigrationTree ¶
type IMigrationTree interface {
GetRoot() IMigrationNode
SetRoot(root IMigrationNode)
GetNodeByMigrationName(migrationName string) (IMigrationNode, error)
GetNodeByMigrationID(ID int64) (IMigrationNode, error)
AddNode(node IMigrationNode) error
TreeBuilt()
IsTreeBuilt() bool
}
func NewMigrationTree ¶
func NewMigrationTree() IMigrationTree
type IPaginationInterface ¶
type IPaginationInterface interface {
Paginate(afo IAdminFilterObjects)
}
type IPermissionRegistry ¶
type IPermissionRegistry interface {
AddPermission(permission CustomPermission, permissionBit PermBitInteger)
GetPermissionBit(permission CustomPermission) PermBitInteger
GetAllPermissions() <-chan *PermissionDescribed
}
type IPersistenceAssociation ¶
type IPersistenceIterateRow ¶
type IPersistenceIterateRows ¶
type IPersistenceMigrator ¶
type IPersistenceMigrator interface {
AutoMigrate(dst ...interface{}) error
CurrentDatabase() string
FullDataTypeOf(*schema.Field) clause.Expr
CreateTable(dst ...interface{}) error
DropTable(dst ...interface{}) error
HasTable(dst interface{}) bool
RenameTable(oldName interface{}, newName interface{}) error
AddColumn(dst interface{}, field string) error
DropColumn(dst interface{}, field string) error
AlterColumn(dst interface{}, field string) error
MigrateColumn(dst interface{}, field *schema.Field, columnType gorm.ColumnType) error
HasColumn(dst interface{}, field string) bool
RenameColumn(dst interface{}, oldName string, field string) error
ColumnTypes(dst interface{}) ([]gorm.ColumnType, error)
CreateView(name string, option gorm.ViewOption) error
DropView(name string) error
CreateConstraint(dst interface{}, name string) error
DropConstraint(dst interface{}, name string) error
HasConstraint(dst interface{}, name string) bool
CreateIndex(dst interface{}, name string) error
DropIndex(dst interface{}, name string) error
HasIndex(dst interface{}, name string) bool
RenameIndex(dst interface{}, oldName string, newName string) error
}
type IPersistenceStorage ¶
type IPersistenceStorage interface {
Association(column string) IPersistenceAssociation
Model(value interface{}) IPersistenceStorage
Clauses(conds ...clause.Expression) IPersistenceStorage
Table(name string, args ...interface{}) IPersistenceStorage
Distinct(args ...interface{}) IPersistenceStorage
Select(query interface{}, args ...interface{}) IPersistenceStorage
Omit(columns ...string) IPersistenceStorage
Where(query interface{}, args ...interface{}) IPersistenceStorage
Not(query interface{}, args ...interface{}) IPersistenceStorage
Or(query interface{}, args ...interface{}) IPersistenceStorage
Joins(query string, args ...interface{}) IPersistenceStorage
Group(name string) IPersistenceStorage
Having(query interface{}, args ...interface{}) IPersistenceStorage
Order(value interface{}) IPersistenceStorage
Limit(limit int) IPersistenceStorage
Offset(offset int) IPersistenceStorage
Scopes(funcs ...func(*gorm.DB) *gorm.DB) IPersistenceStorage
Preload(query string, args ...interface{}) IPersistenceStorage
Attrs(attrs ...interface{}) IPersistenceStorage
Assign(attrs ...interface{}) IPersistenceStorage
Unscoped() IPersistenceStorage
Raw(sql string, values ...interface{}) IPersistenceStorage
Migrator() IPersistenceMigrator
AutoMigrate(dst ...interface{}) error
Session(config *gorm.Session) IPersistenceStorage
WithContext(ctx context.Context) IPersistenceStorage
Debug() IPersistenceStorage
Set(key string, value interface{}) IPersistenceStorage
Get(key string) (interface{}, bool)
InstanceSet(key string, value interface{}) IPersistenceStorage
InstanceGet(key string) (interface{}, bool)
AddError(err error) error
DB() (*sql.DB, error)
SetupJoinTable(model interface{}, field string, joinTable interface{}) error
Use(plugin gorm.Plugin) error
Create(value interface{}) IPersistenceStorage
CreateInBatches(value interface{}, batchSize int) IPersistenceStorage
Save(value interface{}) IPersistenceStorage
First(dest interface{}, conds ...interface{}) IPersistenceStorage
Take(dest interface{}, conds ...interface{}) IPersistenceStorage
Last(dest interface{}, conds ...interface{}) IPersistenceStorage
Find(dest interface{}, conds ...interface{}) IPersistenceStorage
FindInBatches(dest interface{}, batchSize int, fc func(tx *gorm.DB, batch int) error) IPersistenceStorage
FirstOrInit(dest interface{}, conds ...interface{}) IPersistenceStorage
FirstOrCreate(dest interface{}, conds ...interface{}) IPersistenceStorage
Update(column string, value interface{}) IPersistenceStorage
Updates(values interface{}) IPersistenceStorage
UpdateColumn(column string, value interface{}) IPersistenceStorage
UpdateColumns(values interface{}) IPersistenceStorage
Delete(value interface{}, conds ...interface{}) IPersistenceStorage
Count(count *int64) IPersistenceStorage
Row() IPersistenceIterateRow
Rows() (IPersistenceIterateRows, error)
Scan(dest interface{}) IPersistenceStorage
Pluck(column string, dest interface{}) IPersistenceStorage
ScanRows(rows IPersistenceIterateRows, dest interface{}) error
Transaction(fc func(*gorm.DB) error, opts ...*sql.TxOptions) (err error)
Begin(opts ...*sql.TxOptions) IPersistenceStorage
Commit() IPersistenceStorage
Rollback() IPersistenceStorage
SavePoint(name string) IPersistenceStorage
RollbackTo(name string) IPersistenceStorage
Exec(sql string, values ...interface{}) IPersistenceStorage
GetCurrentDB() *gorm.DB
}
type IRegexGormOperator ¶
type IRegexGormOperator struct {
}
func (*IRegexGormOperator) Build ¶
func (ego *IRegexGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IRegexGormOperator) GetName ¶
func (ego *IRegexGormOperator) GetName() string
func (*IRegexGormOperator) RegisterDbHandlers ¶
func (ego *IRegexGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IRegexGormOperator) TransformValue ¶
func (ego *IRegexGormOperator) TransformValue(value string) interface{}
type IRegisterDbHandler ¶
type ISearchFieldInterface ¶
type ISearchFieldInterface interface {
Search(afo IAdminFilterObjects, searchString string)
}
type ISortBy ¶
type ISortBy interface {
Sort(afo IAdminFilterObjects, direction int)
}
type ISortInterface ¶
type ISortInterface interface {
Order(afo IAdminFilterObjects)
}
type IStartsWithGormOperator ¶
type IStartsWithGormOperator struct {
}
func (*IStartsWithGormOperator) Build ¶
func (ego *IStartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IStartsWithGormOperator) GetName ¶
func (ego *IStartsWithGormOperator) GetName() string
func (*IStartsWithGormOperator) RegisterDbHandlers ¶
func (ego *IStartsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IStartsWithGormOperator) TransformValue ¶
func (ego *IStartsWithGormOperator) TransformValue(value string) interface{}
type IStorageInterface ¶
type IStorageInterface interface {
Save(f *FileForStorage) (string, error)
Read(filename string) ([]byte, error)
Stats(filename string) (os.FileInfo, error)
Exists(filename string) (bool, error)
Delete(filename string) (bool, error)
GetUploadURL() string
}
func NewFsStorage ¶
func NewFsStorage() IStorageInterface
type ITemplateRenderer ¶
type ITemplateRenderer interface {
AddFuncMap(funcName string, concreteFunc interface{})
Render(ctx *gin.Context, fsys fs.FS, path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap)
RenderAsString(fsys fs.FS, path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap) string
}
func NewTemplateRenderer ¶
func NewTemplateRenderer(pageTitle string) ITemplateRenderer
type IUserPermissionRegistry ¶
type IValidator ¶
type IValidator func(i interface{}, o interface{}) error
type IWidget ¶
type IWidget interface {
IDForLabel(model interface{}, F *Field) string
GetWidgetType() WidgetType
GetAttrs() map[string]string
GetTemplateName() string
SetTemplateName(templateName string)
RenderUsingRenderer(renderer ITemplateRenderer)
// GetValue(v interface{}, model interface{}) interface{}
Render(formRenderContext *FormRenderContext, currentField *Field) string
SetValue(v interface{})
SetName(name string)
GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
SetAttr(attrName string, value string)
SetBaseFuncMap(baseFuncMap template.FuncMap)
InitializeAttrs()
SetFieldDisplayName(displayName string)
SetReadonly(readonly bool)
GetValue() interface{}
ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
SetRequired()
SetShowOnlyHTMLInput()
SetOutputValue(v interface{})
GetOutputValue() interface{}
SetErrors(validationErrors ValidationError)
RenderForAdmin()
SetHelpText(helpText string)
IsValueChanged() bool
SetPopulate(func(renderContext *FormRenderContext, currentField *Field) interface{})
SetPrefix(prefix string)
GetHTMLInputName() string
GetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
IsReadOnly() bool
IsValueConfigured() bool
SetValueConfigured()
GetRenderer() ITemplateRenderer
GetFieldDisplayName() string
GetName() string
}
func GetWidgetByWidgetType ¶
func GetWidgetFromUadminFieldTypeAndGormField ¶
func GetWidgetFromUadminFieldTypeAndGormField(uadminFieldType UadminFieldType, gormField *schema.Field) IWidget
type InGormOperator ¶
type InGormOperator struct {
}
func (*InGormOperator) Build ¶
func (ego *InGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*InGormOperator) GetName ¶
func (ego *InGormOperator) GetName() string
func (*InGormOperator) RegisterDbHandlers ¶
func (ego *InGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*InGormOperator) TransformValue ¶
func (ego *InGormOperator) TransformValue(value string) interface{}
type IncludeContext ¶
type InlineFormListEditableCollection ¶
type InlineFormListEditableCollection map[string]*FormListEditable
type IsNullGormOperator ¶
type IsNullGormOperator struct {
}
func (*IsNullGormOperator) Build ¶
func (ego *IsNullGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*IsNullGormOperator) GetName ¶
func (ego *IsNullGormOperator) GetName() string
func (*IsNullGormOperator) RegisterDbHandlers ¶
func (ego *IsNullGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*IsNullGormOperator) TransformValue ¶
func (ego *IsNullGormOperator) TransformValue(value string) interface{}
type IterateAdminObjects ¶
type IterateAdminObjects struct {
Model interface{}
ID uint
RenderContext *FormRenderContext
}
type Language ¶
type Language struct {
Model
Code string `gorm:"uniqueIndex;not null" uadminform:"ReadonlyField" uadmin:"list,search"`
Name string `uadminform:"ReadonlyField" uadmin:"list,search"`
EnglishName string `uadminform:"ReadonlyField" uadmin:"list,search"`
Active bool `gorm:"default:false" uadmin:"list"`
Flag string `uadminform:"ImageFormOptions"`
RTL bool `gorm:"default:false"`
Default bool `gorm:"default:false"`
AvailableInGui bool `gorm:"default:false" uadminform:"ReadonlyField" uadmin:"list"`
}
func GetActiveLanguages ¶
func GetActiveLanguages() []Language
GetActiveLanguages returns a list of active langages
func GetDefaultLanguage ¶
func GetDefaultLanguage() *Language
GetDefaultLanguage returns the default language
func GetLanguage ¶
GetLanguage returns the language of the request
type ListDisplay ¶
type ListDisplay struct {
DisplayName string
Field *Field
ChangeLink bool
Ordering int
SortBy *SortBy
Populate func(m interface{}) string
MethodName string
IsEditable bool
Prefix string
}
func NewListDisplay ¶
func NewListDisplay(field *Field) *ListDisplay
func (*ListDisplay) GetOrderingName ¶
func (ld *ListDisplay) GetOrderingName(initialOrdering []string) string
func (*ListDisplay) GetValue ¶
func (ld *ListDisplay) GetValue(m interface{}, forExportP ...bool) string
func (*ListDisplay) IsEligibleForOrdering ¶
func (ld *ListDisplay) IsEligibleForOrdering() bool
func (*ListDisplay) SetPrefix ¶
func (ld *ListDisplay) SetPrefix(prefix string)
type ListDisplayRegistry ¶
type ListDisplayRegistry struct {
ListDisplayFields map[string]*ListDisplay
MaxOrdering int
Prefix string
Placement string
}
func NewListDisplayRegistry ¶
func NewListDisplayRegistry() *ListDisplayRegistry
func NewListDisplayRegistryFromGormModel ¶
func NewListDisplayRegistryFromGormModel(modelI interface{}) *ListDisplayRegistry
func NewListDisplayRegistryFromGormModelForInlines ¶
func NewListDisplayRegistryFromGormModelForInlines(modelI interface{}) *ListDisplayRegistry
func (*ListDisplayRegistry) AddField ¶
func (ldr *ListDisplayRegistry) AddField(ld *ListDisplay)
func (*ListDisplayRegistry) BuildFormForListEditable ¶
func (ldr *ListDisplayRegistry) BuildFormForListEditable(adminContext IAdminContext, ID uint, model interface{}) *FormListEditable
func (*ListDisplayRegistry) BuildListEditableFormForNewModel ¶
func (ldr *ListDisplayRegistry) BuildListEditableFormForNewModel(adminContext IAdminContext, ID string, model interface{}) *FormListEditable
func (*ListDisplayRegistry) ClearAllFields ¶
func (ldr *ListDisplayRegistry) ClearAllFields()
func (*ListDisplayRegistry) GetAllFields ¶
func (ldr *ListDisplayRegistry) GetAllFields() <-chan *ListDisplay
func (*ListDisplayRegistry) GetFieldByDisplayName ¶
func (ldr *ListDisplayRegistry) GetFieldByDisplayName(displayName string) (*ListDisplay, error)
func (*ListDisplayRegistry) GetFieldsCount ¶
func (ldr *ListDisplayRegistry) GetFieldsCount() int
func (*ListDisplayRegistry) IsThereAnyEditable ¶
func (ldr *ListDisplayRegistry) IsThereAnyEditable() bool
func (*ListDisplayRegistry) SetPrefix ¶
func (ldr *ListDisplayRegistry) SetPrefix(prefix string)
type ListFilter ¶
type ListFilter struct {
Title string
URLFilteringParam string
OptionsToShow []*FieldChoice
FetchOptions func(m interface{}) []*FieldChoice
CustomFilterQs func(afo IAdminFilterObjects, filterString string)
Template string
Ordering int
}
func (*ListFilter) FilterQs ¶
func (lf *ListFilter) FilterQs(afo IAdminFilterObjects, filterString string)
func (*ListFilter) GetURLForOption ¶
func (lf *ListFilter) GetURLForOption(option *FieldChoice, fullURL *url.URL) string
func (*ListFilter) GetURLToClearFilter ¶
func (lf *ListFilter) GetURLToClearFilter(fullURL *url.URL) string
func (*ListFilter) IsItActive ¶
func (lf *ListFilter) IsItActive(fullURL *url.URL) bool
func (*ListFilter) IsThatOptionActive ¶
func (lf *ListFilter) IsThatOptionActive(option *FieldChoice, fullURL *url.URL) bool
type ListFilterList ¶
type ListFilterList []*ListFilter
func (ListFilterList) Len ¶
func (apl ListFilterList) Len() int
func (ListFilterList) Less ¶
func (apl ListFilterList) Less(i, j int) bool
func (ListFilterList) Swap ¶
func (apl ListFilterList) Swap(i, j int)
type ListFilterRegistry ¶
type ListFilterRegistry struct {
ListFilter []*ListFilter
}
func (*ListFilterRegistry) Add ¶
func (lfr *ListFilterRegistry) Add(lf *ListFilter)
func (*ListFilterRegistry) IsEmpty ¶
func (lfr *ListFilterRegistry) IsEmpty() bool
func (*ListFilterRegistry) Iterate ¶
func (lfr *ListFilterRegistry) Iterate() <-chan *ListFilter
type LtGormOperator ¶
type LtGormOperator struct {
}
func (*LtGormOperator) Build ¶
func (ego *LtGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*LtGormOperator) GetName ¶
func (ego *LtGormOperator) GetName() string
func (*LtGormOperator) RegisterDbHandlers ¶
func (ego *LtGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*LtGormOperator) TransformValue ¶
func (ego *LtGormOperator) TransformValue(value string) interface{}
type LteGormOperator ¶
type LteGormOperator struct {
}
func (*LteGormOperator) Build ¶
func (ego *LteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*LteGormOperator) GetName ¶
func (ego *LteGormOperator) GetName() string
func (*LteGormOperator) RegisterDbHandlers ¶
func (ego *LteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*LteGormOperator) TransformValue ¶
func (ego *LteGormOperator) TransformValue(value string) interface{}
type MigrationDepList ¶
type MigrationDepList []int64
func (MigrationDepList) Len ¶
func (m MigrationDepList) Len() int
func (MigrationDepList) Less ¶
func (m MigrationDepList) Less(i, j int) bool
func (MigrationDepList) Swap ¶
func (m MigrationDepList) Swap(i, j int)
type MigrationList ¶
type MigrationList []IMigration
func (MigrationList) Len ¶
func (m MigrationList) Len() int
func (MigrationList) Less ¶
func (m MigrationList) Less(i, j int) bool
func (MigrationList) Swap ¶
func (m MigrationList) Swap(i, j int)
type MigrationNode ¶
type MigrationNode struct {
Deps *list.List
Node IMigration
Children *list.List
// contains filtered or unexported fields
}
func (MigrationNode) AddChild ¶
func (n MigrationNode) AddChild(node IMigrationNode)
func (MigrationNode) AddDep ¶
func (n MigrationNode) AddDep(node IMigrationNode)
func (MigrationNode) Apply ¶
func (n MigrationNode) Apply(uadminDatabase *UadminDatabase) error
func (MigrationNode) Downgrade ¶
func (n MigrationNode) Downgrade(uadminDatabase *UadminDatabase) error
func (MigrationNode) GetChildren ¶
func (n MigrationNode) GetChildren() *list.List
func (MigrationNode) GetChildrenCount ¶
func (n MigrationNode) GetChildrenCount() int
func (MigrationNode) GetDeps ¶
func (n MigrationNode) GetDeps() *list.List
func (MigrationNode) GetMigration ¶
func (n MigrationNode) GetMigration() IMigration
func (MigrationNode) IsApplied ¶
func (n MigrationNode) IsApplied() bool
func (MigrationNode) IsDummy ¶
func (n MigrationNode) IsDummy() bool
func (MigrationNode) IsRoot ¶
func (n MigrationNode) IsRoot() bool
func (MigrationNode) SetItAsRoot ¶
func (n MigrationNode) SetItAsRoot()
func (MigrationNode) TraverseChildren ¶
func (n MigrationNode) TraverseChildren(migrationList []int64) []int64
func (MigrationNode) TraverseDeps ¶
func (n MigrationNode) TraverseDeps(migrationList []int64, depList MigrationDepList) MigrationDepList
type MigrationRegistry ¶
type MigrationRegistry struct {
// contains filtered or unexported fields
}
func NewMigrationRegistry ¶
func NewMigrationRegistry() *MigrationRegistry
func (MigrationRegistry) AddMigration ¶
func (r MigrationRegistry) AddMigration(migration IMigration)
func (MigrationRegistry) GetByName ¶
func (r MigrationRegistry) GetByName(migrationName string) (IMigration, error)
func (MigrationRegistry) GetSortedMigrations ¶
func (r MigrationRegistry) GetSortedMigrations() MigrationList
type MigrationTree ¶
type MigrationTree struct {
Root IMigrationNode
// contains filtered or unexported fields
}
func (MigrationTree) AddNode ¶
func (t MigrationTree) AddNode(node IMigrationNode) error
func (MigrationTree) GetNodeByMigrationID ¶ added in v1.0.5
func (t MigrationTree) GetNodeByMigrationID(migrationID int64) (IMigrationNode, error)
func (MigrationTree) GetNodeByMigrationName ¶
func (t MigrationTree) GetNodeByMigrationName(migrationName string) (IMigrationNode, error)
func (MigrationTree) GetRoot ¶
func (t MigrationTree) GetRoot() IMigrationNode
func (MigrationTree) IsTreeBuilt ¶
func (t MigrationTree) IsTreeBuilt() bool
func (MigrationTree) SetRoot ¶
func (t MigrationTree) SetRoot(root IMigrationNode)
func (MigrationTree) TreeBuilt ¶
func (t MigrationTree) TreeBuilt()
type MinuteGormOperator ¶
type MinuteGormOperator struct {
}
func (*MinuteGormOperator) Build ¶
func (ego *MinuteGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*MinuteGormOperator) GetName ¶
func (ego *MinuteGormOperator) GetName() string
func (*MinuteGormOperator) RegisterDbHandlers ¶
func (ego *MinuteGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*MinuteGormOperator) TransformValue ¶
func (ego *MinuteGormOperator) TransformValue(value string) interface{}
type Model ¶
Model is the standard struct to be embedded in any other struct to make it a model for uadmin
type ModelDescription ¶
type MonthGormOperator ¶
type MonthGormOperator struct {
}
func (*MonthGormOperator) Build ¶
func (ego *MonthGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*MonthGormOperator) GetName ¶
func (ego *MonthGormOperator) GetName() string
func (*MonthGormOperator) RegisterDbHandlers ¶
func (ego *MonthGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*MonthGormOperator) TransformValue ¶
func (ego *MonthGormOperator) TransformValue(value string) interface{}
type MultipleInputHiddenWidget ¶
type MultipleInputHiddenWidget struct {
Widget
}
func (*MultipleInputHiddenWidget) GetTemplateName ¶
func (w *MultipleInputHiddenWidget) GetTemplateName() string
func (*MultipleInputHiddenWidget) GetWidgetType ¶
func (w *MultipleInputHiddenWidget) GetWidgetType() WidgetType
func (*MultipleInputHiddenWidget) ProceedForm ¶
func (w *MultipleInputHiddenWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*MultipleInputHiddenWidget) Render ¶
func (w *MultipleInputHiddenWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type NullBooleanWidget ¶
type NullBooleanWidget struct {
Widget
OptGroups map[string][]*SelectOptGroup
}
func (*NullBooleanWidget) GetDataForRendering ¶
func (w *NullBooleanWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*NullBooleanWidget) GetOptGroups ¶
func (w *NullBooleanWidget) GetOptGroups() map[string][]*SelectOptGroup
func (*NullBooleanWidget) GetTemplateName ¶
func (w *NullBooleanWidget) GetTemplateName() string
func (*NullBooleanWidget) GetWidgetType ¶
func (w *NullBooleanWidget) GetWidgetType() WidgetType
func (*NullBooleanWidget) ProceedForm ¶
func (w *NullBooleanWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*NullBooleanWidget) Render ¶
func (w *NullBooleanWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type NumberWidget ¶
type NumberWidget struct {
Widget
NumberType UadminFieldType
}
func (*NumberWidget) GetTemplateName ¶
func (w *NumberWidget) GetTemplateName() string
func (*NumberWidget) GetWidgetType ¶
func (w *NumberWidget) GetWidgetType() WidgetType
func (*NumberWidget) ProceedForm ¶
func (w *NumberWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*NumberWidget) Render ¶
func (w *NumberWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*NumberWidget) TransformValueForOutput ¶
func (w *NumberWidget) TransformValueForOutput(v string) interface{}
type OneTimeAction ¶
type OneTimeAction struct {
Model
User User
UserID uint
ExpiresOn time.Time `gorm:"index"`
Code string `gorm:"uniqueIndex"`
ActionType OneTimeActionType
IsUsed bool `gorm:"default:false"`
}
func (*OneTimeAction) String ¶
func (m *OneTimeAction) String() string
type OneTimeActionType ¶
type OneTimeActionType int
Action !
func (OneTimeActionType) ResetPassword ¶
func (a OneTimeActionType) ResetPassword() OneTimeActionType
type PaginationType ¶
type PaginationType string
var CursorPaginationType PaginationType = "cursor"
var LimitPaginationType PaginationType = "limit"
type Paginator ¶
type Paginator struct {
PerPage int
AllowEmptyFirstPage bool
ShowLastPageOnPreviousPage bool
Count int
NumPages int
Offset int
Template string
PaginationType PaginationType
}
func (*Paginator) Paginate ¶
func (p *Paginator) Paginate(afo IAdminFilterObjects)
type PasswordWidget ¶
type PasswordWidget struct {
Widget
}
func (*PasswordWidget) GetTemplateName ¶
func (w *PasswordWidget) GetTemplateName() string
func (*PasswordWidget) GetWidgetType ¶
func (w *PasswordWidget) GetWidgetType() WidgetType
func (*PasswordWidget) ProceedForm ¶
func (w *PasswordWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*PasswordWidget) Render ¶
func (w *PasswordWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type PermBitInteger ¶
type PermBitInteger uint
const AddPermBit PermBitInteger = 2
const DeletePermBit PermBitInteger = 8
const EditPermBit PermBitInteger = 4
const PublishPermBit PermBitInteger = 16
const ReadPermBit PermBitInteger = 0
const RevertPermBit PermBitInteger = 32
type PermRegistry ¶
type PermRegistry struct {
PermNameBitInteger map[CustomPermission]PermBitInteger
}
var ProjectPermRegistry *PermRegistry
func NewPerm ¶
func NewPerm() *PermRegistry
func (*PermRegistry) AddPermission ¶
func (ap *PermRegistry) AddPermission(permission CustomPermission, permissionBit PermBitInteger)
func (*PermRegistry) GetAllPermissions ¶
func (ap *PermRegistry) GetAllPermissions() <-chan *PermissionDescribed
func (*PermRegistry) GetPermissionBit ¶
func (ap *PermRegistry) GetPermissionBit(permission CustomPermission) PermBitInteger
func (*PermRegistry) GetPermissionName ¶
func (ap *PermRegistry) GetPermissionName(permissionBit PermBitInteger) CustomPermission
type Permission ¶
type Permission struct {
Model
Name string
ContentType ContentType
ContentTypeID uint
PermissionBits PermBitInteger
}
UserPermission !
func (Permission) HideInDashboard ¶
func (Permission) HideInDashboard() bool
HideInDashboard to return false and auto hide this from dashboard
func (*Permission) ShortDescription ¶
func (m *Permission) ShortDescription() string
func (*Permission) String ¶
func (m *Permission) String() string
type PermissionDescribed ¶
type PermissionDescribed struct {
Name CustomPermission
Bit PermBitInteger
}
type ProjectModelRegistry ¶
type ProjectModelRegistry struct {
// contains filtered or unexported fields
}
var ProjectModels *ProjectModelRegistry
func (*ProjectModelRegistry) GetModelByName ¶
func (pmr *ProjectModelRegistry) GetModelByName(modelName string) *ModelDescription
func (*ProjectModelRegistry) GetModelFromInterface ¶
func (pmr *ProjectModelRegistry) GetModelFromInterface(model interface{}) *ModelDescription
func (*ProjectModelRegistry) Iterate ¶
func (pmr *ProjectModelRegistry) Iterate() <-chan *ModelDescription
func (*ProjectModelRegistry) RegisterModel ¶
func (pmr *ProjectModelRegistry) RegisterModel(generateModelI func() interface{})
type QuarterGormOperator ¶
type QuarterGormOperator struct {
}
func (*QuarterGormOperator) Build ¶
func (ego *QuarterGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*QuarterGormOperator) GetName ¶
func (ego *QuarterGormOperator) GetName() string
func (*QuarterGormOperator) RegisterDbHandlers ¶
func (ego *QuarterGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*QuarterGormOperator) TransformValue ¶
func (ego *QuarterGormOperator) TransformValue(value string) interface{}
type RadioOptGroup ¶
type RadioSelectWidget ¶
type RadioSelectWidget struct {
Widget
OptGroups map[string][]*RadioOptGroup
ID string
WrapLabel bool
}
func (*RadioSelectWidget) GetDataForRendering ¶
func (w *RadioSelectWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
func (*RadioSelectWidget) GetTemplateName ¶
func (w *RadioSelectWidget) GetTemplateName() string
func (*RadioSelectWidget) GetWidgetType ¶
func (w *RadioSelectWidget) GetWidgetType() WidgetType
func (*RadioSelectWidget) ProceedForm ¶
func (w *RadioSelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*RadioSelectWidget) Render ¶
func (w *RadioSelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*RadioSelectWidget) SetID ¶
func (w *RadioSelectWidget) SetID(ID string)
type RangeGormOperator ¶
type RangeGormOperator struct {
}
func (*RangeGormOperator) Build ¶
func (ego *RangeGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*RangeGormOperator) GetName ¶
func (ego *RangeGormOperator) GetName() string
func (*RangeGormOperator) RegisterDbHandlers ¶
func (ego *RangeGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*RangeGormOperator) TransformValue ¶
func (ego *RangeGormOperator) TransformValue(value string) interface{}
type RegexGormOperator ¶
type RegexGormOperator struct {
}
func (*RegexGormOperator) Build ¶
func (ego *RegexGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*RegexGormOperator) GetName ¶
func (ego *RegexGormOperator) GetName() string
func (*RegexGormOperator) RegisterDbHandlers ¶
func (ego *RegexGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*RegexGormOperator) TransformValue ¶
func (ego *RegexGormOperator) TransformValue(value string) interface{}
type RemovalOrderList ¶
type RemovalOrderList []*RemovalTreeNode
type RemovalTreeList ¶
type RemovalTreeList []*RemovalTreeNodeStringified
type RemovalTreeNode ¶
type RemovalTreeNode struct {
Model interface{}
ModelDescription *ModelDescription
Next []*RemovalTreeNode
Prev []*RemovalTreeNode
RawSQL []*DeleteRowStructure
Visited bool
Level int
}
func BuildRemovalTree ¶
func BuildRemovalTree(uadminDatabase *UadminDatabase, model interface{}, level ...int) *RemovalTreeNode
func (*RemovalTreeNode) BuildDeletionTreeStringified ¶
func (rtn *RemovalTreeNode) BuildDeletionTreeStringified(uadminDatabase *UadminDatabase) []*RemovalTreeNodeStringified
func (*RemovalTreeNode) RemoveFromDatabase ¶
func (rtn *RemovalTreeNode) RemoveFromDatabase(uadminDatabase *UadminDatabase) error
type SearchField ¶
type SearchField struct {
Field *Field
CustomSearch func(afo IAdminFilterObjects, searchString string)
}
func (*SearchField) Search ¶
func (sf *SearchField) Search(afo IAdminFilterObjects, searchString string)
type SearchFieldRegistry ¶
type SearchFieldRegistry struct {
Fields []*SearchField
}
func NewSearchFieldRegistryFromGormModel ¶
func NewSearchFieldRegistryFromGormModel(modelI interface{}) *SearchFieldRegistry
func (*SearchFieldRegistry) AddField ¶
func (sfr *SearchFieldRegistry) AddField(sf *SearchField)
func (*SearchFieldRegistry) GetAll ¶
func (sfr *SearchFieldRegistry) GetAll() <-chan *SearchField
type SecondGormOperator ¶
type SecondGormOperator struct {
}
func (*SecondGormOperator) Build ¶
func (ego *SecondGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*SecondGormOperator) GetName ¶
func (ego *SecondGormOperator) GetName() string
func (*SecondGormOperator) RegisterDbHandlers ¶
func (ego *SecondGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*SecondGormOperator) TransformValue ¶
func (ego *SecondGormOperator) TransformValue(value string) interface{}
type SelectDateWidget ¶
type SelectDateWidget struct {
Widget
Years []int
Months []*SelectOptGroup
EmptyLabel []*SelectOptGroup
EmptyLabelString string
YearValue string
MonthValue string
DayValue string
}
func (*SelectDateWidget) GetTemplateName ¶
func (w *SelectDateWidget) GetTemplateName() string
func (*SelectDateWidget) GetWidgetType ¶
func (w *SelectDateWidget) GetWidgetType() WidgetType
func (*SelectDateWidget) ProceedForm ¶
func (w *SelectDateWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*SelectDateWidget) Render ¶
func (w *SelectDateWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type SelectMultipleWidget ¶
type SelectMultipleWidget struct {
Widget
OptGroups map[string][]*SelectOptGroup
}
func (*SelectMultipleWidget) GetDataForRendering ¶
func (w *SelectMultipleWidget) GetDataForRendering(formRenderContext *FormRenderContext) WidgetData
func (*SelectMultipleWidget) GetTemplateName ¶
func (w *SelectMultipleWidget) GetTemplateName() string
func (*SelectMultipleWidget) GetWidgetType ¶
func (w *SelectMultipleWidget) GetWidgetType() WidgetType
func (*SelectMultipleWidget) ProceedForm ¶
func (w *SelectMultipleWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*SelectMultipleWidget) Render ¶
func (w *SelectMultipleWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type SelectOptGroup ¶
type SelectOptGroup struct {
OptLabel string
Value interface{}
Selected bool
Attrs map[string]string
}
func MakeMonthsSelect ¶
func MakeMonthsSelect() []*SelectOptGroup
type SelectWidget ¶
type SelectWidget struct {
Widget
OptGroups map[string][]*SelectOptGroup
DontValidateForExistence bool
}
func (*SelectWidget) GetDataForRendering ¶
func (w *SelectWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*SelectWidget) GetTemplateName ¶
func (w *SelectWidget) GetTemplateName() string
func (*SelectWidget) GetWidgetType ¶
func (w *SelectWidget) GetWidgetType() WidgetType
func (*SelectWidget) ProceedForm ¶
func (w *SelectWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*SelectWidget) Render ¶
func (w *SelectWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type Session ¶
type Session struct {
Model
Key string
User User
UserID uint
LoginTime time.Time
LastLogin time.Time
Active bool `gorm:"default:false"`
IP string
PendingOTP bool
ExpiresOn *time.Time
Data string `json:"data"`
// contains filtered or unexported fields
}
func (Session) HideInDashboard ¶
HideInDashboard to return false and auto hide this from dashboard
type SplitDateTimeWidget ¶
type SplitDateTimeWidget struct {
Widget
DateAttrs map[string]string
TimeAttrs map[string]string
DateFormat string
TimeFormat string
DateLabel string
TimeLabel string
DateValue string
TimeValue string
}
func (*SplitDateTimeWidget) GetTemplateName ¶
func (w *SplitDateTimeWidget) GetTemplateName() string
func (*SplitDateTimeWidget) GetWidgetType ¶
func (w *SplitDateTimeWidget) GetWidgetType() WidgetType
func (*SplitDateTimeWidget) ProceedForm ¶
func (w *SplitDateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*SplitDateTimeWidget) Render ¶
func (w *SplitDateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type SplitHiddenDateTimeWidget ¶
type SplitHiddenDateTimeWidget struct {
Widget
DateAttrs map[string]string
TimeAttrs map[string]string
DateFormat string
TimeFormat string
DateValue string
TimeValue string
}
func (*SplitHiddenDateTimeWidget) GetTemplateName ¶
func (w *SplitHiddenDateTimeWidget) GetTemplateName() string
func (*SplitHiddenDateTimeWidget) GetWidgetType ¶
func (w *SplitHiddenDateTimeWidget) GetWidgetType() WidgetType
func (*SplitHiddenDateTimeWidget) ProceedForm ¶
func (w *SplitHiddenDateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*SplitHiddenDateTimeWidget) Render ¶
func (w *SplitHiddenDateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type SqliteDialect ¶
func (*SqliteDialect) BuildDeleteString ¶
func (d *SqliteDialect) BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure
func (*SqliteDialect) Contains ¶
func (d *SqliteDialect) Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Date ¶
func (d *SqliteDialect) Date(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Day ¶
func (d *SqliteDialect) Day(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Delete ¶
func (d *SqliteDialect) Delete(db *gorm.DB, model reflect.Value, query interface{}, args ...interface{}) *gorm.DB
@todo analyze
func (*SqliteDialect) EndsWith ¶
func (d *SqliteDialect) EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Equals ¶
func (d *SqliteDialect) Equals(name interface{}, args ...interface{})
func (*SqliteDialect) Exact ¶
func (d *SqliteDialect) Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) GetLastInsertID ¶
func (d *SqliteDialect) GetLastInsertID()
func (*SqliteDialect) GetSQLDialectStrings ¶
func (d *SqliteDialect) GetSQLDialectStrings() map[string]string
@todo analyze
func (*SqliteDialect) GetStringToExtractMonthFromField ¶
func (d *SqliteDialect) GetStringToExtractMonthFromField(filterOptionField string) string
func (*SqliteDialect) GetStringToExtractYearFromField ¶
func (d *SqliteDialect) GetStringToExtractYearFromField(filterOptionField string) string
func (*SqliteDialect) Gt ¶
func (d *SqliteDialect) Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Gte ¶
func (d *SqliteDialect) Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Hour ¶
func (d *SqliteDialect) Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IContains ¶
func (d *SqliteDialect) IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IEndsWith ¶
func (d *SqliteDialect) IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IExact ¶
func (d *SqliteDialect) IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IRegex ¶
func (d *SqliteDialect) IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IStartsWith ¶
func (d *SqliteDialect) IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) In ¶
func (d *SqliteDialect) In(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) IsNull ¶
func (d *SqliteDialect) IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) LikeOperator ¶
func (d *SqliteDialect) LikeOperator() string
func (*SqliteDialect) Lt ¶
func (d *SqliteDialect) Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Lte ¶
func (d *SqliteDialect) Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Minute ¶
func (d *SqliteDialect) Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Month ¶
func (d *SqliteDialect) Month(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Quarter ¶
func (d *SqliteDialect) Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Quote ¶
func (d *SqliteDialect) Quote(name interface{}) string
func (*SqliteDialect) QuoteTableName ¶
func (d *SqliteDialect) QuoteTableName(tableName string) string
func (*SqliteDialect) Range ¶
func (d *SqliteDialect) Range(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) ReadRows ¶
func (d *SqliteDialect) ReadRows(db *gorm.DB, customSchema bool, SQL string, m interface{}, args ...interface{}) (*sql.Rows, error)
@todo analyze
func (*SqliteDialect) Regex ¶
func (d *SqliteDialect) Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Second ¶
func (d *SqliteDialect) Second(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) StartsWith ¶
func (d *SqliteDialect) StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Time ¶
func (d *SqliteDialect) Time(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) ToString ¶
func (d *SqliteDialect) ToString() string
func (*SqliteDialect) Transaction ¶
func (d *SqliteDialect) Transaction(handler func()) error
@todo analyze
func (*SqliteDialect) Week ¶
func (d *SqliteDialect) Week(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) WeekDay ¶
func (d *SqliteDialect) WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
func (*SqliteDialect) Year ¶
func (d *SqliteDialect) Year(operatorContext *GormOperatorContext, field *Field, value interface{}, forSearching bool)
type StartsWithGormOperator ¶
type StartsWithGormOperator struct {
}
func (*StartsWithGormOperator) Build ¶
func (ego *StartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*StartsWithGormOperator) GetName ¶
func (ego *StartsWithGormOperator) GetName() string
func (*StartsWithGormOperator) RegisterDbHandlers ¶
func (ego *StartsWithGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*StartsWithGormOperator) TransformValue ¶
func (ego *StartsWithGormOperator) TransformValue(value string) interface{}
type StaticFiles ¶
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func (*TemplateRenderer) AddFuncMap ¶
func (tr *TemplateRenderer) AddFuncMap(funcName string, concreteFunc interface{})
type TextWidget ¶
type TextWidget struct {
Widget
}
func (*TextWidget) GetTemplateName ¶
func (tw *TextWidget) GetTemplateName() string
func (*TextWidget) GetWidgetType ¶
func (tw *TextWidget) GetWidgetType() WidgetType
func (*TextWidget) Render ¶
func (tw *TextWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type TextareaWidget ¶
type TextareaWidget struct {
Widget
}
func (*TextareaWidget) GetTemplateName ¶
func (w *TextareaWidget) GetTemplateName() string
func (*TextareaWidget) GetWidgetType ¶
func (w *TextareaWidget) GetWidgetType() WidgetType
func (*TextareaWidget) ProceedForm ¶
func (w *TextareaWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*TextareaWidget) Render ¶
func (w *TextareaWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type TimeGormOperator ¶
type TimeGormOperator struct {
}
func (*TimeGormOperator) Build ¶
func (ego *TimeGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*TimeGormOperator) GetName ¶
func (ego *TimeGormOperator) GetName() string
func (*TimeGormOperator) RegisterDbHandlers ¶
func (ego *TimeGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*TimeGormOperator) TransformValue ¶
func (ego *TimeGormOperator) TransformValue(value string) interface{}
type TimeWidget ¶
func (*TimeWidget) GetTemplateName ¶
func (w *TimeWidget) GetTemplateName() string
func (*TimeWidget) GetWidgetType ¶
func (w *TimeWidget) GetWidgetType() WidgetType
func (*TimeWidget) ProceedForm ¶
func (w *TimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*TimeWidget) Render ¶
func (w *TimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) string
type TraverseMigrationResult ¶
type TraverseMigrationResult struct {
Node IMigrationNode
Error error
}
type URLWidget ¶
type URLWidget struct {
Widget
URLValid bool
CurrentLabel string
Href string
Value string
ChangeLabel string
AppendHTTPSAutomatically bool
}
func (*URLWidget) GetTemplateName ¶
func (*URLWidget) GetWidgetType ¶
func (w *URLWidget) GetWidgetType() WidgetType
func (*URLWidget) ProceedForm ¶
func (w *URLWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
type UadminAPIOptions ¶
type UadminAdminOptions ¶
type UadminAuthOptions ¶
type UadminConfig ¶
type UadminConfig struct {
APISpec *loads.Document
D *UadminConfigurableConfig
TemplatesFS embed.FS
LocalizationFS embed.FS
RequiresCsrfCheck func(c *gin.Context) bool
PatternsToIgnoreCsrfCheck *list.List
ErrorHandleFunc func(int, string, string)
InTests bool
FieldFormOptions map[string]IFieldFormOptions
}
Info from config file
var CurrentConfig *UadminConfig
func (*UadminConfig) GetPathToTemplate ¶
func (c *UadminConfig) GetPathToTemplate(templateName string) string
func (*UadminConfig) GetPathToUploadDirectory ¶
func (c *UadminConfig) GetPathToUploadDirectory() string
func (*UadminConfig) GetURLToUploadDirectory ¶
func (c *UadminConfig) GetURLToUploadDirectory() string
type UadminConfigOptions ¶
type UadminConfigOptions struct {
Theme string `yaml:"theme"`
SiteName string `yaml:"site_name"`
ReportingLevel int `yaml:"reporting_level"`
ReportTimeStamp bool `yaml:"report_timestamp"`
DebugDB bool `yaml:"debug_db"`
PageLength int `yaml:"page_length"`
MaxImageHeight int `yaml:"max_image_height"`
MaxImageWidth int `yaml:"max_image_width"`
MaxUploadFileSize int64 `yaml:"max_upload_file_size"`
EmailFrom string `yaml:"email_from"`
EmailUsername string `yaml:"email_username"`
EmailPassword string `yaml:"email_password"`
EmailSMTPServer string `yaml:"email_smtp_server"`
EmailSMTPServerPort int `yaml:"email_smtp_server_port"`
RootURL string `yaml:"root_url"`
RootAdminURL string `yaml:"root_admin_url"`
OTPAlgorithm string `yaml:"otp_algorithm"`
OTPDigits int `yaml:"otp_digits"`
OTPPeriod uint `yaml:"otp_period"`
OTPSkew uint `yaml:"otp_skew"`
PublicMedia bool `yaml:"public_media"`
RestrictSessionIP bool `yaml:"restrict_session_ip"`
RetainMediaVersions bool `yaml:"retain_media_versions"`
RateLimit uint `yaml:"rate_limit"`
RateLimitBurst uint `yaml:"rate_limit_burst"`
LogHTTPRequests bool `yaml:"log_http_requests"`
HTTPLogFormat string `yaml:"http_log_format"`
LogTrail bool `yaml:"log_trail"`
TrailLoggingLevel int `yaml:"trail_logging_level"`
SystemMetrics bool `yaml:"system_metrics"`
UserMetrics bool `yaml:"user_metrics"`
PasswordAttempts int `yaml:"password_attempts"`
PasswordTimeout int `yaml:"password_timeout"`
Logo string `yaml:"logo"`
FavIcon string `yaml:"fav_icon"`
AdminCookieName string `yaml:"admin_cookie_name"`
APICookieName string `yaml:"api_cookie_name"`
SessionDuration int64 `yaml:"session_duration"`
SecureCookie bool `yaml:"secure_cookie"`
HTTPOnlyCookie bool `yaml:"http_only_cookie"`
DirectAPISigninByField string `yaml:"direct_api_signin_by_field"`
DebugTests bool `yaml:"debug_tests"`
PoweredOnSite string `yaml:"powered_on_site"`
ForgotCodeExpiration int `yaml:"forgot_code_expiration"`
DateFormat string `yaml:"date_format"`
UploadPath string `yaml:"upload_path"`
DateTimeFormat string `yaml:"datetime_format"`
TimeFormat string `yaml:"time_format"`
DateFormatOrder string `yaml:"date_format_order"`
AdminPerPage int `yaml:"admin_per_page"`
}
type UadminConfigurableConfig ¶
type UadminConfigurableConfig struct {
Uadmin *UadminConfigOptions `yaml:"uadmin"`
Test string `yaml:"test"`
Db *UadminDbOptions `yaml:"db"`
Auth *UadminAuthOptions `yaml:"auth"`
Admin *UadminAdminOptions `yaml:"admin"`
API *UadminAPIOptions `yaml:"api"`
Swagger *UadminSwaggerOptions `yaml:"swagger"`
}
func (*UadminConfigurableConfig) UnmarshalYAML ¶
func (ucc *UadminConfigurableConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type UadminDatabase ¶
type UadminDatabase struct {
Db *gorm.DB
Adapter IDbAdapter
}
func NewUadminDatabase ¶
func NewUadminDatabase(alias1 ...string) *UadminDatabase
func NewUadminDatabaseWithoutConnection ¶
func NewUadminDatabaseWithoutConnection(alias1 ...string) *UadminDatabase
func (*UadminDatabase) Close ¶
func (uad *UadminDatabase) Close()
type UadminDbOptions ¶
type UadminDbOptions struct {
Default *DBSettings
}
type UadminFieldType ¶
type UadminFieldType string
const BigIntegerUadminFieldType UadminFieldType = "biginteger"
const BinaryUadminFieldType UadminFieldType = "binary"
const BooleanUadminFieldType UadminFieldType = "boolean"
const CharUadminFieldType UadminFieldType = "char"
const DateTimeUadminFieldType UadminFieldType = "datetime"
const DateUadminFieldType UadminFieldType = "date"
const DecimalUadminFieldType UadminFieldType = "decimal"
const DurationUadminFieldType UadminFieldType = "duration"
const EmailUadminFieldType UadminFieldType = "email"
const FilePathUadminFieldType UadminFieldType = "filepath"
const FileUadminFieldType UadminFieldType = "file"
const FloatUadminFieldType UadminFieldType = "float"
const ForeignKeyUadminFieldType UadminFieldType = "foreignkey"
const GenericIPAddressUadminFieldType UadminFieldType = "genericipaddress"
const IPAddressUadminFieldType UadminFieldType = "ipaddress"
const ImageFieldUadminFieldType UadminFieldType = "imagefield"
const IntegerUadminFieldType UadminFieldType = "integer"
const ManyToManyUadminFieldType UadminFieldType = "manytomany"
const NullBooleanUadminFieldType UadminFieldType = "nullboolean"
const PositiveBigIntegerUadminFieldType UadminFieldType = "positivebiginteger"
const PositiveIntegerUadminFieldType UadminFieldType = "positiveinteger"
const PositiveSmallIntegerUadminFieldType UadminFieldType = "positivesmallinteger"
const SlugUadminFieldType UadminFieldType = "slug"
const SmallIntegerUadminFieldType UadminFieldType = "smallinteger"
const TextUadminFieldType UadminFieldType = "text"
const TimeUadminFieldType UadminFieldType = "time"
const URLUadminFieldType UadminFieldType = "url"
const UUIDUadminFieldType UadminFieldType = "uuid"
const UintUadminFieldType UadminFieldType = "uint"
func GetUadminFieldTypeFromGormField ¶
func GetUadminFieldTypeFromGormField(gormField *schema.Field) UadminFieldType
type UadminFormConfigurableOptionRegistry ¶
type UadminFormConfigurableOptionRegistry struct {
Options map[string]IFieldFormOptions
}
var UadminFormCongirurableOptionInstance *UadminFormConfigurableOptionRegistry
func (*UadminFormConfigurableOptionRegistry) AddFieldFormOptions ¶
func (c *UadminFormConfigurableOptionRegistry) AddFieldFormOptions(formOptions IFieldFormOptions)
func (*UadminFormConfigurableOptionRegistry) GetFieldFormOptions ¶
func (c *UadminFormConfigurableOptionRegistry) GetFieldFormOptions(formOptionsName string) IFieldFormOptions
type UadminSwaggerOptions ¶
type User ¶
type User struct {
Model
Username string `` /* 147-byte string literal not displayed */
FirstName string `protobuf:"bytes,2,opt,name=FirstName,proto3" json:"FirstName,omitempty" gorm:"default:''" uadmin:"list,search"`
LastName string `protobuf:"bytes,3,opt,name=LastName,proto3" json:"LastName,omitempty" gorm:"default:''" uadmin:"list,search"`
Password string `protobuf:"bytes,4,opt,name=Password,proto3" json:"Password,omitempty" uadminform:"PasswordOptions" gorm:"default:''"`
IsPasswordUsable bool `gorm:"default:false"`
Email string `protobuf:"bytes,5,opt,name=Email,proto3" gorm:"uniqueIndex;not null" json:"Email,omitempty" uadmin:"list,search"`
Active bool `protobuf:"varint,6,opt,name=Active,proto3" json:"Active,omitempty" gorm:"default:false" uadmin:"list"`
IsStaff bool `json:"IsStaff,omitempty" gorm:"default:false"`
IsSuperUser bool `json:"IsSuperUser,omitempty" gorm:"default:false" uadmin:"list"`
UserGroups []UserGroup `` /* 157-byte string literal not displayed */
Permissions []Permission `` /* 157-byte string literal not displayed */
Photo string `protobuf:"bytes,11,opt,name=Photo,proto3" json:"Photo,omitempty" uadminform:"UserPhotoFormOptions" gorm:"default:''"`
LastLogin *time.Time `protobuf:"bytes,12,opt,name=LastLogin,proto3" json:"LastLogin,omitempty" uadminform:"ReadonlyField" uadmin:"list"`
ExpiresOn *time.Time `protobuf:"bytes,13,opt,name=ExpiresOn,proto3" json:"ExpiresOn,omitempty" uadminform:"ReadonlyField"`
GeneratedOTPToVerify string `protobuf:"bytes,14,opt,name=GeneratedOTPToVerify,proto3" json:"GeneratedOTPToVerify,omitempty"`
OTPSeed string `protobuf:"bytes,15,opt,name=OTPSeed,proto3" json:"OTPSeed,omitempty"`
OTPRequired bool `` /* 129-byte string literal not displayed */
Salt string `protobuf:"bytes,16,opt,name=Salt,proto3" json:"Salt,omitempty"`
}
func (*User) BuildPermissionRegistry ¶
func (u *User) BuildPermissionRegistry() *UserPermRegistry
func (*User) GetAccess ¶
func (u *User) GetAccess(modelName string) Permission
GetAccess returns the user's permission to a dashboard menu based on their admin status, group and user permissions
func (*User) HasAccess ¶
func (u *User) HasAccess(modelName string) Permission
HasAccess returns the user level permission to a model. The modelName the the URL of the model
type UserAuthToken ¶
type UserGroup ¶
type UserGroup struct {
Model
GroupName string `uadmin:"list" gorm:"uniqueIndex;not null"`
Permissions []Permission `gorm:"foreignKey:ID;many2many:usergroup_permissions;" uadminform:"ChooseFromSelectOptions"`
}
UserGroup !
func (*UserGroup) HasAccess ¶
func (u *UserGroup) HasAccess(modelName string) Permission
HasAccess !
type UserPerm ¶
type UserPerm struct {
PermBitInteger PermBitInteger
IsSuperUser bool
}
func NewUserPerm ¶
func NewUserPerm(permBitInteger PermBitInteger) *UserPerm
func (*UserPerm) AddPermission ¶
func (ap *UserPerm) AddPermission(permBitInteger PermBitInteger)
func (*UserPerm) DoesUserHaveRightFor ¶
func (ap *UserPerm) DoesUserHaveRightFor(permissionName CustomPermission) bool
func (*UserPerm) HasAddPermission ¶
func (*UserPerm) HasDeletePermission ¶
func (*UserPerm) HasEditPermission ¶
func (*UserPerm) HasPublishPermission ¶
func (*UserPerm) HasReadPermission ¶
func (*UserPerm) HasRevertPermission ¶
type UserPermRegistry ¶
func NewUserPermRegistry ¶
func NewUserPermRegistry() *UserPermRegistry
func (*UserPermRegistry) AddPermissionForBlueprint ¶
func (upr *UserPermRegistry) AddPermissionForBlueprint(blueprintName string, modelName string, userPerm *UserPerm)
func (*UserPermRegistry) GetPermissionForBlueprint ¶
func (upr *UserPermRegistry) GetPermissionForBlueprint(blueprintName string, modelName string) *UserPerm
func (*UserPermRegistry) IsThereAnyPermissionForBlueprint ¶
func (upr *UserPermRegistry) IsThereAnyPermissionForBlueprint(blueprintName string) bool
type ValidationError ¶
type ValidationError []error
type ValidatorRegistry ¶
type ValidatorRegistry struct {
Validators map[string]IValidator
}
var UadminValidatorRegistry *ValidatorRegistry
func NewValidatorRegistry ¶
func NewValidatorRegistry() *ValidatorRegistry
func (*ValidatorRegistry) AddValidator ¶
func (vr *ValidatorRegistry) AddValidator(validatorName string, implementation IValidator)
func (*ValidatorRegistry) GetAllValidators ¶
func (vr *ValidatorRegistry) GetAllValidators() <-chan IValidator
func (*ValidatorRegistry) GetValidator ¶
func (vr *ValidatorRegistry) GetValidator(validatorName string) (IValidator, error)
type WeekDayGormOperator ¶
type WeekDayGormOperator struct {
}
func (*WeekDayGormOperator) Build ¶
func (ego *WeekDayGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*WeekDayGormOperator) GetName ¶
func (ego *WeekDayGormOperator) GetName() string
func (*WeekDayGormOperator) RegisterDbHandlers ¶
func (ego *WeekDayGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*WeekDayGormOperator) TransformValue ¶
func (ego *WeekDayGormOperator) TransformValue(value string) interface{}
type WeekGormOperator ¶
type WeekGormOperator struct {
}
func (*WeekGormOperator) Build ¶
func (ego *WeekGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*WeekGormOperator) GetName ¶
func (ego *WeekGormOperator) GetName() string
func (*WeekGormOperator) RegisterDbHandlers ¶
func (ego *WeekGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*WeekGormOperator) TransformValue ¶
func (ego *WeekGormOperator) TransformValue(value string) interface{}
type Widget ¶
type Widget struct {
Attrs map[string]string
TemplateName string
Renderer ITemplateRenderer
Value interface{}
Name string
FieldDisplayName string
BaseFuncMap template.FuncMap
ReadOnly bool
ShowOnlyHTMLInput bool
Required bool
OutputValue interface{}
ValidationErrors ValidationError
IsForAdmin bool
HelpText string
ValueChanged bool
Populate func(renderContext *FormRenderContext, currentField *Field) interface{}
Prefix string
ValueConfigured bool
}
func (*Widget) GetDataForRendering ¶
func (w *Widget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*Widget) GetFieldDisplayName ¶
func (*Widget) GetHTMLInputName ¶
func (*Widget) GetOutputValue ¶
func (w *Widget) GetOutputValue() interface{}
func (*Widget) GetPopulate ¶
func (w *Widget) GetPopulate() func(renderContext *FormRenderContext, currentField *Field) interface{}
func (*Widget) GetRenderer ¶
func (w *Widget) GetRenderer() ITemplateRenderer
func (*Widget) GetTemplateName ¶
func (*Widget) GetWidgetType ¶
func (w *Widget) GetWidgetType() WidgetType
func (*Widget) IDForLabel ¶
func (*Widget) InitializeAttrs ¶
func (w *Widget) InitializeAttrs()
func (*Widget) IsReadOnly ¶
func (*Widget) IsValueChanged ¶
func (*Widget) IsValueConfigured ¶
func (*Widget) ProceedForm ¶
func (w *Widget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, renderContext *FormRenderContext) error
func (*Widget) Render ¶
func (w *Widget) Render(formRenderContext *FormRenderContext, currentField *Field) string
func (*Widget) RenderForAdmin ¶
func (w *Widget) RenderForAdmin()
func (*Widget) RenderUsingRenderer ¶
func (w *Widget) RenderUsingRenderer(r ITemplateRenderer)
func (*Widget) SetBaseFuncMap ¶
func (*Widget) SetErrors ¶
func (w *Widget) SetErrors(validationErrors ValidationError)
func (*Widget) SetFieldDisplayName ¶
func (*Widget) SetHelpText ¶
func (*Widget) SetOutputValue ¶
func (w *Widget) SetOutputValue(v interface{})
func (*Widget) SetPopulate ¶
func (w *Widget) SetPopulate(pFunc func(renderContext *FormRenderContext, currentField *Field) interface{})
func (*Widget) SetReadonly ¶
func (*Widget) SetRequired ¶
func (w *Widget) SetRequired()
func (*Widget) SetShowOnlyHTMLInput ¶
func (w *Widget) SetShowOnlyHTMLInput()
func (*Widget) SetTemplateName ¶
func (*Widget) SetValueConfigured ¶
func (w *Widget) SetValueConfigured()
type WidgetData ¶
type WidgetData map[string]interface{}
type WidgetType ¶
type WidgetType string
const CheckboxInputWidgetType WidgetType = "checkbox"
const CheckboxSelectMultipleWidgetType WidgetType = "checkboxselectmultiple"
const ChooseFromSelectWidgetType WidgetType = "choose_from_select"
const ClearableFileInputWidgetType WidgetType = "clearablefileinput"
const DateInputWidgetType WidgetType = "date"
const DateTimeInputWidgetType WidgetType = "datetime"
const DynamicInputWidgetType WidgetType = "dynamic"
const EmailInputWidgetType WidgetType = "email"
const FileInputWidgetType WidgetType = "file"
const FkLinkWidgetType WidgetType = "fklink"
const ForeignKeyWidgetType WidgetType = "foreignkey"
const HiddenInputWidgetType WidgetType = "hidden"
const MultipleHiddenInputWidgetType WidgetType = "multiplehiddeninput"
const NullBooleanWidgetType WidgetType = "nullboolean"
const NumberInputWidgetType WidgetType = "number"
const PasswordInputWidgetType WidgetType = "password"
const RadioSelectWidgetType WidgetType = "radioselect"
const RadioWidgetType WidgetType = "radio"
const SelectDateWidgetType WidgetType = "selectdate"
const SelectMultipleWidgetType WidgetType = "selectmultiple"
const SelectWidgetType WidgetType = "select"
const SplitDateTimeWidgetType WidgetType = "splitdatetime"
const SplitHiddenDateTimeWidgetType WidgetType = "splithiddendatetime"
const TextInputWidgetType WidgetType = "text"
const TextareaInputWidgetType WidgetType = "textarea"
const TimeInputWidgetType WidgetType = "time"
const URLInputWidgetType WidgetType = "url"
const UnknownInputWidgetType WidgetType = "unknown"
type YearGormOperator ¶
type YearGormOperator struct {
}
func (*YearGormOperator) Build ¶
func (ego *YearGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, forSearching bool) *GormOperatorContext
func (*YearGormOperator) GetName ¶
func (ego *YearGormOperator) GetName() string
func (*YearGormOperator) RegisterDbHandlers ¶
func (ego *YearGormOperator) RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error
func (*YearGormOperator) TransformValue ¶
func (ego *YearGormOperator) TransformValue(value string) interface{}
Source Files
¶
- admin_dashboard_panel.go
- admin_interfaces.go
- admin_pages_http_handlers.go
- blueprint_interfaces.go
- command_interfaces.go
- config_interfaces.go
- core_models.go
- db_interfaces.go
- form_field_options.go
- form_interfaces.go
- gorm_interfaces.go
- interface_helpers.go
- migration_interfaces.go
- model_interfaces.go
- object_query_builder.go
- perm_interfaces.go
- reflect_helpers.go
- regex.go
- session_core_models.go
- sqlite_adapter.go
- storage_interfaces.go
- syslog.go
- template.go
- template_funcs.go
- templatecontext.go
- trail.go
- translation.go
- user_core_models.go
- validator_interfaces.go