directives

package
v0.0.0-...-a50e6fe Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDirectiveFile         = errors.New("Invalid directive file")
	ErrImportInvalidDirectiveFormat = errors.New("Directive file is importing using an invalid format")
	ErrDirectiveAlreadyImported     = errors.New("Directive already imported")
	ErrDirectiveNotFound            = errors.New("Directive not found")
	ErrDirectiveInvalidCore         = errors.New("Invalid directive (from the core)")
	ErrDirectiveCoreCantMove        = errors.New("Can't move core directives")
	ErrStackInvalidIndex            = errors.New("Invalid index")
)

Functions

This section is empty.

Types

type Directive

type Directive struct {
	Name       string
	Setup      string
	ImportPath string
	Active     bool
	Core       bool
	Removed    bool
}

Directive ...

type DirectiveList

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

DirectiveList ...

func (*DirectiveList) AddDirective

func (d *DirectiveList) AddDirective(name string, source string) error

func (*DirectiveList) DisableDirective

func (d *DirectiveList) DisableDirective(name string) error

func (*DirectiveList) EnableDirective

func (d *DirectiveList) EnableDirective(name string) error

func (*DirectiveList) List

func (d *DirectiveList) List() []Directive

func (*DirectiveList) LoadList

func (d *DirectiveList) LoadList() error

func (*DirectiveList) MoveDirective

func (d *DirectiveList) MoveDirective(name string, index int) error

func (*DirectiveList) RemoveDirective

func (d *DirectiveList) RemoveDirective(name string) error

func (*DirectiveList) Reset

func (d *DirectiveList) Reset()

func (*DirectiveList) Save

func (d *DirectiveList) Save() error

type Manager

type Manager interface {
	LoadList() error
	List() []Directive
	AddDirective(string, string) error
	RemoveDirective(string) error
	EnableDirective(string) error
	DisableDirective(string) error
	MoveDirective(string, int) error
	Save() error
	Reset()
}

Manager ...

func NewFrom

func NewFrom(file string) (Manager, error)

Load ...

Jump to

Keyboard shortcuts

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