flash

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlashMessage

func FlashMessage(c *rex.Context, message string, messageType ...FlashMessageType) error

Helper fucntion to set a flash message in session. default messageType is error.

func FlashMessageMiddleware

func FlashMessageMiddleware() rex.Middleware

FlashMessageMiddleware is a middleware that sets the flash message in the context

Types

type Flash

type Flash struct {
	Message string // Message for the flash
	Type    string // success, info, warning, error
}

Flash message types

type FlashMessageType

type FlashMessageType int
const (
	MessageSuccess FlashMessageType = iota
	MessageInfo
	MessageWarning
	MessageError
)

Jump to

Keyboard shortcuts

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