msg

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Danger

func Danger(ctx echo.Context, message string)

Danger sets a danger flash message

func Get

func Get(ctx echo.Context, typ Type) []string

Get gets flash messages of a given type from the session storage Errors will logged and not returned

func Info

func Info(ctx echo.Context, message string)

Info sets an info flash message

func Set

func Set(ctx echo.Context, typ Type, message string)

Set adds a new flash message of a given type into the session storage Errors will logged and not returned

func Success

func Success(ctx echo.Context, message string)

Success sets a success flash message

func Warning

func Warning(ctx echo.Context, message string)

Warning sets a warning flash message

Types

type Type

type Type string

Type is a message type

const (
	// TypeSuccess represents a success message type
	TypeSuccess Type = "success"

	// TypeInfo represents a info message type
	TypeInfo Type = "info"

	// TypeWarning represents a warning message type
	TypeWarning Type = "warning"

	// TypeDanger represents a danger message type
	TypeDanger Type = "danger"
)

Jump to

Keyboard shortcuts

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