messages

package
v0.0.0-...-3eee703 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package messages contains messages which can be displayed on either success or failure pages

Index

Constants

View Source
const (
	EndpointSuccess MessageEndpoint = "success"
	EndpointFail    MessageEndpoint = "fail"

	MsgContact  MessageType = "contact"
	MsgAddress  MessageType = "address"
	MsgNotFound MessageType = "notfound"
	MsgGeneric  MessageType = "generic"
)

Variables

This section is empty.

Functions

func Compile

func Compile(emailAddress *mail.Address)

Compile compiles the messages for the application with the email address provided

func RoutingRegexString

func RoutingRegexString() string

RoutingRegexString returns the regular expression to match for status endoints

Types

type AlertMsg

type AlertMsg struct {
	Title      string
	Image      string
	Header     string
	Message    template.HTML
	Kind       string
	HttpStatus int
}

AlertMsg is the object which can be passed down to the status template

func Get

func Get(endpoint string, kind string) (msg *AlertMsg)

Get returns the message of kind for the specified endpoint If it cannot find the specified combination, it returns fail/generic

type MessageEndpoint

type MessageEndpoint string

type MessageType

type MessageType string

Jump to

Keyboard shortcuts

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