views

package
v0.0.0-...-900bee6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlertLevelSuccess = "success"
	AlertLevelDanger  = "danger"
	AlertLevelWarning = "warning"

	AlertGenericMsg = "Something went wrong. Please try again. If the problem persists, contact support@gocookit.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Level string
	Msg   string
}

type Alerter

type Alerter interface {
	Alert() string
}

type Data

type Data struct {
	Alert *Alert
	User  *models.User
	Yield interface{}
}

func (*Data) SetAlertDanger

func (d *Data) SetAlertDanger(err error)

func (*Data) SetSuccess

func (d *Data) SetSuccess(msg string)

type View

type View struct {
	// contains filtered or unexported fields
}

func NewView

func NewView(content string) *View

func (*View) Render

func (v *View) Render(rw http.ResponseWriter, r *http.Request, data interface{})

func (*View) ServeHTTP

func (v *View) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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