flash

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 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) error

func (*Flash) Scan added in v0.0.30

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

func (Flash) Value added in v0.0.30

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

type FlashAction

type FlashAction struct {
	Url  string
	Text string
}

type FlashLevel

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

func (*FlashLevel) FromString added in v0.0.31

func (this *FlashLevel) FromString(in string) error

func (FlashLevel) Label added in v0.0.31

func (this FlashLevel) Label() string

func (FlashLevel) Levels added in v0.0.31

func (this FlashLevel) Levels() []FlashLevel

type Flashable

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

type Flashes

type Flashes []Flash

func (*Flashes) Add added in v0.0.18

func (this *Flashes) Add(flash Flash) 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