webmanage

package
v0.0.0-...-14b6000 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The names of the templates in the cache
	HOME_TEMP_NAME = "ui/html/home.html"
	AUTH_TEMP_NAME = "ui/html/auth.html"

	BLOCK_TEMP_DEFAULT       = "ui/html/default.html"
	BLOCK_TEMP_ACCESS_DENIED = "ui/html/accessdenied.html"
	BLOCK_TEMP_DASHBOARD     = "ui/html/dashboard.html"

	BLOCK_TEMP_DATABASES = "ui/html/databases.html"

	BLOCK_TEMP_CONSOLE                = "ui/html/console.html"
	BLOCK_TEMP_CONSOLE_REQUEST_ANSWER = "ui/html/termreqanswer.html"

	BLOCK_TEMP_ACCOUNTS                  = "ui/html/accounts.html"
	BLOCK_TEMP_ACCOUNT_CREATE_FORM_OK    = "ui/html/account-create-form-ok.html"
	BLOCK_TEMP_ACCOUNT_CREATE_FORM_LOAD  = "ui/html/account-create-form-load.html"
	BLOCK_TEMP_ACCOUNT_CREATE_FORM_ERROR = "ui/html/account-create-form-error.html"
	BLOCK_TEMP_ACCOUNT_EDIT_FORM_OK      = "ui/html/account-edit-form-ok.html"
	BLOCK_TEMP_ACCOUNT_EDIT_FORM_LOAD    = "ui/html/account-edit-form-load.html"
	BLOCK_TEMP_ACCOUNT_EDIT_FORM_ERROR   = "ui/html/account-edit-form-error.html"
	BLOCK_TEMP_ACCOUNT_BAN_FORM_OK       = "ui/html/account-ban-form-ok.html"
	BLOCK_TEMP_ACCOUNT_BAN_FORM_LOAD     = "ui/html/account-ban-form-load.html"
	BLOCK_TEMP_ACCOUNT_BAN_FORM_ERROR    = "ui/html/account-ban-form-error.html"
	BLOCK_TEMP_ACCOUNT_UNBAN_FORM_OK     = "ui/html/account-unban-form-ok.html"
	BLOCK_TEMP_ACCOUNT_UNBAN_FORM_LOAD   = "ui/html/account-unban-form-load.html"
	BLOCK_TEMP_ACCOUNT_UNBAN_FORM_ERROR  = "ui/html/account-unban-form-error.html"
	BLOCK_TEMP_ACCOUNT_DEL_FORM_OK       = "ui/html/account-del-form-ok.html"
	BLOCK_TEMP_ACCOUNT_DEL_FORM_LOAD     = "ui/html/account-del-form-load.html"
	BLOCK_TEMP_ACCOUNT_DEL_FORM_ERROR    = "ui/html/account-del-form-error.html"
	BLOCK_TEMP_ACCOUNT_SELFEDIT_OK       = "ui/html/selfedit-form-ok.html"
	BLOCK_TEMP_ACCOUNT_SELFEDIT_LOAD     = "ui/html/selfedit-form-load.html"
	BLOCK_TEMP_ACCOUNT_SELFEDIT_ERROR    = "ui/html/selfedit-form-error.html"

	BLOCK_TEMP_SETTINGS = "ui/html/settings.html"
)
View Source
const (
	CONSOLE_TIME_FORMAT = "2006-01-02 15:04:05"
)

Variables

View Source
var MTemplates = make(map[string]*template.Template)

Functions

func IsolatedAuth

func IsolatedAuth(w http.ResponseWriter, r *http.Request, slIRules []gauth.TRole) bool

Isolation of authorization.

func LoadTemplateFromEmbed

func LoadTemplateFromEmbed(sName string) (err error)

func LoadTemplateFromString

func LoadTemplateFromString(sName string, sTemp string) (err error)

func SetUiDirs

func SetUiDirs(emHtmlFS *embed.FS, emStaticFS *embed.FS)

func Shutdown

func Shutdown(ctx context.Context, c *closer.TCloser)

func Start

func Start(stCfg *config.TConfig)

Types

type TIsolatedFS

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

func (TIsolatedFS) Open

func (ifs TIsolatedFS) Open(sPath string) (f http.File, err error)

type TViewAccountsTable

type TViewAccountsTable struct {
	System      bool
	Superuser   bool
	Baned       bool
	Login       string
	Status      string
	Roles       string
	Description string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL