flash

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flash

type Flash struct {
	Persistent  bool          `json:"persistent"`
	Sticky      bool          `json:"sticky"`
	EntityKey   string        `json:"entity_key"`
	ID          string        `json:"id"`
	Text        string        `json:"text"`
	Actions     []FlashAction `json:"actions"`
	Type        FlashLevel    `json:"type"`
	OnceOnlyKey string        `json:"once_only_key"`
}

func (*Flash) Add

func (this *Flash) Add(ctx context.Context) (context.Context, error)

type FlashAction

type FlashAction struct {
	Url  string
	Text string
}

type FlashLevel

type FlashLevel int
const (
	Warn FlashLevel = 1 + iota
	Success
	Info
)

type Flashable

type Flashable interface {
	PersistFlash(context.Context, Flash) error
}

type Flashes

type Flashes []Flash

func (*Flashes) Scan

func (this *Flashes) Scan(value interface{}) error

func (Flashes) Value

func (this Flashes) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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