core

package
Version: v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG     = 0
	WORKING   = 1
	INFO      = 2
	OK        = 3
	WARNING   = 4
	ERROR     = 5
	CRITICAL  = 6
	ALERT     = 7
	EMERGENCY = 8
)

Reporting Levels

Variables

View Source
var ASCIIRegex = regexp.MustCompile("[[:^ascii:]]")
View Source
var AddedObjectInPopup *template.Template
View Source
var Db *gorm.DB
View Source
var FuncMap = template.FuncMap{
	"Tf":             Tf,
	"add":            add,
	"mul":            mul,
	"safe":           safe,
	"attr":           attr,
	"GenerateAttrs":  GenerateAttrs,
	"GetDisplayName": GetDisplayName,
	"SplitCamelCase": HumanizeCamelCase,
}
View Source
var GenerateBunchOfUserModels = func() interface{} {
	return &[]*User{}
}
View Source
var GenerateUserModel = func() IUser {
	return &User{}
}
View Source
var OnlyLetersNumbersStringAlphabet = []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
View Source
var PopulateTemplateContextForAdminPanel func(ctx *gin.Context, context IAdminContext, adminRequestParams *AdminRequestParams)
View Source
var ReportingLevel = DEBUG

ReportingLevel is the standard reporting level.

View Source
var TrailLoggingLevel = INFO

TrailLoggingLevel is the minimum level to be logged into syslog

View Source
var WhitespaceRegex = regexp.MustCompile("\\s+")

Functions

func APIBadResponse

func APIBadResponse(error string) gin.H

func APIBadResponseWithCode

func APIBadResponseWithCode(code string, error string, params ...string) gin.H

func APINoMethodFound

func APINoMethodFound() gin.H

func APISuccessResp

func APISuccessResp() gin.H

func ClearProjectModels

func ClearProjectModels()

func CloneNetURL

func CloneNetURL(url1 *url.URL) *url.URL

func Contains

func Contains(s []string, e string) bool

func ContainsInt64

func ContainsInt64(s []int64, e int64) bool

func GenerateAttrs

func GenerateAttrs(attrs map[string]string) template.HTML

func GenerateCSRFToken

func GenerateCSRFToken() string

func GenerateNumberSequence

func GenerateNumberSequence(start int, stop int) <-chan int

func GenerateRandomString

func GenerateRandomString(n int, alphabets ...*[]byte) string

func GenerateRandomStringForCSRFToken

func GenerateRandomStringForCSRFToken() string

func GetBluePrintNameFromMigrationName

func GetBluePrintNameFromMigrationName(migrationName string) string

func GetDB

func GetDB(alias1 ...string) *gorm.DB

GetDB returns a pointer to the DB

func GetDisplayName

func GetDisplayName(src string) string

func GetID

func GetID(m reflect.Value) interface{}

func HumanizeCamelCase

func HumanizeCamelCase(src string) string

func InitializeGlobalAdapterRegistry

func InitializeGlobalAdapterRegistry()

func IsTruthyValue

func IsTruthyValue(value interface{}) bool

func LoadPermissions

func LoadPermissions()

func LoadSessions

func LoadSessions()

func MaskCSRFToken

func MaskCSRFToken(token string) string

func NewSwaggerSpec

func NewSwaggerSpec(file string) *loads.Document

Reads info from config file

func PrepareStringToBeUsedForHTMLID

func PrepareStringToBeUsedForHTMLID(text string) string

func Remove

func Remove(items []string, item string) []string

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 SetUpStructField(structF reflect.Value, v interface{}) error

func SplitCamelCase

func SplitCamelCase(src string) (entries []string)

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

  1. If string is not valid UTF-8, return it without splitting as single item array.
  2. Assign all unicode characters into one of 4 sets: lower case letters, upper case letters, numbers, and all other characters.
  3. Iterate through characters of string, introducing splits between adjacent characters that belong to different sets.
  4. 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

func Syslogf(level int, msg string, a ...interface{})

Syslogf records a log in the system in syslog. For Windows it created a file and records the logs there.

func Tf

func Tf(lang string, iTerm interface{}, args ...interface{}) string

@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: "gomonolith/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 ToCamel

func ToCamel(s string) string

ToCamel converts a string to CamelCase

func Trail

