support

package
v0.0.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthLoginPage

func AuthLoginPage(location string, s Refiber) error

func AuthRedirection

func AuthRedirection(s Refiber, location string) error

func AuthRedirectionWithMessage

func AuthRedirectionWithMessage(s Refiber, location string, messageType MessageType, message string) error

func GetSharedMap

func GetSharedMap(session *session.Session) *fiber.Map

TODO: make this customizeable

func NewSupport

func NewSupport(session *session.Store, validate *validator.Validate, translator *ut.Translator) *support

Types

type MessageType

type MessageType string
const (
	MessageTypeInfo    MessageType = "info"
	MessageTypeError   MessageType = "error"
	MessageTypeWarning MessageType = "warning"
	MessageTypeSuccess MessageType = "success"
)

type Refiber

type Refiber interface {
	Render() *render
	Validate(s interface{}) error
	CreateValidationErrors(fields []*ValidationErrorField) error
	NewAuthenticatedUserSession(user interface{}) error
	UpdateAuthenticatedUserSession(user interface{}) error
	GetAuthenticatedUserSession(user interface{}) error
	DestroyAuthenticatedUserSession() error
	GetSession() *session.Store
	GetValidate() *validator.Validate
	GetTranslator() *ut.Translator
	Redirect() *redirect
	GetCtx() *fiber.Ctx
}

type ValidationErrorField

type ValidationErrorField struct {
	Name    string
	Message string
}

Jump to

Keyboard shortcuts

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