action

package
v0.0.0-...-aa01b92 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Key() string
	Unique() string
	Columns() string
	Type() string
	Valid() bool
}

type Actions

type Actions []Action

func (Actions) Len

func (slice Actions) Len() int

func (Actions) Less

func (slice Actions) Less(i, j int) bool

func (Actions) Swap

func (slice Actions) Swap(i, j int)

type Build

type Build struct {
	TargetPath string `hcl:"target_path"`
	WorkPath   string `hcl:"work_path"`
	OutPath    string `hcl:"out_path"`
	FileUser   string `hcl:"file_user"`
	FileGroup  string `hcl:"file_group"`
	Rpm        bool
	Deb        bool
}

func NewBuild

func NewBuild() *Build

func (*Build) Columns

func (b *Build) Columns() string

func (*Build) Key

func (b *Build) Key() string

func (*Build) Type

func (b *Build) Type() string

func (*Build) Unique

func (b *Build) Unique() string

func (*Build) Valid

func (b *Build) Valid() bool

type Config

type Config struct {
	Actions Actions
	Af      *ast.File
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) Add

func (c *Config) Add(action Action)

func (*Config) Index

func (c *Config) Index()

func (*Config) Json

func (c *Config) Json() string

func (*Config) Load

func (c *Config) Load(ahcl string) error

func (*Config) LoadBuild

func (c *Config) LoadBuild() error

func (*Config) LoadPkg

func (c *Config) LoadPkg() error

func (*Config) LoadRequirement

func (c *Config) LoadRequirement() error

func (*Config) Section

func (c *Config) Section(filters ...string) []Action

func (*Config) Sort

func (c *Config) Sort()

type JsonConfig

type JsonConfig struct {
	Pkg         []Action `json:"pkg"`
	Requirement []Action `json:"requirement"`
}

type Pkg

type Pkg struct {
	Name        string `json:"name"`
	Arch        string `json:"arch"`
	Description string `json:"description"`
	Vendor      string `json:"vendor"`
	Maintainer  string `json:"maintainer"`
	Url         string `json:"url"`
	License     string `json:"license"`
	Version     string `json:"version"`
	Iteration   string `json:"iteration"`
	Branch      string `json:"branch"`
	VcsRevision string `json:"vcs_revision" hcl:"vcs_revision"`
}

func NewPkg

func NewPkg() *Pkg

func (*Pkg) Columns

func (p *Pkg) Columns() string

func (*Pkg) Key

func (p *Pkg) Key() string

func (*Pkg) Type

func (p *Pkg) Type() string

func (*Pkg) Unique

func (p *Pkg) Unique() string

func (*Pkg) Valid

func (p *Pkg) Valid() bool

func (*Pkg) Validate

func (p *Pkg) Validate() error

type Requirement

type Requirement struct {
	Name      string `json:"name"`
	Method    string `json:"method"`
	Operation string `json:"operation"`
	Version   string `json:"version"`
}

func NewRequirement

func NewRequirement() *Requirement

func (*Requirement) Columns

func (r *Requirement) Columns() string

func (*Requirement) Key

func (r *Requirement) Key() string

func (*Requirement) Type

func (r *Requirement) Type() string

func (*Requirement) Unique

func (r *Requirement) Unique() string

func (*Requirement) Valid

func (r *Requirement) Valid() bool

func (*Requirement) Validate

func (r *Requirement) Validate() error

Jump to

Keyboard shortcuts

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