func Trail(level int, msg interface{}, i ...interface{})

Trail prints to the log

func TransformDateTimeValueForWidget

func TransformDateTimeValueForWidget(value interface{}) interface{}

func TransformValueForListDisplay

func TransformValueForListDisplay(value interface{}, forExportP ...bool) string

func TransformValueForOperator

func TransformValueForOperator(value interface{}) interface{}

func TransformValueForWidget

func TransformValueForWidget(value interface{}) interface{}

func Translate

func Translate(c *gin.Context, raw string, lang string, args ...bool) string

func TraverseRemovalTreeNode

func TraverseRemovalTreeNode(nodeToVisit *RemovalTreeNode, removalOrderList *RemovalOrderList)

func UnmaskCSRFToken

func UnmaskCSRFToken(token string) string

Types

type APIOptions

type APIOptions struct {
	ListenPort int `yaml:"listen_port"`
	SSL        struct {
		ListenPort int `yaml:"listen_port"`
	} `yaml:"ssl"`
}

type AWSConfig

type AWSConfig struct {
	S3 *AWSS3Config `yaml:"s3"`
}

func NewAWSConfig

func NewAWSConfig() *AWSConfig

type AWSS3Config

type AWSS3Config struct {
	Region    string `yaml:"region"`
	AccessKey string `yaml:"access_key"`
	SecretKey string `yaml:"secret_key"`
}

type AWSS3Storage

type AWSS3Storage struct {
	URLPath    string
	Config     *AWSConfig
	Timeout    time.Duration
	Bucket     string
	NameLength int
	Domain     string
}

func (*AWSS3Storage) Delete

func (s *AWSS3Storage) Delete(s3Key string) (bool, error)

func (*AWSS3Storage) Exists

func (s *AWSS3Storage) Exists(s3Key string) (bool, error)

func (*AWSS3Storage) GetUploadURL

func (s *AWSS3Storage) GetUploadURL() string

func (*AWSS3Storage) Read

func (s *AWSS3Storage) Read(s3Key string) ([]byte, error)

func (*AWSS3Storage) Save

func (s *AWSS3Storage) Save(f *FileForStorage) (string, error)

func (*AWSS3Storage) Stats

func (s *AWSS3Storage) Stats(s3Key string) (os.FileInfo, error)

type AdminActionPlacement

