portapps

package
v0.0.0-...-1f62197 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Log represents an active zerolog object
	Log *zerolog.Logger
)

Functions

This section is empty.

Types

type App

type App struct {
	ID   string
	Name string
	Args []string

	RootPath   string
	AppPath    string
	DataPath   string
	WorkingDir string
	Process    string
	// contains filtered or unexported fields
}

App represents an active app object

func New

func New(id string, name string) (app *App, err error)

New creates new app instance

func NewWithCfg

func NewWithCfg(id string, name string, appcfg interface{}) (app *App, err error)

NewWithCfg creates new app instance with an app config

func (*App) ErrorBox

func (app *App) ErrorBox(msg interface{})

ErrorBox display an error message box

func (*App) FatalBox

func (app *App) FatalBox(msg interface{})

FatalBox display an error message box and exit

func (*App) Launch

func (app *App) Launch(args []string)

Launch to execute the app with additional args

type Common

type Common struct {
	Args []string          `yaml:"args" mapstructure:"cmd_switches"`
	Env  map[string]string `yaml:"env" mapstructure:"env"`
}

Common holds common configuration data

type Config

type Config struct {
	Common Common      `yaml:"common" mapstructure:"common"`
	App    interface{} `yaml:"app,omitempty" mapstructure:"app"`
}

Config holds portapp configuration details

type LogHook

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

LogHook is a logging hook for zerolog

func (LogHook) Run

func (h LogHook) Run(e *zerolog.Event, level zerolog.Level, msg string)

Run logging hook

Jump to

Keyboard shortcuts

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