httpoo_ctrl

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionUsers = "users"
)

Variables

View Source
var (
	EmptyTemplateError = errors.New("empty-template")
)

Functions

func DownloadTemplates

func DownloadTemplates(targetDir string) ([]string, []error)

Types

type AppCommands added in v0.1.1

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

func NewAppCommands added in v0.1.1

func NewAppCommands(defConfig *httpoo_types.Database) *AppCommands

func (*AppCommands) Execute added in v0.1.1

func (instance *AppCommands) Execute(filename string, params interface{}, dbConfig *httpoo_types.Database) (interface{}, error)

type AppSecure

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

func NewAppSecure

func NewAppSecure(mode string, dirWork string, l *httpoo_commons.Logger) *AppSecure

func (*AppSecure) Auth0

func (instance *AppSecure) Auth0() *lygo_ext_auth0.Auth0

func (*AppSecure) Enabled

func (instance *AppSecure) Enabled() bool

func (*AppSecure) Settings

func (instance *AppSecure) Settings() *lygo_ext_auth0.Auth0Config

func (*AppSecure) Start

func (instance *AppSecure) Start() error

func (*AppSecure) Stop

func (instance *AppSecure) Stop()

type AppWebserverAuthenticationDatabase

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

func NewAppWebserverAuthenticationDatabase

func NewAppWebserverAuthenticationDatabase(config *lygo_ext_auth0.Auth0ConfigStorage, collection string) *AppWebserverAuthenticationDatabase

func (*AppWebserverAuthenticationDatabase) ConfirmUser

func (instance *AppWebserverAuthenticationDatabase) ConfirmUser(authId string) (map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) CreateNewUser

func (instance *AppWebserverAuthenticationDatabase) CreateNewUser(authResponse *lygo_ext_auth0.Auth0Response, payload map[string]interface{}) (map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) GetUser

func (instance *AppWebserverAuthenticationDatabase) GetUser(field string, value interface{}) (map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) GetUserConfirmToken

func (instance *AppWebserverAuthenticationDatabase) GetUserConfirmToken(field string, value interface{}) (string, error)

func (*AppWebserverAuthenticationDatabase) GetUserNotVerified

func (instance *AppWebserverAuthenticationDatabase) GetUserNotVerified(days int) []map[string]interface{}

func (*AppWebserverAuthenticationDatabase) ParseUserFromFile

func (instance *AppWebserverAuthenticationDatabase) ParseUserFromFile(file string) ([]map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) RemoveUser

func (instance *AppWebserverAuthenticationDatabase) RemoveUser(key string) (map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) UpdateUser

func (instance *AppWebserverAuthenticationDatabase) UpdateUser(data map[string]interface{}, passwordChanged bool) (map[string]interface{}, error)

func (*AppWebserverAuthenticationDatabase) UserEmailExists

func (instance *AppWebserverAuthenticationDatabase) UserEmailExists(fieldName, fieldValue string) (bool, error)

type AppWebserverAuthenticationPostman

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

func NewAppWebserverAuthenticationPostman

func NewAppWebserverAuthenticationPostman(dirWork, dirTemplates string, config *httpoo_types.WebServerSettingsAuthenticationPostman) *AppWebserverAuthenticationPostman

func (*AppWebserverAuthenticationPostman) CheckTemplates

func (instance *AppWebserverAuthenticationPostman) CheckTemplates() ([]string, []error)

func (*AppWebserverAuthenticationPostman) GetHtmlTemplate

func (instance *AppWebserverAuthenticationPostman) GetHtmlTemplate(name string, payloads ...map[string]interface{}) (content string, err error)

func (*AppWebserverAuthenticationPostman) SendEmailTemplate

func (instance *AppWebserverAuthenticationPostman) SendEmailTemplate(name, to string, payloads ...map[string]interface{}) (err error)

SendEmailTemplate usage: SendEmailTemplate ("verify", "address@info.com", {"user":"Mario"})

func (*AppWebserverAuthenticationPostman) SendSmsTemplate

func (instance *AppWebserverAuthenticationPostman) SendSmsTemplate(name, to string, payloads ...map[string]interface{}) (response string, err error)

type AuthenticationTemplates

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

func NewAuthenticationTemplates

func NewAuthenticationTemplates(dirWork, dirTemplates string) *AuthenticationTemplates

func (*AuthenticationTemplates) Check

func (instance *AuthenticationTemplates) Check() ([]string, []error)

func (*AuthenticationTemplates) Get

func (instance *AuthenticationTemplates) Get(dir, name string) (string, error)

Get sample: Get("email", "verify.html")

func (*AuthenticationTemplates) Render

func (instance *AuthenticationTemplates) Render(dir, name string, data map[string]interface{}) (string, error)

Render sample: Render("email", "verify.html", {"username":"Mario"})

type Webserver

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

func NewWebserver

func NewWebserver(name, mode string, dirWork string) *Webserver

func (*Webserver) Exit

func (instance *Webserver) Exit()

func (*Webserver) Handle

func (instance *Webserver) Handle(method, endpoint string, handler fiber.Handler)

func (*Webserver) HttpAddress

func (instance *Webserver) HttpAddress() string

func (*Webserver) HttpPath

func (instance *Webserver) HttpPath(path string) string

func (*Webserver) HttpRoot

func (instance *Webserver) HttpRoot() string

func (*Webserver) HttpStaticRoot

func (instance *Webserver) HttpStaticRoot() string

func (*Webserver) Initialize

func (instance *Webserver) Initialize(handlers []httpoo_types.IRouteHandler) error

func (*Webserver) IsEnabled

func (instance *Webserver) IsEnabled() bool

func (*Webserver) LocalUrl

func (instance *Webserver) LocalUrl() string

func (*Webserver) Settings

func (instance *Webserver) Settings() *httpoo_types.WebServerSettings

func (*Webserver) Start

func (instance *Webserver) Start() bool

func (*Webserver) Stop

func (instance *Webserver) Stop()

Jump to

Keyboard shortcuts

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