type AdminActionPlacement struct {
	DisplayOnEditPage bool
	//DisplayToTheTop bool
	//DisplayToTheBottom bool
	//DisplayToTheRight bool
	//DisplayToTheLeft bool
	ShowOnTheListPage bool
}

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 AdminBreadcrumb struct {
	Name     string
	URL      string
	IsActive bool
	Icon     string
}

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
	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

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

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 (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

func NewEmptyModelActionRegistry() *AdminModelActionRegistry

func (*AdminModelActionRegistry) AddModelAction

func (amar *AdminModelActionRegistry) AddModelAction(ma *AdminModelAction)

func (*AdminModelActionRegistry) GetAllModelActions

func (amar *AdminModelActionRegistry) GetAllModelActions() <-chan *AdminModelAction

func (*AdminModelActionRegistry) GetAllModelActionsForUser

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

func (amar *AdminModelActionRegistry) IsThereAnyActionsToShowOnEditPage(user IUser, ap *AdminPage) bool

type AdminOptions

type AdminOptions struct {
	ListenPort int `yaml:"listen_port"`
	SSL        struct {
		ListenPort int `yaml:"listen_port"`
	} `yaml:"ssl"`
	BindIP string `yaml:"bind_ip"`
}

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

func (ap *AdminPage) DoesUserHavePermission(u IUser, permissionNameL ...CustomPermission) bool

func (*AdminPage) FetchFilterOptions

func (ap *AdminPage) FetchFilterOptions(ctx *gin.Context) []*DisplayFilterOption

func (*AdminPage) GenerateLinkForModelAutocompletion

func (ap *AdminPage) GenerateLinkForModelAutocompletion() string

func (*AdminPage) GenerateLinkToAddNewModel

func (ap *AdminPage) GenerateLinkToAddNewModel(inPopup bool) string

func (*AdminPage) GenerateLinkToEditModel

func (ap *AdminPage) GenerateLinkToEditModel(gormModelV reflect.Value) string

func (*AdminPage) HandleModelAction

func (ap *AdminPage) HandleModelAction(modelActionName string, ctx *gin.Context)

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

type AdminPageRegistry struct {
	AdminPages map[string]*AdminPage
}
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 AdminRequestPaginator struct {
	PerPage int
	Offset  int
}

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 AuthOptions

type AuthOptions struct {
	JwtSecretToken    string `yaml:"jwt_secret_token"`
	MinUsernameLength int    `yaml:"min_username_length"`
	MaxUsernameLength int    `yaml:"max_username_length"`
	MinPasswordLength int    `yaml:"min_password_length"`
	SaltLength        int    `yaml:"salt_length"`
}

type AuthProviderRegistry

type AuthProviderRegistry struct {
	// contains filtered or unexported fields
}

func NewAuthProviderRegistry

func NewAuthProviderRegistry() *AuthProviderRegistry

func (*AuthProviderRegistry) GetAdapter

func (r *AuthProviderRegistry) GetAdapter(name string) (IAuthProvider, error)

func (*AuthProviderRegistry) Iterate

func (r *AuthProviderRegistry) Iterate() <-chan IAuthProvider

func (*AuthProviderRegistry) RegisterNewAdapter

func (r *AuthProviderRegistry) RegisterNewAdapter(adapter IAuthProvider)

type AutocompleteItemResponse

type AutocompleteItemResponse struct {
	Value string `json:"value"`
	Label string `json:"label"`
}

type Blueprint

type Blueprint struct {
	Name              string
	Description       string
	MigrationRegistry IMigrationRegistry
}

func (Blueprint) GetDescription

func (b Blueprint) GetDescription() string

func (Blueprint) GetMigrationRegistry

func (b Blueprint) GetMigrationRegistry() IMigrationRegistry

func (Blueprint) GetName

func (b Blueprint) GetName() string

func (Blueprint) InitApp

func (b Blueprint) InitApp(app IApp)

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

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 ColumnSchema struct {
	ShowLabel bool
	Fields    []*Field
}

type CommandRegistry

type CommandRegistry struct {
	Actions map[string]ICommand
}

func (CommandRegistry) AddAction

func (r CommandRegistry) AddAction(name string, command ICommand)

func (CommandRegistry) IsRegisteredCommand

func (r CommandRegistry) IsRegisteredCommand(name string) bool

func (CommandRegistry) MakeHelpText

func (r CommandRegistry) MakeHelpText() string

func (CommandRegistry) RunAction

func (r CommandRegistry) RunAction(command string, subaction string, args []string) error

type Config

type Config struct {
	APISpec                   *loads.Document
	D                         *ConfigurableConfig
	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 *Config

func NewConfig

func NewConfig(file string) *Config

Reads info from config file

func (*Config) GetPathToTemplate

func (c *Config) GetPathToTemplate(templateName string) string

func (*Config) GetPathToUploadDirectory

func (c *Config) GetPathToUploadDirectory() string

func (*Config) GetTemplateContent

func (c *Config) GetTemplateContent(templatePath string) []byte

func (*Config) GetURLToUploadDirectory

func (c *Config) GetURLToUploadDirectory() string

type ConfigOptions

type ConfigOptions 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"`
	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 ConfigurableConfig

type ConfigurableConfig struct {
	GoMonolith *ConfigOptions  `yaml:"gomonolith"`
	Test       string          `yaml:"test"`
	Db         *DbOptions      `yaml:"db"`
	Auth       *AuthOptions    `yaml:"auth"`
	Admin      *AdminOptions   `yaml:"admin"`
	API        *APIOptions     `yaml:"api"`
	Swagger    *SwaggerOptions `yaml:"swagger"`
	Debug      bool            `yaml:"debug"`
}

func (*ConfigurableConfig) UnmarshalYAML

func (ucc *ConfigurableConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

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 *Config) *Database

func (Database) ConnectTo

func (d Database) ConnectTo(alias string) *gorm.DB

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

type DateTimeWidget struct {
	Widget
	DateTimeValue string
}

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

type DateWidget struct {
	Widget
	DateValue string
}

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

type DbAdapterRegistry struct {
	// contains filtered or unexported fields
}
var GlobalDbAdapterRegistry *DbAdapterRegistry

func (*DbAdapterRegistry) RegisterAdapter

func (dar *DbAdapterRegistry) RegisterAdapter(dbType string, createAdapterHandler func(db *gorm.DB) IDbAdapter)

type DbOptions

type DbOptions struct {
	Default *DBSettings
	Slave   *DBSettings
}

type DeleteRowStructure

type DeleteRowStructure struct {
	SQL         string
	Values      []interface{}
	Explanation string
	Table       string
	Cond        string
}

type DisplayFilterOption

type DisplayFilterOption struct {
	FilterField string
	FilterValue string
	DisplayAs   string
}

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
	GoMonolithFieldType GoMonolithFieldType
	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

func NewFieldForListDisplayFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field

func NewFieldFromGormField

func NewFieldFromGormField(gormField *schema.Field, fieldOptions IFieldFormOptions) *Field

func NewGoMonolithFieldForListDisplayFromGormField

func NewGoMonolithFieldForListDisplayFromGormField(gormModelV reflect.Value, field *schema.Field, r ITemplateRenderer, renderForAdmin bool) *Field

func NewGoMonolithFieldFromGormField

func NewGoMonolithFieldFromGormField(gormModelV reflect.Value, field *schema.Field, r ITemplateRenderer, renderForAdmin bool) *Field

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 FieldConfig struct {
	Widget                 IWidget
	AutocompleteURL        string
	DependsOnAnotherFields []string
}

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

func (ffo *FieldFormOptions) GetIsAutocomplete() bool

func (*FieldFormOptions) GetIsRequired

func (ffo *FieldFormOptions) GetIsRequired() bool

func (*FieldFormOptions) GetListFieldWidget

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

type FieldRegistry struct {
	Fields      map[string]*Field
	MaxOrdering int
}

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) GetByName

func (fr *FieldRegistry) GetByName(name string) (*Field, error)

func (*FieldRegistry) GetPrimaryKey

func (fr *FieldRegistry) GetPrimaryKey() (*Field, error)

type FileForStorage

type FileForStorage struct {
	Content           []byte
	PatternForTheFile string
	Filename          string
}

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

type FkLinkWidget struct {
	Widget
	Context string
}

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

func (w *ForeignKeyWidget) CloneAllOtherImportantSettings(widget IWidget)

func (*ForeignKeyWidget) GetDataForRendering

func (w *ForeignKeyWidget) GetDataForRendering(formRenderContext *FormRenderContext, currentField *Field) WidgetData

func (*ForeignKeyWidget) GetDbHandler

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 NewFormFromModel(gormModel interface{}, excludeFields []string, fieldsToShow []string, buildFieldPlacement bool, formTitle string, forAdminP ...bool) *Form

func NewFormFromModelFromGinContext

func NewFormFromModelFromGinContext(contextFromGin IAdminContext, gormModel interface{}, excludeFields []string, fieldsToShow []string, buildFieldPlacement bool, formTitle string, forAdminP ...bool) *Form

func (*Form) ProceedRequest

func (f *Form) ProceedRequest(form *multipart.Form, gormModel interface{}, adminContext IAdminContext, afoP ...IAdminFilterObjects) *FormError

func (*Form) Render

func (f *Form) Render() template.HTML

func (*Form) SetPrefix

func (f *Form) SetPrefix(prefix string)

type FormConfigurableOptionRegistry

type FormConfigurableOptionRegistry struct {
	Options map[string]IFieldFormOptions
}
var FormCongirurableOptionInstance *FormConfigurableOptionRegistry

func (*FormConfigurableOptionRegistry) AddFieldFormOptions

func (c *FormConfigurableOptionRegistry) AddFieldFormOptions(formOptions IFieldFormOptions)

func (*FormConfigurableOptionRegistry) GetFieldFormOptions

func (c *FormConfigurableOptionRegistry) GetFieldFormOptions(formOptionsName string) IFieldFormOptions

type FormError

type FormError struct {
	FieldError    map[string]ValidationError
	GeneralErrors ValidationError
}

func (*FormError) AddGeneralError

func (fe *FormError) AddGeneralError(err error)

func (*FormError) Error

func (fe *FormError) Error() string

func (*FormError) GetErrorForField

func (fe *FormError) GetErrorForField(fieldName string) ValidationError

func (*FormError) IsEmpty

func (fe *FormError) IsEmpty() bool

func (*FormError) String

func (fe *FormError) String() string

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

type FsStorage struct {
	UploadPath string
	URLPath    string
}

func (*FsStorage) Delete

func (s *FsStorage) Delete(filename string) (bool, error)

func (*FsStorage) Exists

func (s *FsStorage) Exists(filename string) (bool, error)

func (*FsStorage) GetUploadURL

func (s *FsStorage) GetUploadURL() string

func (*FsStorage) Read

func (s *FsStorage) Read(filename string) ([]byte, error)

func (*FsStorage) Save

func (s *FsStorage) Save(f *FileForStorage) (string, error)

func (*FsStorage) Stats

func (s *FsStorage) Stats(filename string) (os.FileInfo, error)

type GoMonolithFieldType

type GoMonolithFieldType string
const BigIntegerFieldType GoMonolithFieldType = "biginteger"
const BinaryFieldType GoMonolithFieldType = "binary"
const BooleanFieldType GoMonolithFieldType = "boolean"
const CharFieldType GoMonolithFieldType = "char"
const DateFieldType GoMonolithFieldType = "date"
const DateTimeFieldType GoMonolithFieldType = "datetime"
const DecimalFieldType GoMonolithFieldType = "decimal"
const DurationFieldType GoMonolithFieldType = "duration"
const EmailFieldType GoMonolithFieldType = "email"
const FileFieldType GoMonolithFieldType = "file"
const FilePathFieldType GoMonolithFieldType = "filepath"
const FloatFieldType GoMonolithFieldType = "float"
const ForeignKeyFieldType GoMonolithFieldType = "foreignkey"
const GenericIPAddressFieldType GoMonolithFieldType = "genericipaddress"
const IPAddressFieldType GoMonolithFieldType = "ipaddress"
const ImageFieldFieldType GoMonolithFieldType = "imagefield"
const IntegerFieldType GoMonolithFieldType = "integer"
const ManyToManyFieldType GoMonolithFieldType = "manytomany"
const NullBooleanFieldType GoMonolithFieldType = "nullboolean"
const PositiveBigIntegerFieldType GoMonolithFieldType = "positivebiginteger"
const PositiveIntegerFieldType GoMonolithFieldType = "positiveinteger"
const PositiveSmallIntegerFieldType GoMonolithFieldType = "positivesmallinteger"
const SlugFieldType GoMonolithFieldType = "slug"
const SmallIntegerFieldType GoMonolithFieldType = "smallinteger"
const TextFieldType GoMonolithFieldType = "text"
const TimeFieldType GoMonolithFieldType = "time"
const URLFieldType GoMonolithFieldType = "url"
const UUIDFieldType GoMonolithFieldType = "uuid"
const UintFieldType GoMonolithFieldType = "uint"

func GetGoMonolithFieldTypeFromGormField

func GetGoMonolithFieldTypeFromGormField(gormField *schema.Field) GoMonolithFieldType

type GoMonolithString

type GoMonolithString interface {
	String() string
}

type GormAdminFilterObjects

type GormAdminFilterObjects struct {
	InitialGormQuerySet   IPersistenceStorage
	GormQuerySet          IPersistenceStorage
	PaginatedGormQuerySet IPersistenceStorage
	Model                 interface{}
	DatabaseInstance      *ProjectDatabase
	LastError             error
	NeededJoins           []string
}

func (*GormAdminFilterObjects) AddNeededJoinsIfNecessary

func (afo *GormAdminFilterObjects) AddNeededJoinsIfNecessary(afo1 IAdminFilterObjects)

func (*GormAdminFilterObjects) CreateNew

func (afo *GormAdminFilterObjects) CreateNew(model interface{}) error

func (*GormAdminFilterObjects) FilterByMultipleIds

func (afo *GormAdminFilterObjects) FilterByMultipleIds(field *Field, realObjectIds []string)

func (*GormAdminFilterObjects) FilterQs

func (afo *GormAdminFilterObjects) FilterQs(filterString string)

func (*GormAdminFilterObjects) GetCurrentModel

func (afo *GormAdminFilterObjects) GetCurrentModel() interface{}

func (*GormAdminFilterObjects) GetDB

func (*GormAdminFilterObjects) GetDatabase

func (afo *GormAdminFilterObjects) GetDatabase() *ProjectDatabase

func (*GormAdminFilterObjects) GetFullQuerySet

func (afo *GormAdminFilterObjects) GetFullQuerySet() IPersistenceStorage

func (*GormAdminFilterObjects) GetInitialQuerySet

func (afo *GormAdminFilterObjects) GetInitialQuerySet() IPersistenceStorage

func (*GormAdminFilterObjects) GetLastError

func (afo *GormAdminFilterObjects) GetLastError() error

func (*GormAdminFilterObjects) GetPaginated

func (afo *GormAdminFilterObjects) GetPaginated() <-chan *IterateAdminObjects

func (*GormAdminFilterObjects) GetPaginatedQuerySet

func (afo *GormAdminFilterObjects) GetPaginatedQuerySet() IPersistenceStorage

func (*GormAdminFilterObjects) IterateThroughWholeQuerySet

func (afo *GormAdminFilterObjects) IterateThroughWholeQuerySet() <-chan *IterateAdminObjects

func (*GormAdminFilterObjects) LoadDataForModelByID

func (afo *GormAdminFilterObjects) LoadDataForModelByID(ID interface{}, model interface{})

func (*GormAdminFilterObjects) RemoveModelPermanently

func (afo *GormAdminFilterObjects) RemoveModelPermanently(model interface{}) error

func (*GormAdminFilterObjects) SaveModel

func (afo *GormAdminFilterObjects) SaveModel(model interface{}) error

func (*GormAdminFilterObjects) Search

func (afo *GormAdminFilterObjects) Search(field *Field, searchString string)

func (*GormAdminFilterObjects) SetFullQuerySet

func (afo *GormAdminFilterObjects) SetFullQuerySet(storage IPersistenceStorage)

func (*GormAdminFilterObjects) SetInitialQuerySet

func (afo *GormAdminFilterObjects) SetInitialQuerySet(storage IPersistenceStorage)

func (*GormAdminFilterObjects) SetLastError

func (afo *GormAdminFilterObjects) SetLastError(err error)

func (*GormAdminFilterObjects) SetPaginatedQuerySet

func (afo *GormAdminFilterObjects) SetPaginatedQuerySet(storage IPersistenceStorage)

func (*GormAdminFilterObjects) SortBy

func (afo *GormAdminFilterObjects) SortBy(field *Field, direction int)

func (*GormAdminFilterObjects) StoreNeededJoin

func (afo *GormAdminFilterObjects) StoreNeededJoin(join string)

func (*GormAdminFilterObjects) WithTransaction

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

type GormPersistenceStorage struct {
	Db        *gorm.DB
	LastError error
}

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 (*GormPersistenceStorage) Clauses

func (*GormPersistenceStorage) Commit

func (*GormPersistenceStorage) Count

func (*GormPersistenceStorage) Create

func (gps *GormPersistenceStorage) Create(value interface{}) IPersistenceStorage

func (*GormPersistenceStorage) CreateInBatches

func (gps *GormPersistenceStorage) CreateInBatches(value interface{}, batchSize int) IPersistenceStorage

func (*GormPersistenceStorage) DB

func (gps *GormPersistenceStorage) DB() (*sql.DB, error)

func (*GormPersistenceStorage) Debug

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

func (gps *GormPersistenceStorage) GetLastError() error

func (*GormPersistenceStorage) Group

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 (*GormPersistenceStorage) LoadDataForModelByID

func (gps *GormPersistenceStorage) LoadDataForModelByID(modelI interface{}, ID string) IPersistenceStorage

func (*GormPersistenceStorage) Migrator

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 (*GormPersistenceStorage) RollbackTo

func (gps *GormPersistenceStorage) RollbackTo(name string) IPersistenceStorage

func (*GormPersistenceStorage) Row

func (*GormPersistenceStorage) Rows

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 (*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 (gps *GormPersistenceStorage) Transaction(fc func(*gorm.DB) error, opts ...*sql.TxOptions) (err error)

func (*GormPersistenceStorage) Unscoped

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

type GormQueryBuilder

type GormQueryBuilder struct {
	FilterString     []string
	OperatorRegistry *GormOperatorRegistry
	Model            interface{}
}

type GrouppedFields

type GrouppedFields struct {
	Rows            []*FormRow
	ExtraCSSClasses []string
	Description     string
	Name            string
}

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

type HTTPErrorResponse struct {
	Code    string
	Message string
	Params  []interface{}
}

func NewHTTPErrorResponse

func NewHTTPErrorResponse(code string, message string, params ...interface{}) *HTTPErrorResponse

func (*HTTPErrorResponse) Error

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)
	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)
	GetDatabase() *ProjectDatabase
	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

