dgtk: github.com/dynport/dgtk/confirm Index | Files

package confirm

import "github.com/dynport/dgtk/confirm"

Index

Package Files

action.go confirm.go ego.go webdiff.go

Constants

const (
    TypeCreate = iota + 1
    TypeUpdate
    TypeDelete
)

func ActionsDiff Uses

func ActionsDiff(w io.Writer, ctx *ActionsDiffCtx) error

func ConfirmHTML Uses

func ConfirmHTML(actions ...*Action) error

func ConfirmShell Uses

func ConfirmShell(actions ...*Action) error

func WebDiff Uses

func WebDiff(actions []*Action) (chan bool, error)

type Action Uses

type Action struct {
    Title string
    Diff  []byte
    Type  Type
    Call  ActionFunc
}

func New Uses

func New(t Type, title string, diff []byte, f ActionFunc) *Action

func NewCreate Uses

func NewCreate(title string, diff []byte, f ActionFunc) *Action

func NewDelete Uses

func NewDelete(title string, diff []byte, f ActionFunc) *Action

func NewUpdate Uses

func NewUpdate(title string, diff []byte, f ActionFunc) *Action

func (*Action) String Uses

func (s *Action) String() string

type ActionFunc Uses

type ActionFunc func() error

type Actions Uses

type Actions []*Action

func (*Actions) Create Uses

func (list *Actions) Create(title string, diff []byte, f ActionFunc)

func (*Actions) Delete Uses

func (list *Actions) Delete(title string, diff []byte, f ActionFunc)

func (Actions) Exec Uses

func (list Actions) Exec() error

func (Actions) String Uses

func (list Actions) String() string

func (*Actions) Update Uses

func (list *Actions) Update(title string, diff []byte, f ActionFunc)

type ActionsDiffCtx Uses

type ActionsDiffCtx struct {
    Actions []*Action
}

func (*ActionsDiffCtx) ActionString Uses

func (ctx *ActionsDiffCtx) ActionString(a *Action) string

func (*ActionsDiffCtx) ColorizeDiff Uses

func (a *ActionsDiffCtx) ColorizeDiff(in []byte) string

type Type Uses

type Type int

Package confirm imports 12 packages (graph) and is imported by 1 packages. Updated 2016-07-27. Refresh now. Tools for package owners.