bootstrap

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(o Options) (err error)

Run runs the bootstrap

Types

type AdaptAstilectron added in v0.5.0

type AdaptAstilectron func(a *astilectron.Astilectron)

AdaptAstilectron is a function that adapts astilectron

type AdaptRouter added in v0.5.0

type AdaptRouter func(r *httprouter.Router)

AdaptRouter is a function that adapts the router

type AdaptWindow added in v0.5.0

type AdaptWindow func(w *astilectron.Window)

AdaptWindow is a function that adapts the window

type CustomProvision

type CustomProvision func(baseDirectoryPath string) error

CustomProvision is a function that executes custom provisioning

type MessageHandler added in v0.5.0

type MessageHandler func(w *astilectron.Window, m MessageIn)

MessageHandler is a functions that handles messages

type MessageIn added in v0.5.0

type MessageIn struct {
	Name    string          `json:"name"`
	Payload json.RawMessage `json:"payload"`
}

MessageIn represents a message going in

type MessageOut added in v0.5.0

type MessageOut struct {
	Name    string      `json:"name"`
	Payload interface{} `json:"payload"`
}

MessageOut represents a message going out

type Options

type Options struct {
	AdaptAstilectron   AdaptAstilectron
	AdaptRouter        AdaptRouter
	AdaptWindow        AdaptWindow
	AstilectronOptions astilectron.Options
	BaseDirectoryPath  string
	CustomProvision    CustomProvision
	Debug              bool
	Homepage           string
	MessageHandler     MessageHandler
	RestoreAssets      RestoreAssets
	TemplateData       TemplateData
	WindowOptions      *astilectron.WindowOptions
}

Options represents options

type RestoreAssets

type RestoreAssets func(dir, name string) error

RestoreAssets is a function that restores assets namely the go-bindata's RestoreAssets method

type TemplateData

type TemplateData func(name string, r *http.Request, p httprouter.Params) (d interface{}, err error)

TemplateData is a function that retrieves a template's data

Jump to

Keyboard shortcuts

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