type IApp interface {
	GetConfig() *Config
	GetDatabase() *Database
	GetRouter() *gin.Engine
	GetCommandRegistry() *CommandRegistry
	GetBlueprintRegistry() IBlueprintRegistry
	GetDashboardAdminPanel() *DashboardAdminPanel
	GetAuthAdapterRegistry() *AuthProviderRegistry
}

type IAuthProvider

type IAuthProvider interface {
	GetUserFromRequest(c *gin.Context) IUser
	Signin(c *gin.Context)
	Logout(c *gin.Context)
	IsAuthenticated(c *gin.Context)
	GetSession(c *gin.Context) ISessionProvider
	GetName() string
	Signup(c *gin.Context)
}

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 ICommand

type ICommand interface {
	Proceed(subaction string, args []string) error
	GetHelpText() string
}

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 IFieldRegistry interface {
	GetByName(name string) (*Field, error)
	AddField(field *Field)
	GetAllFields() map[string]*Field
	GetAllFieldsWithOrdering() []*Field
	GetPrimaryKey() (*Field, error)
}

type IForm

type IForm interface {
}

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(database *ProjectDatabase) error
	Down(database *ProjectDatabase) 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(database *ProjectDatabase) error
	Apply(database *ProjectDatabase) 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 IPersistenceAssociation interface {
	Find(out interface{}, conds ...interface{}) error
	Append(values ...interface{}) error
	Replace(values ...interface{}) error
	Delete(values ...interface{}) error
	Clear() error
	Count() (count int64)
}

