Documentation ¶
Index ¶
- func AuthenticatedOnly(next http.Handler) http.Handler
- func RenderIndex(w http.ResponseWriter, r *http.Request, service *Service)
- func RenderNotFound(w http.ResponseWriter, r *http.Request, service *Service)
- type Advanced
- type App
- type ConstructArgs
- type CustomActionArgs
- type CustomActionRunner
- type CustomQueryArgs
- type DeleteArgs
- type DiagnosticsArgs
- type LoadArgs
- type ModelDb
- type NewArgs
- type OnConstruct
- type OnDelete
- type OnLoad
- type OnNew
- type OnQuery
- type OnSave
- type PermittedArgs
- type PersistentObjectActions
- type PostgresBackend
- type QueryArgs
- type QuerySource
- type RuleArgs
- type RuleStore
- type SaveArgs
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderIndex ¶
func RenderIndex(w http.ResponseWriter, r *http.Request, service *Service)
func RenderNotFound ¶
func RenderNotFound(w http.ResponseWriter, r *http.Request, service *Service)
Types ¶
type Advanced ¶
type Advanced struct { OnDiagnostics func(args *DiagnosticsArgs) Actions map[string]*PersistentObjectActions }
func (*Advanced) AddPersistentObjectActions ¶
func (advanced *Advanced) AddPersistentObjectActions(name string, actions PersistentObjectActions)
AddPersistentObjectActions Deprecated
func (*Advanced) GetPersistentObjectActions ¶
func (advanced *Advanced) GetPersistentObjectActions(name string) *PersistentObjectActions
GetPersistentObjectActions Deprecated
type App ¶
type App struct { Config *ini.File AppName string Advanced *Advanced Models *ModelDb Rules RuleStore Users user.Store // Deprecated DB *sqlx.DB // contains filtered or unexported fields }
func (*App) IsDevelopment ¶
type ConstructArgs ¶
type ConstructArgs struct { Service *Service PersistentObject *model.PersistentObject }
type CustomActionArgs ¶
type CustomActionRunner ¶
type CustomActionRunner struct { IsPermitted func(args *PermittedArgs) bool OnExecute func(args *CustomActionArgs) *model.PersistentObject }
type CustomQueryArgs ¶
type DeleteArgs ¶
type DiagnosticsArgs ¶
type LoadArgs ¶
type LoadArgs struct { Service *Service PersistentObject *model.PersistentObject }
type ModelDb ¶
func (*ModelDb) AddCustomActionRunner ¶
func (m *ModelDb) AddCustomActionRunner(name string, impl *CustomActionRunner)
func (*ModelDb) AddQuerySource ¶
func (m *ModelDb) AddQuerySource(name string, source QuerySource)
func (*ModelDb) GetCustomActionRunner ¶
func (m *ModelDb) GetCustomActionRunner(name string) *CustomActionRunner
func (*ModelDb) GetQuerySource ¶
func (m *ModelDb) GetQuerySource(name string) QuerySource
type NewArgs ¶
type NewArgs struct { Service *Service PersistentObject *model.PersistentObject }
type OnConstruct ¶
type OnConstruct func(args *ConstructArgs) error
type OnDelete ¶
type OnDelete func(args *DeleteArgs) error
type PermittedArgs ¶
type PermittedArgs struct { Service *Service Object *model.PersistentObject Query *model.ExecutedQuery }
type PersistentObjectActions ¶
type PostgresBackend ¶
type PostgresBackend struct {
// contains filtered or unexported fields
}
func (*PostgresBackend) ExecuteQuery ¶
func (backend *PostgresBackend) ExecuteQuery(query *model.Query, sourceResult any, options service.ExecuteQueryOptions) (*model.QueryResult, error)
func (*PostgresBackend) GetPersistentObject ¶
func (backend *PostgresBackend) GetPersistentObject(obj *model.PersistentObject, id string) error
type QueryArgs ¶
type QueryArgs struct { Service *Service Query *model.ExecutedQuery }
type QuerySource ¶
type QuerySource func(args *CustomQueryArgs) any
type SaveArgs ¶
type SaveArgs struct { Service *Service PersistentObject *model.PersistentObject }
type Service ¶
type Service struct { App *App Query *model.ExecutedQuery Object *model.PersistentObject //TODO: Rename to PersistentObject Html template.HTML User *user.User // contains filtered or unexported fields }
func (*Service) ExecuteQuery ¶
func (service *Service) ExecuteQuery(query *model.Query, options service.ExecuteQueryOptions) (*model.ExecutedQuery, error)
ExecuteQuery TODO: page should go into something like "ExecuteQueryOptions"
func (*Service) GetPersistentObject ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.