Documentation
¶
Index ¶
- Constants
- Variables
- func APIBadResponse(error string) gin.H
- func APIBadResponseWithCode(code string, error string, params ...string) gin.H
- func APINoMethodFound() gin.H
- func APISuccessResp() gin.H
- func ClearProjectModels()
- func CloneNetURL(url1 *url.URL) *url.URL
- func Contains(s []string, e string) bool
- func ContainsInt64(s []int64, e int64) bool
- func GenerateAttrs(attrs map[string]string) template.HTML
- func GenerateCSRFToken() string
- func GenerateNumberSequence(start int, stop int) <-chan int
- func GenerateRandomString(n int, alphabets ...*[]byte) string
- func GenerateRandomStringForCSRFToken() string
- func GetBluePrintNameFromMigrationName(migrationName string) string
- func GetDB(alias1 ...string) *gorm.DB
- func GetDisplayName(src string) string
- func GetID(m reflect.Value) interface{}
- func HumanizeCamelCase(src string) string
- func InitializeGlobalAdapterRegistry()
- func IsTruthyValue(value interface{}) bool
- func LoadPermissions()
- func LoadSessions()
- func MaskCSRFToken(token string) string
- func NewSwaggerSpec(file string) *loads.Document
- func PrepareStringToBeUsedForHTMLID(text string) string
- func Remove(items []string, item string) []string
- func RenderHTML(ctx *gin.Context, path string, data interface{}, baseFuncMap template.FuncMap, ...) error
- func RenderHTMLAsString(writer *bytes.Buffer, path string, data interface{}, ...) error
- func RenderWidget(formRenderContext *FormRenderContext, renderer ITemplateRenderer, ...) template.HTML
- func SetUpStructField(structF reflect.Value, v interface{}) error
- func SplitCamelCase(src string) (entries []string)
- func Syslogf(level int, msg string, a ...interface{})
- func Tf(lang string, iTerm interface{}, args ...interface{}) string
- func ToCamel(s string) 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)
- func UnmaskCSRFToken(token string) string
- type AWSConfig
- type AWSS3Config
- type AWSS3Storage
- func (s *AWSS3Storage) Delete(s3Key string) (bool, error)
- func (s *AWSS3Storage) Exists(s3Key string) (bool, error)
- func (s *AWSS3Storage) GetUploadURL() string
- func (s *AWSS3Storage) Read(s3Key string) ([]byte, error)
- func (s *AWSS3Storage) Save(f *FileForStorage) (string, error)
- func (s *AWSS3Storage) Stats(s3Key string) (os.FileInfo, error)
- type AdminActionPlacement
- type AdminBreadCrumbsRegistry
- type AdminBreadcrumb
- type AdminContext
- func (c *AdminContext) GetAdminRequestParams() *AdminRequestParams
- 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() IUser
- func (c *AdminContext) SetAdminRequestParams(rp *AdminRequestParams)
- 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 IUser)
- func (c *AdminContext) SetUserPermissionRegistry(permRegistry *UserPermRegistry)
- type AdminModelAction
- type AdminModelActionRegistry
- func (amar *AdminModelActionRegistry) AddModelAction(ma *AdminModelAction)
- func (amar *AdminModelActionRegistry) GetAllModelActions() <-chan *AdminModelAction
- func (amar *AdminModelActionRegistry) GetAllModelActionsForUser(user IUser, adminPage *AdminPage) <-chan *AdminModelAction
- func (amar *AdminModelActionRegistry) GetModelActionByName(actionName string) (*AdminModelAction, error)
- func (amar *AdminModelActionRegistry) IsThereAnyActions() bool
- func (amar *AdminModelActionRegistry) IsThereAnyActionsToShowOnEditPage(user IUser, ap *AdminPage) bool
- type AdminPage
- func (ap *AdminPage) DoesUserHavePermission(u IUser, permissionNameL ...CustomPermission) bool
- func (ap *AdminPage) FetchFilterOptions(ctx *gin.Context) []*DisplayFilterOption
- func (ap *AdminPage) GenerateLinkForModelAutocompletion() string
- func (ap *AdminPage) GenerateLinkToAddNewModel(inPopup bool) string
- func (ap *AdminPage) GenerateLinkToEditModel(gormModelV reflect.Value) string
- func (ap *AdminPage) HandleModelAction(modelActionName string, ctx *gin.Context)
- type AdminPageInline
- func (api *AdminPageInline) GetAll(adminContext IAdminContext, model interface{}) <-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, f *multipart.Form, model interface{}, ...) (InlineFormListEditableCollection, error)
- func (api *AdminPageInline) RenderExampleForm(adminContext IAdminContext) template.HTML
- 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 AuthProviderRegistry
- type AutocompleteItemResponse
- type Blueprint
- type BlueprintRegistry
- func (r BlueprintRegistry) DeRegister(blueprint IBlueprint)
- func (r BlueprintRegistry) GetByName(name string) (IBlueprint, error)
- func (r BlueprintRegistry) GetMigrationTree() IMigrationTree
- func (r BlueprintRegistry) Initialize(app IApp)
- func (r BlueprintRegistry) InitializeRouting(app IApp, 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) template.HTML
- 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) template.HTML
- 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) template.HTML
- 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) template.HTML
- func (w *ClearableFileWidget) SetID(ID string)
- type ColumnSchema
- type CommandRegistry
- 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) template.HTML
- 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
- func (w *DateTimeWidget) GetTemplateName() string
- func (w *DateTimeWidget) GetWidgetType() WidgetType
- func (w *DateTimeWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *DateTimeWidget) Render(formRenderContext *FormRenderContext, currentField *Field) template.HTML
- 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 DbAdapterRegistry
- type DeleteRowStructure
- type DisplayFilterOption
- type DynamicWidget
- func (tw *DynamicWidget) GetTemplateName() string
- func (tw *DynamicWidget) GetWidgetType() WidgetType
- func (tw *DynamicWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (tw *DynamicWidget) Render(formRenderContext *FormRenderContext, currentField *Field) template.HTML
- 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
- func NewFieldForListDisplayFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field
- func NewFieldFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field
- func NewUadminFieldForListDisplayFromGormField(gormModelV reflect.Value, field *schema.Field, r ITemplateRenderer, ...) *Field
- func NewUadminFieldFromGormField(gormModelV reflect.Value, field *schema.Field, r ITemplateRenderer, ...) *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) GetIsAutocomplete() bool
- func (ffo *FieldFormOptions) GetIsRequired() bool
- func (ffo *FieldFormOptions) GetListFieldWidget() string
- func (ffo *FieldFormOptions) GetName() string
- func (ffo *FieldFormOptions) GetReadOnly() bool
- func (ffo *FieldFormOptions) GetValidators() *ValidatorRegistry
- func (ffo *FieldFormOptions) GetWidgetPopulate() ...
- 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) CloneAllOtherImportantSettings(widget IWidget)
- func (w *ForeignKeyWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
- func (w *ForeignKeyWidget) GetDbHandler(formRenderContext *FormRenderContext) IPersistenceStorage
- 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) template.HTML
- 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 string) *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 GormAdminFilterObjects
- func (afo *GormAdminFilterObjects) AddNeededJoinsIfNecessary(afo1 IAdminFilterObjects)
- func (afo *GormAdminFilterObjects) CreateNew(model interface{}) error
- func (afo *GormAdminFilterObjects) FilterByMultipleIds(field *Field, realObjectIds []string)
- func (afo *GormAdminFilterObjects) FilterQs(filterString string)
- func (afo *GormAdminFilterObjects) GetCurrentModel() interface{}
- func (afo *GormAdminFilterObjects) GetDB() IPersistenceStorage
- func (afo *GormAdminFilterObjects) GetFullQuerySet() IPersistenceStorage
- func (afo *GormAdminFilterObjects) GetInitialQuerySet() IPersistenceStorage
- func (afo *GormAdminFilterObjects) GetLastError() error
- func (afo *GormAdminFilterObjects) GetPaginated() <-chan *IterateAdminObjects
- func (afo *GormAdminFilterObjects) GetPaginatedQuerySet() IPersistenceStorage
- func (afo *GormAdminFilterObjects) GetUadminDatabase() *UadminDatabase
- func (afo *GormAdminFilterObjects) IterateThroughWholeQuerySet() <-chan *IterateAdminObjects
- func (afo *GormAdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{})
- func (afo *GormAdminFilterObjects) RemoveModelPermanently(model interface{}) error
- func (afo *GormAdminFilterObjects) SaveModel(model interface{}) error
- func (afo *GormAdminFilterObjects) Search(field *Field, searchString string)
- func (afo *GormAdminFilterObjects) SetFullQuerySet(storage IPersistenceStorage)
- func (afo *GormAdminFilterObjects) SetInitialQuerySet(storage IPersistenceStorage)
- func (afo *GormAdminFilterObjects) SetLastError(err error)
- func (afo *GormAdminFilterObjects) SetPaginatedQuerySet(storage IPersistenceStorage)
- func (afo *GormAdminFilterObjects) SortBy(field *Field, direction int)
- func (afo *GormAdminFilterObjects) StoreNeededJoin(join string)
- func (afo *GormAdminFilterObjects) WithTransaction(handler func(afo1 IAdminFilterObjects) error) 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) GetLastError() error
- 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) LoadDataForModelByID(modelI interface{}, ID string) 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 HTTPErrorResponse
- 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 IApp
- type IAuthProvider
- 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 IMigration
- type IMigrationNode
- type IMigrationRegistry
- type IMigrationTree
- 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 ISQLConditionBuilder
- type ISearchFieldInterface
- type ISessionProvider
- type ISortBy
- 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 IUser
- 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 string, model interface{}, formError error) *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) RemoveFieldByName(fieldName string)
- 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 Microservice
- 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) 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) template.HTML
- type NotTranslatedDataImplementation
- 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) template.HTML
- 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) template.HTML
- func (w *NumberWidget) TransformValueForOutput(v string) interface{}
- type OneTimeAction
- type OneTimeActionType
- type PaginationType
- type Paginator
- type PasswordWidget
- func (w *PasswordWidget) GetTemplateName() string
- func (w *PasswordWidget) GetWidgetType() WidgetType
- func (w *PasswordWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *PasswordWidget) Render(formRenderContext *FormRenderContext, currentField *Field) template.HTML
- 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{}, 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) template.HTML
- 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 SQLConditionBuilder
- 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) template.HTML
- 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) template.HTML
- type SelectOptGroup
- type SelectOptGroupStringified
- type SelectWidget
- func (w *SelectWidget) CloneAllOtherImportantSettings(widget IWidget)
- 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) template.HTML
- 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) 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) template.HTML
- 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) template.HTML
- type SqliteAdapter
- func (d *SqliteAdapter) BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure
- func (d *SqliteAdapter) ClearTestDatabase()
- func (d *SqliteAdapter) Close(db *gorm.DB)
- func (d *SqliteAdapter) Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Date(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Day(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Equals(name interface{}, args ...interface{})
- func (d *SqliteAdapter) Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) GetDb(alias string, dryRun bool) (*gorm.DB, error)
- func (d *SqliteAdapter) GetLastError() error
- func (d *SqliteAdapter) GetStringToExtractMonthFromField(filterOptionField string) string
- func (d *SqliteAdapter) GetStringToExtractYearFromField(filterOptionField string) string
- func (d *SqliteAdapter) Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) In(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) InitializeDatabaseForTests(databaseSettings *DBSettings)
- func (d *SqliteAdapter) IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Month(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Range(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Second(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) SetIsolationLevelForTests(db *gorm.DB)
- func (d *SqliteAdapter) SetTimeZone(db *gorm.DB, timezone string)
- func (d *SqliteAdapter) StartDBShell(databaseSettings *DBSettings) error
- func (d *SqliteAdapter) StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Time(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) Week(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, ...)
- func (d *SqliteAdapter) 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, path string, data interface{}, baseFuncMap template.FuncMap, ...)
- func (tr *TemplateRenderer) RenderAsString(path string, data interface{}, baseFuncMap template.FuncMap, ...) template.HTML
- type TextWidget
- type TextareaWidget
- func (w *TextareaWidget) GetTemplateName() string
- func (w *TextareaWidget) GetWidgetType() WidgetType
- func (w *TextareaWidget) ProceedForm(form *multipart.Form, afo IAdminFilterObjects, ...) error
- func (w *TextareaWidget) Render(formRenderContext *FormRenderContext, currentField *Field) template.HTML
- 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 UadminString
- type UadminSwaggerOptions
- type User
- func (u *User) BuildPermissionRegistry() *UserPermRegistry
- func (u *User) GetAccess(modelName string) Permission
- func (u *User) GetActive() bool
- func (u *User) GetCreatedAt() time.Time
- func (u *User) GetDeletedAt() gorm.DeletedAt
- func (u *User) GetEmail() string
- func (u *User) GetExpiresOn() *time.Time
- func (u *User) GetFirstName() string
- func (u *User) GetFullName() string
- func (u *User) GetGeneratedOTPToVerify() string
- func (u *User) GetID() uint
- func (u *User) GetIsPasswordUsable() bool
- func (u *User) GetIsStaff() bool
- func (u *User) GetIsSuperUser() bool
- func (u *User) GetLastLogin() *time.Time
- func (u *User) GetLastName() string
- func (u *User) GetOTP() string
- func (u *User) GetOTPRequired() bool
- func (u *User) GetOTPSeed() string
- func (u *User) GetPassword() string
- func (u *User) GetPermissionRegistry() *UserPermRegistry
- func (u *User) GetPermissions() *[]Permission
- func (u *User) GetPhoto() string
- func (u *User) GetSalt() string
- func (u *User) GetUpdatedAt() time.Time
- func (u *User) GetUserGroups() *[]UserGroup
- func (u *User) GetUsername() string
- func (u *User) HasAccess(modelName string) Permission
- func (u *User) Reset()
- func (u *User) Save()
- func (u *User) SetActive(isActive bool)
- func (u *User) SetCreatedAt(t *time.Time)
- func (u *User) SetDeletedAt(t gorm.DeletedAt)
- func (u *User) SetEmail(email string)
- func (u *User) SetExpiresOn(t *time.Time)
- func (u *User) SetFirstName(firstName string)
- func (u *User) SetGeneratedOTPToVerify(generatedOtpToVerify string)
- func (u *User) SetIsPasswordUsable(isPasswordUsable bool)
- func (u *User) SetIsStaff(isStaff bool)
- func (u *User) SetIsSuperUser(isSuperUser bool)
- func (u *User) SetLastLogin(t *time.Time)
- func (u *User) SetLastName(lastName string)
- func (u *User) SetOTPRequired(isOtpRequired bool)
- func (u *User) SetOTPSeed(seed string)
- func (u *User) SetPassword(password string)
- func (u *User) SetPermissionRegistry(upr *UserPermRegistry)
- func (u *User) SetPermissions(permissions *[]Permission)
- func (u *User) SetPhoto(photo string)
- func (u *User) SetSalt(salt string)
- func (u *User) SetUpdatedAt(t *time.Time)
- func (u *User) SetUserGroups(userGroups *[]UserGroup)
- func (u *User) SetUsername(username string)
- 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) CloneAllOtherImportantSettings(widget IWidget)
- 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 (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) template.HTML
- 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(...)
- 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, "safe": safe, "attr": attr, "GenerateAttrs": GenerateAttrs, "GetDisplayName": GetDisplayName, "SplitCamelCase": HumanizeCamelCase, }
var GenerateBunchOfUserModels = func() interface{} { return &[]*User{} }
var GenerateUserModel = func() IUser { return &User{} }
var OnlyLetersNumbersStringAlphabet = []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
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
var WhitespaceRegex = regexp.MustCompile("\\s+")
Functions ¶
func APIBadResponse ¶ added in v1.2.0
func APIBadResponseWithCode ¶ added in v1.2.0
func APINoMethodFound ¶ added in v1.2.0
func APISuccessResp ¶ added in v1.2.0
func ClearProjectModels ¶
func ClearProjectModels()
func ContainsInt64 ¶ added in v1.0.5
func GenerateCSRFToken ¶ added in v1.1.7
func GenerateCSRFToken() string
func GenerateNumberSequence ¶
func GenerateRandomString ¶ added in v1.1.7
func GenerateRandomStringForCSRFToken ¶ added in v1.1.7
func GenerateRandomStringForCSRFToken() string
func GetDisplayName ¶ added in v1.1.2
func HumanizeCamelCase ¶ added in v1.1.7
func InitializeGlobalAdapterRegistry ¶ added in v1.1.2
func InitializeGlobalAdapterRegistry()
func IsTruthyValue ¶
func IsTruthyValue(value interface{}) bool
func LoadPermissions ¶
func LoadPermissions()
func LoadSessions ¶
func LoadSessions()
func MaskCSRFToken ¶ added in v1.1.7
func RenderHTML ¶
func RenderHTML(ctx *gin.Context, 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, 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 RenderWidget(formRenderContext *FormRenderContext, renderer ITemplateRenderer, templateName string, data map[string]interface{}, baseFuncMap template.FuncMap) template.HTML
func SetUpStructField ¶
func SplitCamelCase ¶ added in v1.1.7
SplitCamelCase the camelcase word and returns a list of words. It also supports digits. Both lower camel case and upper camel case are supported. For more info please check: http://en.wikipedia.org/wiki/CamelCase
Examples
"" => [""] "lowercase" => ["lowercase"] "Class" => ["Class"] "MyClass" => ["My", "Class"] "MyC" => ["My", "C"] "HTML" => ["HTML"] "PDFLoader" => ["PDF", "Loader"] "AString" => ["A", "String"] "SimpleXMLParser" => ["Simple", "XML", "Parser"] "vimRPCPlugin" => ["vim", "RPC", "Plugin"] "GL11Version" => ["GL", "11", "Version"] "99Bottles" => ["99", "Bottles"] "May5" => ["May", "5"] "BFG9000" => ["BFG", "9000"] "BöseÜberraschung" => ["Böse", "Überraschung"] "Two spaces" => ["Two", " ", "spaces"] "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"]
Splitting rules
- If string is not valid UTF-8, return it without splitting as single item array.
- Assign all unicode characters into one of 4 sets: lower case letters, upper case letters, numbers, and all other characters.
- Iterate through characters of string, introducing splits between adjacent characters that belong to different sets.
- Iterate through array of split strings, and if a given string is upper case: if subsequent string is lower case: move last character of upper case string to beginning of lower case string
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)
func UnmaskCSRFToken ¶ added in v1.1.7
Types ¶
type AWSConfig ¶ added in v1.1.7
type AWSConfig struct {
S3 *AWSS3Config `yaml:"s3"`
}
func NewAWSConfig ¶ added in v1.1.7
func NewAWSConfig() *AWSConfig
type AWSS3Config ¶ added in v1.1.7
type AWSS3Storage ¶ added in v1.1.7
type AWSS3Storage struct { URLPath string Config *AWSConfig Timeout time.Duration Bucket string NameLength int Domain string }
func (*AWSS3Storage) Delete ¶ added in v1.1.7
func (s *AWSS3Storage) Delete(s3Key string) (bool, error)
func (*AWSS3Storage) Exists ¶ added in v1.1.7
func (s *AWSS3Storage) Exists(s3Key string) (bool, error)
func (*AWSS3Storage) GetUploadURL ¶ added in v1.1.7
func (s *AWSS3Storage) GetUploadURL() string
func (*AWSS3Storage) Read ¶ added in v1.1.7
func (s *AWSS3Storage) Read(s3Key string) ([]byte, error)
func (*AWSS3Storage) Save ¶ added in v1.1.7
func (s *AWSS3Storage) Save(f *FileForStorage) (string, error)
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 IUser Demo bool UserPermissionRegistry *UserPermRegistry CurrentURL string CurrentQuery string FullURL *url.URL Form IForm BreadCrumbs *AdminBreadCrumbsRegistry ID uint FormD *multipart.Form Ctx *gin.Context AdminRequestParams *AdminRequestParams }
func (*AdminContext) GetAdminRequestParams ¶ added in v1.2.0
func (c *AdminContext) GetAdminRequestParams() *AdminRequestParams
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() IUser
func (*AdminContext) SetAdminRequestParams ¶ added in v1.2.0
func (c *AdminContext) SetAdminRequestParams(rp *AdminRequestParams)
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 IUser)
func (*AdminContext) SetUserPermissionRegistry ¶
func (c *AdminContext) SetUserPermissionRegistry(permRegistry *UserPermRegistry)
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 NewEmptyModelActionRegistry ¶ added in v1.1.2
func NewEmptyModelActionRegistry() *AdminModelActionRegistry
func (*AdminModelActionRegistry) AddModelAction ¶
func (amar *AdminModelActionRegistry) AddModelAction(ma *AdminModelAction)
func (*AdminModelActionRegistry) GetAllModelActions ¶
func (amar *AdminModelActionRegistry) GetAllModelActions() <-chan *AdminModelAction
func (*AdminModelActionRegistry) GetAllModelActionsForUser ¶ added in v1.1.2
func (amar *AdminModelActionRegistry) GetAllModelActionsForUser(user IUser, adminPage *AdminPage) <-chan *AdminModelAction
func (*AdminModelActionRegistry) GetModelActionByName ¶
func (amar *AdminModelActionRegistry) GetModelActionByName(actionName string) (*AdminModelAction, error)
func (*AdminModelActionRegistry) IsThereAnyActions ¶
func (amar *AdminModelActionRegistry) IsThereAnyActions() bool
func (*AdminModelActionRegistry) IsThereAnyActionsToShowOnEditPage ¶ added in v1.1.4
func (amar *AdminModelActionRegistry) IsThereAnyActionsToShowOnEditPage(user IUser, ap *AdminPage) bool
type AdminPage ¶
type AdminPage struct { Model interface{} `json:"-"` GenerateForm func(modelI interface{}, ctx IAdminContext) *Form `json:"-"` GetQueryset func(IAdminContext, *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 PermissionName CustomPermission EnhanceQuerySet func(afo IAdminFilterObjects) `json:"-"` CustomizeQuerySet func(adminContext IAdminContext, afo IAdminFilterObjects, requestParams *AdminRequestParams) `json:"-"` }
func NewGormAdminPage ¶
func NewGormAdminPage(parentPage *AdminPage, modelI interface{}, generateForm func(modelI interface{}, ctx IAdminContext) *Form) *AdminPage
func (*AdminPage) DoesUserHavePermission ¶ added in v1.1.2
func (ap *AdminPage) DoesUserHavePermission(u IUser, permissionNameL ...CustomPermission) bool
func (*AdminPage) FetchFilterOptions ¶
func (ap *AdminPage) FetchFilterOptions(ctx *gin.Context) []*DisplayFilterOption
func (*AdminPage) GenerateLinkForModelAutocompletion ¶ added in v1.1.7
func (*AdminPage) GenerateLinkToAddNewModel ¶
func (*AdminPage) GenerateLinkToEditModel ¶
type AdminPageInline ¶
type AdminPageInline struct { Ordering int GenerateModelI func(m interface{}) interface{} GetQueryset func(adminContext IAdminContext, afo IAdminFilterObjects, model interface{}) 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{}, getQuerySet func(adminContext IAdminContext, afo IAdminFilterObjects, model interface{}) IAdminFilterObjects, ) *AdminPageInline
func (*AdminPageInline) GetAll ¶
func (api *AdminPageInline) GetAll(adminContext IAdminContext, model interface{}) <-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, f *multipart.Form, model interface{}, adminContext IAdminContext) (InlineFormListEditableCollection, error)
func (*AdminPageInline) RenderExampleForm ¶
func (api *AdminPageInline) RenderExampleForm(adminContext IAdminContext) template.HTML
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 AuthProviderRegistry ¶ added in v1.2.4
type AuthProviderRegistry struct {
// contains filtered or unexported fields
}
func NewAuthProviderRegistry ¶ added in v1.2.4
func NewAuthProviderRegistry() *AuthProviderRegistry
func (*AuthProviderRegistry) GetAdapter ¶ added in v1.2.4
func (r *AuthProviderRegistry) GetAdapter(name string) (IAuthProvider, error)
func (*AuthProviderRegistry) Iterate ¶ added in v1.2.4
func (r *AuthProviderRegistry) Iterate() <-chan IAuthProvider
func (*AuthProviderRegistry) RegisterNewAdapter ¶ added in v1.2.4
func (r *AuthProviderRegistry) RegisterNewAdapter(adapter IAuthProvider)
type AutocompleteItemResponse ¶ added in v1.1.7
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(app IApp, group *gin.RouterGroup)
type BlueprintRegistry ¶
type BlueprintRegistry struct { RegisteredBlueprints map[string]IBlueprint MigrationTree IMigrationTree }
func (BlueprintRegistry) DeRegister ¶ added in v1.2.1
func (r BlueprintRegistry) DeRegister(blueprint IBlueprint)
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(app IApp)
func (BlueprintRegistry) InitializeRouting ¶
func (r BlueprintRegistry) InitializeRouting(app IApp, 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) template.HTML
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) template.HTML
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) template.HTML
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) template.HTML
func (*ClearableFileWidget) SetID ¶
func (w *ClearableFileWidget) SetID(ID string)
type ColumnSchema ¶
type CommandRegistry ¶ added in v1.1.7
func (CommandRegistry) AddAction ¶ added in v1.1.7
func (r CommandRegistry) AddAction(name string, command ICommand)
func (CommandRegistry) IsRegisteredCommand ¶ added in v1.1.7
func (r CommandRegistry) IsRegisteredCommand(name string) bool
func (CommandRegistry) MakeHelpText ¶ added in v1.1.7
func (r CommandRegistry) MakeHelpText() string
type ContainsGormOperator ¶
type ContainsGormOperator struct { }
func (*ContainsGormOperator) Build ¶
func (ego *ContainsGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
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 Slave *DBSettings }
var CurrentDatabaseSettings *DatabaseSettings
type DateGormOperator ¶
type DateGormOperator struct { }
func (*DateGormOperator) Build ¶
func (ego *DateGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
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) template.HTML
type DayGormOperator ¶
type DayGormOperator struct { }
func (*DayGormOperator) Build ¶
func (ego *DayGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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 DbAdapterRegistry ¶ added in v1.1.2
type DbAdapterRegistry struct {
// contains filtered or unexported fields
}
var GlobalDbAdapterRegistry *DbAdapterRegistry
func (*DbAdapterRegistry) RegisterAdapter ¶ added in v1.1.2
func (dar *DbAdapterRegistry) RegisterAdapter(dbType string, createAdapterHandler func(db *gorm.DB) IDbAdapter)
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) template.HTML
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) template.HTML
type EndsWithGormOperator ¶
type EndsWithGormOperator struct { }
func (*EndsWithGormOperator) Build ¶
func (ego *EndsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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 NewFieldForListDisplayFromGormField ¶ added in v1.1.7
func NewFieldForListDisplayFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field
func NewFieldFromGormField ¶
func NewFieldFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field
func NewUadminFieldForListDisplayFromGormField ¶ added in v1.1.7
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(widget IWidget, renderContext *FormRenderContext, currentField *Field) interface{} IsFk bool Autocomplete bool ListFieldWidget string }
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) GetIsAutocomplete ¶ added in v1.1.7
func (ffo *FieldFormOptions) GetIsAutocomplete() bool
func (*FieldFormOptions) GetIsRequired ¶
func (ffo *FieldFormOptions) GetIsRequired() bool
func (*FieldFormOptions) GetListFieldWidget ¶ added in v1.1.7
func (ffo *FieldFormOptions) GetListFieldWidget() string
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(widget IWidget, 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) template.HTML
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 ¶
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) template.HTML
type ForeignKeyWidget ¶
type ForeignKeyWidget struct { Widget OptGroups map[string][]*SelectOptGroup DontValidateForExistence bool AddNewLink string GetQuerySet func(formRenderContext *FormRenderContext) IPersistenceStorage GenerateModelInterface func() (interface{}, interface{}) Autocomplete bool }
func (*ForeignKeyWidget) BuildChoices ¶
func (w *ForeignKeyWidget) BuildChoices(formRenderContext *FormRenderContext)
func (*ForeignKeyWidget) CloneAllOtherImportantSettings ¶ added in v1.1.7
func (w *ForeignKeyWidget) CloneAllOtherImportantSettings(widget IWidget)
func (*ForeignKeyWidget) GetDataForRendering ¶
func (w *ForeignKeyWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData
func (*ForeignKeyWidget) GetDbHandler ¶ added in v1.1.7
func (w *ForeignKeyWidget) GetDbHandler(formRenderContext *FormRenderContext) IPersistenceStorage
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) template.HTML
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 ChangesSaved bool Debug bool }
func NewFormFromModel ¶
func (*Form) ProceedRequest ¶
func (f *Form) ProceedRequest(form *multipart.Form, gormModel interface{}, adminContext IAdminContext, afoP ...IAdminFilterObjects) *FormError
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 string, model interface{}, listDisplayRegistry *ListDisplayRegistry, formError error) *FormListEditable
func (*FormListEditable) ExistsField ¶
func (f *FormListEditable) ExistsField(ld *ListDisplay) bool
func (*FormListEditable) ProceedRequest ¶
func (f *FormListEditable) ProceedRequest(form *multipart.Form, gormModel interface{}, adminContext IAdminContext) *FormError
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 string) *FormListEditable
func (*FormListEditableCollection) GetForInlineNew ¶
func (flec *FormListEditableCollection) GetForInlineNew(prefix string) <-chan *FormListEditable
type FormRenderContext ¶
type FormRenderContext struct { Model interface{} Context IAdminContext }
func NewFormRenderContext ¶
func NewFormRenderContext() *FormRenderContext
type FormRow ¶
type FormRow struct {
Columns []*ColumnSchema
}
type FsStorage ¶
func (*FsStorage) GetUploadURL ¶
type GormAdminFilterObjects ¶ added in v1.1.0
type GormAdminFilterObjects struct { InitialGormQuerySet IPersistenceStorage GormQuerySet IPersistenceStorage PaginatedGormQuerySet IPersistenceStorage Model interface{} UadminDatabase *UadminDatabase LastError error NeededJoins []string }
func (*GormAdminFilterObjects) AddNeededJoinsIfNecessary ¶ added in v1.1.7
func (afo *GormAdminFilterObjects) AddNeededJoinsIfNecessary(afo1 IAdminFilterObjects)
func (*GormAdminFilterObjects) CreateNew ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) CreateNew(model interface{}) error
func (*GormAdminFilterObjects) FilterByMultipleIds ¶ added in v1.1.2
func (afo *GormAdminFilterObjects) FilterByMultipleIds(field *Field, realObjectIds []string)
func (*GormAdminFilterObjects) FilterQs ¶ added in v1.1.2
func (afo *GormAdminFilterObjects) FilterQs(filterString string)
func (*GormAdminFilterObjects) GetCurrentModel ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetCurrentModel() interface{}
func (*GormAdminFilterObjects) GetDB ¶ added in v1.1.2
func (afo *GormAdminFilterObjects) GetDB() IPersistenceStorage
func (*GormAdminFilterObjects) GetFullQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetFullQuerySet() IPersistenceStorage
func (*GormAdminFilterObjects) GetInitialQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetInitialQuerySet() IPersistenceStorage
func (*GormAdminFilterObjects) GetLastError ¶ added in v1.1.4
func (afo *GormAdminFilterObjects) GetLastError() error
func (*GormAdminFilterObjects) GetPaginated ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetPaginated() <-chan *IterateAdminObjects
func (*GormAdminFilterObjects) GetPaginatedQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetPaginatedQuerySet() IPersistenceStorage
func (*GormAdminFilterObjects) GetUadminDatabase ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) GetUadminDatabase() *UadminDatabase
func (*GormAdminFilterObjects) IterateThroughWholeQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) IterateThroughWholeQuerySet() <-chan *IterateAdminObjects
func (*GormAdminFilterObjects) LoadDataForModelByID ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{})
func (*GormAdminFilterObjects) RemoveModelPermanently ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) RemoveModelPermanently(model interface{}) error
func (*GormAdminFilterObjects) SaveModel ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) SaveModel(model interface{}) error
func (*GormAdminFilterObjects) Search ¶ added in v1.1.2
func (afo *GormAdminFilterObjects) Search(field *Field, searchString string)
func (*GormAdminFilterObjects) SetFullQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) SetFullQuerySet(storage IPersistenceStorage)
func (*GormAdminFilterObjects) SetInitialQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) SetInitialQuerySet(storage IPersistenceStorage)
func (*GormAdminFilterObjects) SetLastError ¶ added in v1.1.4
func (afo *GormAdminFilterObjects) SetLastError(err error)
func (*GormAdminFilterObjects) SetPaginatedQuerySet ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) SetPaginatedQuerySet(storage IPersistenceStorage)
func (*GormAdminFilterObjects) SortBy ¶ added in v1.1.2
func (afo *GormAdminFilterObjects) SortBy(field *Field, direction int)
func (*GormAdminFilterObjects) StoreNeededJoin ¶ added in v1.1.7
func (afo *GormAdminFilterObjects) StoreNeededJoin(join string)
func (*GormAdminFilterObjects) WithTransaction ¶ added in v1.1.0
func (afo *GormAdminFilterObjects) WithTransaction(handler func(afo1 IAdminFilterObjects) error) error
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) GetLastError ¶ added in v1.1.4
func (gps *GormPersistenceStorage) GetLastError() error
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) LoadDataForModelByID ¶ added in v1.1.7
func (gps *GormPersistenceStorage) LoadDataForModelByID(modelI interface{}, ID string) 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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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 HTTPErrorResponse ¶ added in v1.2.0
func NewHTTPErrorResponse ¶ added in v1.2.0
func NewHTTPErrorResponse(code string, message string, params ...interface{}) *HTTPErrorResponse
func (*HTTPErrorResponse) Error ¶ added in v1.2.0
func (her *HTTPErrorResponse) Error() string
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) template.HTML
type HourGormOperator ¶
type HourGormOperator struct { }
func (*HourGormOperator) Build ¶
func (ego *HourGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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 IUser) GetUserObject() IUser SetPostForm(formD *multipart.Form) GetPostForm() *multipart.Form GetCtx() *gin.Context SetCtx(ctx *gin.Context) SetAdminRequestParams(rp *AdminRequestParams) GetAdminRequestParams() *AdminRequestParams }
type IAdminFilterObjects ¶
type IAdminFilterObjects interface { WithTransaction(handler func(afo1 IAdminFilterObjects) error) 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) RemoveModelPermanently(model interface{}) error FilterQs(filterString string) Search(field *Field, searchString string) SortBy(field *Field, direction int) FilterByMultipleIds(field *Field, realObjectIds []string) GetDB() IPersistenceStorage GetLastError() error }
type IAdminModelActionInterface ¶
type IAdminModelActionInterface interface { }
type IApp ¶ added in v1.1.7
type IApp interface { GetConfig() *UadminConfig GetDatabase() *Database GetRouter() *gin.Engine GetCommandRegistry() *CommandRegistry GetBlueprintRegistry() IBlueprintRegistry GetDashboardAdminPanel() *DashboardAdminPanel GetAuthAdapterRegistry() *AuthProviderRegistry }
type IAuthProvider ¶ added in v1.2.4
type IBlueprint ¶
type IBlueprint interface { GetName() string GetDescription() string GetMigrationRegistry() IMigrationRegistry InitRouter(app IApp, group *gin.RouterGroup) InitApp(app IApp) }
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(app IApp, router *gin.Engine) Initialize(app IApp) ResetMigrationTree() DeRegister(blueprint IBlueprint) }
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}) GetDb(alias string, dryRun bool) (*gorm.DB, error) GetStringToExtractYearFromField(filterOptionField string) string GetStringToExtractMonthFromField(filterOptionField string) string Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) In(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Range(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Date(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Year(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Month(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Day(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Week(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Time(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Second(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure SetIsolationLevelForTests(db *gorm.DB) Close(db *gorm.DB) ClearTestDatabase() SetTimeZone(db *gorm.DB, timezone string) InitializeDatabaseForTests(databaseSettings *DBSettings) StartDBShell(databaseSettings *DBSettings) error GetLastError() error }
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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(widget IWidget, renderContext *FormRenderContext, currentField *Field) interface{} IsItFk() bool GetIsAutocomplete() bool GetListFieldWidget() string }
type IFieldRegistry ¶
type IGormOperator ¶
type IGormOperator interface { Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *GormOperatorContext GetName() string RegisterDbHandlers(registerDbHandler IRegisterDbHandler) error TransformValue(value string) interface{} }
type IGrouppedFieldsRegistry ¶
type IGrouppedFieldsRegistry interface { AddGroup(grouppedFields *GrouppedFields) GetGroupByName(name string) *GrouppedFields }
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) GetNodeByMigrationID(ID int64) (IMigrationNode, error) AddNode(node IMigrationNode) error TreeBuilt() IsTreeBuilt() bool }
func NewMigrationTree ¶
func NewMigrationTree() IMigrationTree
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 GetLastError() error LoadDataForModelByID(modelI interface{}, ID string) IPersistenceStorage }
type IRegexGormOperator ¶
type IRegexGormOperator struct { }
func (*IRegexGormOperator) Build ¶
func (ego *IRegexGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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 ISQLConditionBuilder ¶ added in v1.1.7
type ISQLConditionBuilder interface {
Build(db IPersistenceStorage, query interface{}, args ...interface{}) IPersistenceStorage
}
type ISearchFieldInterface ¶
type ISearchFieldInterface interface {
Search(afo IAdminFilterObjects, searchString string)
}
type ISessionProvider ¶ added in v1.2.4
type ISessionProvider interface { GetKey() string Create() ISessionProvider GetByKey(key string) (ISessionProvider, error) GetName() string IsExpired() bool Delete() bool Set(name string, value string) Get(name string) (string, error) ClearAll() bool GetUser() IUser SetUser(user IUser) Save() bool ExpiresOn(*time.Time) }
type ISortBy ¶
type ISortBy interface { Sort(afo IAdminFilterObjects, direction int) GetDirection() int SetSortCustomImplementation(func(afo IAdminFilterObjects, field *Field, direction int)) }
type IStartsWithGormOperator ¶
type IStartsWithGormOperator struct { }
func (*IStartsWithGormOperator) Build ¶
func (ego *IStartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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 NewAWSS3Storage ¶ added in v1.1.7
func NewAWSS3Storage(uploadPath string, s3Config *AWSConfig) IStorageInterface
func NewFsStorage ¶
func NewFsStorage() IStorageInterface
type ITemplateRenderer ¶
type ITemplateRenderer interface { AddFuncMap(funcName string, concreteFunc interface{}) Render(ctx *gin.Context, path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap) RenderAsString(path string, data interface{}, baseFuncMap template.FuncMap, funcs ...template.FuncMap) template.HTML }
func NewTemplateRenderer ¶
func NewTemplateRenderer(pageTitle string) ITemplateRenderer
type IUser ¶ added in v1.1.2
type IUser interface { GetID() uint GetCreatedAt() time.Time GetUpdatedAt() time.Time GetDeletedAt() gorm.DeletedAt GetUsername() string GetFirstName() string GetLastName() string GetPassword() string GetIsPasswordUsable() bool GetEmail() string GetActive() bool GetIsStaff() bool GetIsSuperUser() bool GetUserGroups() *[]UserGroup GetPermissions() *[]Permission GetPhoto() string GetLastLogin() *time.Time GetExpiresOn() *time.Time GetGeneratedOTPToVerify() string GetOTPSeed() string GetOTPRequired() bool GetSalt() string GetPermissionRegistry() *UserPermRegistry SetCreatedAt(t *time.Time) SetUpdatedAt(t *time.Time) SetDeletedAt(t gorm.DeletedAt) SetUsername(username string) SetFirstName(firstName string) SetLastName(lastName string) SetPassword(password string) SetIsPasswordUsable(isPasswordUsable bool) SetEmail(email string) SetActive(isActive bool) SetIsStaff(isStaff bool) SetIsSuperUser(isSuperUser bool) SetUserGroups(userGroups *[]UserGroup) SetPermissions(permissions *[]Permission) SetPhoto(photo string) SetLastLogin(t *time.Time) SetExpiresOn(t *time.Time) SetGeneratedOTPToVerify(generatedOtpToVerify string) SetOTPSeed(seed string) SetOTPRequired(isOtpRequired bool) SetSalt(salt string) SetPermissionRegistry(upr *UserPermRegistry) String() string GetFullName() string BuildPermissionRegistry() *UserPermRegistry }
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) template.HTML 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(widget IWidget, renderContext *FormRenderContext, currentField *Field) interface{}) SetPrefix(prefix string) GetHTMLInputName() string GetPopulate() func(widget IWidget, renderContext *FormRenderContext, currentField *Field) interface{} IsReadOnly() bool IsValueConfigured() bool SetValueConfigured() GetRenderer() ITemplateRenderer GetFieldDisplayName() string GetName() string CloneAllOtherImportantSettings(widget IWidget) }
func GetWidgetByWidgetType ¶
func GetWidgetByWidgetType(widgetType string, fieldOptions IFieldFormOptions) IWidget
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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 string 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 ISortBy 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) template.HTML
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 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 string, model interface{}, formError error) *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) RemoveFieldByName ¶ added in v1.1.7
func (ldr *ListDisplayRegistry) RemoveFieldByName(fieldName string)
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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 Microservice ¶ added in v1.2.4
type Microservice struct { Name string Prefix string AuthBackend string URLPrefix string Port int SwaggerPort int IncludeTags []string }
func (Microservice) RegisterEndpoints ¶ added in v1.2.9
func (m Microservice) RegisterEndpoints(app IApp) *gin.Engine
func (Microservice) Start ¶ added in v1.2.4
func (m Microservice) Start(r *gin.Engine)
func (Microservice) StartSwagger ¶ added in v1.2.4
func (m Microservice) StartSwagger(app IApp) error
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) 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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
type NotTranslatedDataImplementation ¶ added in v1.2.1
type NotTranslatedDataImplementation struct { D map[string][]string // contains filtered or unexported fields }
SafeCounter is safe to use concurrently.
var NotTranslatedData *NotTranslatedDataImplementation
func (*NotTranslatedDataImplementation) Store ¶ added in v1.2.1
func (ntdi *NotTranslatedDataImplementation) Store(lang string, term 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) template.HTML
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) template.HTML
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) template.HTML
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{}, interface{}))
type QuarterGormOperator ¶
type QuarterGormOperator struct { }
func (*QuarterGormOperator) Build ¶
func (ego *QuarterGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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 SQLConditionBuilder ¶ added in v1.1.2
type SQLConditionBuilder struct {
Type string
}
func NewSQLConditionBuilder ¶ added in v1.1.2
func NewSQLConditionBuilder(conditionType string) *SQLConditionBuilder
func (*SQLConditionBuilder) Build ¶ added in v1.1.2
func (scb *SQLConditionBuilder) Build(db IPersistenceStorage, query interface{}, args ...interface{}) IPersistenceStorage
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
func (*SearchFieldRegistry) GetFieldByName ¶ added in v1.1.2
func (sfr *SearchFieldRegistry) GetFieldByName(fieldName string) *SearchField
type SecondGormOperator ¶
type SecondGormOperator struct { }
func (*SecondGormOperator) Build ¶
func (ego *SecondGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
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) template.HTML
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 Multiple bool }
func (*SelectWidget) CloneAllOtherImportantSettings ¶ added in v1.1.7
func (w *SelectWidget) CloneAllOtherImportantSettings(widget IWidget)
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) template.HTML
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) GenerateKey ¶
func (s *Session) GenerateKey()
// Save !
func (s *Session) Save() { u := s.User s.User = User{} // database.Save(s) s.User = u }
GenerateKey !
func (Session) HideInDashboard ¶
HideInDashboard to return false and auto hide this from dashboard
type SortBy ¶
type SortBy struct { Direction int // -1 descending order, 1 ascending order Field *Field CustomSortImplementation func(afo IAdminFilterObjects, field *Field, direction int) }
func (*SortBy) GetDirection ¶ added in v1.1.0
func (*SortBy) SetSortCustomImplementation ¶ added in v1.1.2
func (sb *SortBy) SetSortCustomImplementation(customSortImplementation func(afo IAdminFilterObjects, field *Field, direction int))
func (*SortBy) Sort ¶
func (sb *SortBy) Sort(afo IAdminFilterObjects, direction int)
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) template.HTML
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) template.HTML
type SqliteAdapter ¶ added in v1.1.2
func (*SqliteAdapter) BuildDeleteString ¶ added in v1.1.2
func (d *SqliteAdapter) BuildDeleteString(table string, cond string, values ...interface{}) *DeleteRowStructure
func (*SqliteAdapter) ClearTestDatabase ¶ added in v1.1.2
func (d *SqliteAdapter) ClearTestDatabase()
func (*SqliteAdapter) Close ¶ added in v1.1.2
func (d *SqliteAdapter) Close(db *gorm.DB)
func (*SqliteAdapter) Contains ¶ added in v1.1.2
func (d *SqliteAdapter) Contains(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Date ¶ added in v1.1.2
func (d *SqliteAdapter) Date(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Day ¶ added in v1.1.2
func (d *SqliteAdapter) Day(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) EndsWith ¶ added in v1.1.2
func (d *SqliteAdapter) EndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Equals ¶ added in v1.1.2
func (d *SqliteAdapter) Equals(name interface{}, args ...interface{})
func (*SqliteAdapter) Exact ¶ added in v1.1.2
func (d *SqliteAdapter) Exact(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) GetLastError ¶ added in v1.1.4
func (d *SqliteAdapter) GetLastError() error
func (*SqliteAdapter) GetStringToExtractMonthFromField ¶ added in v1.1.2
func (d *SqliteAdapter) GetStringToExtractMonthFromField(filterOptionField string) string
func (*SqliteAdapter) GetStringToExtractYearFromField ¶ added in v1.1.2
func (d *SqliteAdapter) GetStringToExtractYearFromField(filterOptionField string) string
func (*SqliteAdapter) Gt ¶ added in v1.1.2
func (d *SqliteAdapter) Gt(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Gte ¶ added in v1.1.2
func (d *SqliteAdapter) Gte(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Hour ¶ added in v1.1.2
func (d *SqliteAdapter) Hour(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) IContains ¶ added in v1.1.2
func (d *SqliteAdapter) IContains(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) IEndsWith ¶ added in v1.1.2
func (d *SqliteAdapter) IEndsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) IExact ¶ added in v1.1.2
func (d *SqliteAdapter) IExact(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) IRegex ¶ added in v1.1.2
func (d *SqliteAdapter) IRegex(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) IStartsWith ¶ added in v1.1.2
func (d *SqliteAdapter) IStartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) In ¶ added in v1.1.2
func (d *SqliteAdapter) In(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) InitializeDatabaseForTests ¶ added in v1.1.2
func (d *SqliteAdapter) InitializeDatabaseForTests(databaseSettings *DBSettings)
func (*SqliteAdapter) IsNull ¶ added in v1.1.2
func (d *SqliteAdapter) IsNull(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Lt ¶ added in v1.1.2
func (d *SqliteAdapter) Lt(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Lte ¶ added in v1.1.2
func (d *SqliteAdapter) Lte(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Minute ¶ added in v1.1.2
func (d *SqliteAdapter) Minute(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Month ¶ added in v1.1.2
func (d *SqliteAdapter) Month(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Quarter ¶ added in v1.1.2
func (d *SqliteAdapter) Quarter(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Range ¶ added in v1.1.2
func (d *SqliteAdapter) Range(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Regex ¶ added in v1.1.2
func (d *SqliteAdapter) Regex(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Second ¶ added in v1.1.2
func (d *SqliteAdapter) Second(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) SetIsolationLevelForTests ¶ added in v1.1.2
func (d *SqliteAdapter) SetIsolationLevelForTests(db *gorm.DB)
func (*SqliteAdapter) SetTimeZone ¶ added in v1.1.2
func (d *SqliteAdapter) SetTimeZone(db *gorm.DB, timezone string)
func (*SqliteAdapter) StartDBShell ¶ added in v1.1.2
func (d *SqliteAdapter) StartDBShell(databaseSettings *DBSettings) error
func (*SqliteAdapter) StartsWith ¶ added in v1.1.2
func (d *SqliteAdapter) StartsWith(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Time ¶ added in v1.1.2
func (d *SqliteAdapter) Time(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Week ¶ added in v1.1.2
func (d *SqliteAdapter) Week(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) WeekDay ¶ added in v1.1.2
func (d *SqliteAdapter) WeekDay(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
func (*SqliteAdapter) Year ¶ added in v1.1.2
func (d *SqliteAdapter) Year(operatorContext *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder)
type StartsWithGormOperator ¶
type StartsWithGormOperator struct { }
func (*StartsWithGormOperator) Build ¶
func (ego *StartsWithGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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{})
func (*TemplateRenderer) RenderAsString ¶
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) template.HTML
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) template.HTML
type TimeGormOperator ¶
type TimeGormOperator struct { }
func (*TimeGormOperator) Build ¶
func (ego *TimeGormOperator) Build(adapter IDbAdapter, context *GormOperatorContext, field *Field, value interface{}, SQLConditionBuilder ISQLConditionBuilder) *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) template.HTML
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 OverridenTemplatesFS *embed.FS LocalizationFS embed.FS CustomLocalizationFS *embed.FS RequiresCsrfCheck func(c *gin.Context) bool PatternsToIgnoreCsrfCheck *list.List ErrorHandleFunc func(int, string, string) InTests bool ConfigContent []byte DebugTests bool }
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) GetTemplateContent ¶ added in v1.1.5
func (c *UadminConfig) GetTemplateContent(templatePath string) []byte
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"` 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"` Debug bool `yaml:"debug"` }
func (*UadminConfigurableConfig) UnmarshalYAML ¶
func (ucc *UadminConfigurableConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type UadminDatabase ¶
type UadminDatabase struct { Db *gorm.DB Adapter IDbAdapter }
var UadminTestDatabase *UadminDatabase
func NewUadminDatabase ¶
func NewUadminDatabase(alias1 ...string) *UadminDatabase
func NewUadminDatabaseWithoutConnection ¶
func NewUadminDatabaseWithoutConnection(alias1 ...string) *UadminDatabase
func (*UadminDatabase) Close ¶
func (uad *UadminDatabase) Close()
func (*UadminDatabase) ForcefullyClose ¶ added in v1.1.2
func (uad *UadminDatabase) ForcefullyClose()
type UadminDbOptions ¶
type UadminDbOptions struct { Default *DBSettings Slave *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 UadminString ¶ added in v1.1.7
type UadminString interface {
String() string
}
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"` PermissionRegistry *UserPermRegistry `gorm:"-"` }
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) GetCreatedAt ¶ added in v1.1.2
func (*User) GetDeletedAt ¶ added in v1.1.2
func (*User) GetExpiresOn ¶ added in v1.1.2
func (*User) GetFirstName ¶ added in v1.1.2
func (*User) GetFullName ¶ added in v1.1.2
func (*User) GetGeneratedOTPToVerify ¶ added in v1.1.2
func (*User) GetIsPasswordUsable ¶ added in v1.1.2
func (*User) GetIsStaff ¶ added in v1.1.2
func (*User) GetIsSuperUser ¶ added in v1.1.2
func (*User) GetLastLogin ¶ added in v1.1.2
func (*User) GetLastName ¶ added in v1.1.2
func (*User) GetOTPRequired ¶ added in v1.1.2
func (*User) GetOTPSeed ¶ added in v1.1.2
func (*User) GetPassword ¶ added in v1.1.2
func (*User) GetPermissionRegistry ¶ added in v1.1.2
func (u *User) GetPermissionRegistry() *UserPermRegistry
func (*User) GetPermissions ¶ added in v1.1.2
func (u *User) GetPermissions() *[]Permission
func (*User) GetUpdatedAt ¶ added in v1.1.2
func (*User) GetUserGroups ¶ added in v1.1.2
func (*User) GetUsername ¶ added in v1.1.2
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
func (*User) SetCreatedAt ¶ added in v1.1.2
func (*User) SetDeletedAt ¶ added in v1.1.2
func (*User) SetExpiresOn ¶ added in v1.1.2
func (*User) SetFirstName ¶ added in v1.1.2
func (*User) SetGeneratedOTPToVerify ¶ added in v1.1.2
func (*User) SetIsPasswordUsable ¶ added in v1.1.2
func (*User) SetIsStaff ¶ added in v1.1.2
func (*User) SetIsSuperUser ¶ added in v1.1.2
func (*User) SetLastLogin ¶ added in v1.1.2
func (*User) SetLastName ¶ added in v1.1.2
func (*User) SetOTPRequired ¶ added in v1.1.2
func (*User) SetOTPSeed ¶ added in v1.1.2
func (*User) SetPassword ¶ added in v1.1.2
func (*User) SetPermissionRegistry ¶ added in v1.1.2
func (u *User) SetPermissionRegistry(upr *UserPermRegistry)
func (*User) SetPermissions ¶ added in v1.1.2
func (u *User) SetPermissions(permissions *[]Permission)
func (*User) SetUpdatedAt ¶ added in v1.1.2
func (*User) SetUserGroups ¶ added in v1.1.2
func (*User) SetUsername ¶ added in v1.1.2
type UserAuthToken ¶
type UserAuthToken struct { Model User User UserID uint `gorm:"uniqueIndex"` Token string `gorm:"uniqueIndex,size:40"` SessionExpiresAt sql.NullInt64 }
func (*UserAuthToken) BeforeCreate ¶ added in v1.2.5
func (uat *UserAuthToken) BeforeCreate(tx *gorm.DB) error
func (*UserAuthToken) IsExpired ¶ added in v1.3.0
func (uat *UserAuthToken) IsExpired() bool
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{}, SQLConditionBuilder ISQLConditionBuilder) *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{}, SQLConditionBuilder ISQLConditionBuilder) *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(widget IWidget, renderContext *FormRenderContext, currentField *Field) interface{} Prefix string ValueConfigured bool }
func (*Widget) CloneAllOtherImportantSettings ¶ added in v1.1.7
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(widget IWidget, 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) template.HTML
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(widget IWidget, 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{}, SQLConditionBuilder ISQLConditionBuilder) *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_breadcrumb.go
- admin_context.go
- admin_dashboard_panel.go
- admin_filter_objects.go
- admin_list_display.go
- admin_list_filter.go
- admin_model_actions.go
- admin_page.go
- admin_page_inlines.go
- admin_paginator.go
- admin_request_parameters.go
- admin_search_fields.go
- admin_sort.go
- app.go
- auth_provider_interfaces.go
- blueprint_interfaces.go
- command_interfaces.go
- command_registry.go
- config_interfaces.go
- content_type.go
- core_helpers.go
- core_models.go
- core_user_interfaces.go
- csrf.go
- db_interfaces.go
- form.go
- form_field_options.go
- form_fields.go
- form_list_editable.go
- form_widget.go
- gorm_interfaces.go
- gorm_persistence_storage.go
- http_responses.go
- microservice.go
- migration_interfaces.go
- object_query_builder.go
- perm_interfaces.go
- persistence_storage_interfaces.go
- primitive_interfaces.go
- project_models.go
- random.go
- reflect_helpers.go
- regex.go
- session_core_models.go
- sqlite_adapter.go
- storages.go
- syslog.go
- template.go
- template_funcs.go
- trail.go
- translation.go
- user_core_models.go
- validator_interfaces.go