type IPersistenceIterateRow

type IPersistenceIterateRow interface {
	Scan(dest ...interface{}) error
	Err() error
}

type IPersistenceIterateRows

type IPersistenceIterateRows interface {
	Next() bool
	NextResultSet() bool
	Err() error
	Columns() ([]string, error)
	ColumnTypes() ([]*sql.ColumnType, error)
	Scan(dest ...interface{}) error
	Close() error
}

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 IRegisterDbHandler interface {
	RegisterFunc(name string, impl interface{}, pure bool) error
}

type ISQLConditionBuilder

type ISQLConditionBuilder interface {
	Build(db IPersistenceStorage, query interface{}, args ...interface{}) IPersistenceStorage
}

type ISearchFieldInterface

type ISearchFieldInterface interface {
	Search(afo IAdminFilterObjects, searchString string)
}

type ISessionProvider

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

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

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 IUserPermissionRegistry interface {
	DoesUserHaveRightFor(permissionName string) bool
}

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 GetWidgetFromFieldTypeAndGormField

func GetWidgetFromFieldTypeAndGormField(fieldType GoMonolithFieldType, 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 IncludeContext struct {
	SiteName  string
	PageTitle string
}

type InlineFormListEditableCollection

type InlineFormListEditableCollection map[string]*FormListEditable

type InlineType

type InlineType string
var StackedInline InlineType
var TabularInline InlineType

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" gomonolithform:"ReadonlyField" gomonolith:"list,search"`
	Name           string `gomonolithform:"ReadonlyField" gomonolith:"list,search"`
	EnglishName    string `gomonolithform:"ReadonlyField" gomonolith:"list,search"`
	Active         bool   `gorm:"default:false" gomonolith:"list"`
	Flag           string `gomonolithform:"ImageFormOptions"`
	RTL            bool   `gorm:"default:false"`
	Default        bool   `gorm:"default:false"`
	AvailableInGui bool   `gorm:"default:false" gomonolithform:"ReadonlyField" gomonolith:"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

func GetLanguage(c *gin.Context) *Language

GetLanguage returns the language of the request

func (Language) String

func (l Language) String() string

String !

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

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