Documentation
¶
Index ¶
- Constants
- func Error(w http.ResponseWriter, r *http.Request, code int, text string) error
- func HXRequest(r *http.Request) bool
- func Info(w http.ResponseWriter, r *http.Request, code int, text string) error
- func Success(w http.ResponseWriter, r *http.Request, code int, text string) error
- func Warning(w http.ResponseWriter, r *http.Request, code int, text string) error
- type Message
- type MessageType
Constants ¶
View Source
const ( TypeInfo = MessageType("info") TypeSuccess = MessageType("success") TypeError = MessageType("error") TypeWarning = MessageType("warning") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct {
Code int `json:"code"`
Text string `json:"text"`
Type MessageType `json:"type"`
}
func ErrorMessage ¶
func InfoMessage ¶
func NewMessage ¶
func NewMessage(code int, text string, typ MessageType) Message
func SuccessMessage ¶
func WarningMessage ¶
type MessageType ¶
type MessageType string
func (MessageType) Class ¶ added in v0.2.7
func (t MessageType) Class() string
func (MessageType) Icon ¶
func (t MessageType) Icon() string
Click to show internal directories.
Click to hide internal directories.