action

package
v0.0.0-...-32759e4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MPL-2.0 Imports: 5 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 {
	Id() string
	Key() string
	Type() string
	Columns() string
	Condition() *bool
	MayFail() bool
	IsValid() 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 Dir

type Dir struct {
	Path  string `json:"path" hcl:"path,label"`
	Owner string `json:"owner" hcl:"owner,optional"`
	Group string `json:"group" hcl:"group,optional"`
	Mode  string `json:"mode" hcl:"mode,optional"`
}

func NewDir

func NewDir() *Dir

func (*Dir) Columns

func (d *Dir) Columns() string

func (*Dir) Condition

func (d *Dir) Condition() *bool

func (*Dir) Id

func (d *Dir) Id() string

func (*Dir) IsValid

func (d *Dir) IsValid() bool

func (*Dir) Key

func (d *Dir) Key() string

func (*Dir) MayFail

func (d *Dir) MayFail() bool

func (*Dir) Type

func (d *Dir) Type() string

type File

type File struct {
	Path  string `json:"path" hcl:"path,label"`
	Owner string `json:"owner" hcl:"owner,optional"`
	Group string `json:"group" hcl:"group,optional"`
	Mode  string `json:"mode" hcl:"mode,optional"`

	Digest string `json:"digest"`
	Offset int    `json:"offset"`
	Csize  int    `json:"csize"`
	Size   int    `json:"size"`
}

func NewFile

func NewFile() *File

func NewSignature

func NewSignature() *File

func (*File) Columns

func (f *File) Columns() string

func (*File) Condition

func (f *File) Condition() *bool

func (*File) Id

func (f *File) Id() string

func (*File) IsValid

func (f *File) IsValid() bool

func (*File) Key

func (f *File) Key() string

func (*File) MayFail

func (f *File) MayFail() bool

func (*File) Type

func (f *File) Type() string

type Manifest

type Manifest struct {
	Zpkg *Zpkg `hcl:"Zpkg,block" json:"zpkg"`

	Tags []*Tag `hcl:"Tag,block" json:"tag,omitempty"`

	Requirements []*Requirement `hcl:"Requirement,block" json:"requirement,omitempty"`

	Dirs     []*Dir     `hcl:"Dir,block" json:"dir,omitempty"`
	Files    []*File    `hcl:"File,block" json:"file,omitempty"`
	SymLinks []*SymLink `hcl:"SymLink,block" json:"symlink,omitempty"`

	Templates []*Template `hcl:"Template,block" json:"template,omitempty"`

	Services []*Service `hcl:"Service,block" json:"service,omitempty"`

	Signatures []*Signature `hcl:"Signature,block" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func NewManifest

func NewManifest() *Manifest

func (*Manifest) Actions

func (m *Manifest) Actions() Actions

func (*Manifest) Add

func (m *Manifest) Add(action Action)

func (*Manifest) Exists

func (m *Manifest) Exists(action Action) bool

func (*Manifest) Index

func (m *Manifest) Index()

func (*Manifest) Load

func (m *Manifest) Load(manifest string) error

func (*Manifest) Section

func (m *Manifest) Section(filters ...string) Actions

func (*Manifest) ToJson

func (m *Manifest) ToJson() string

func (*Manifest) ToSigningJson

func (m *Manifest) ToSigningJson() string

func (*Manifest) Validate

func (m *Manifest) Validate() error

type Requirement

type Requirement struct {
	Name      string `json:"name" hcl:"name,label"`
	Method    string `json:"method" hcl:"method"`
	Operation string `json:"operation,omitempty" hcl:"operation"`
	Version   string `json:"version,omitempty" hcl:"version,optional"`
}

func NewRequirement

func NewRequirement() *Requirement

func (*Requirement) Columns

func (r *Requirement) Columns() string

func (*Requirement) Condition

func (r *Requirement) Condition() *bool

func (*Requirement) Id

func (r *Requirement) Id() string

func (*Requirement) IsValid

func (r *Requirement) IsValid() bool

func (*Requirement) Key

func (r *Requirement) Key() string

func (*Requirement) MayFail

func (r *Requirement) MayFail() bool

func (*Requirement) Type

func (r *Requirement) Type() string

type Service

type Service struct {
	Name  string `json:"name" hcl:"name,label"`
	Timer bool   `json:"timer" hcl:"timer,optional"`
}

func NewService

func NewService() *Service

func (*Service) Columns

func (s *Service) Columns() string

func (*Service) Condition

func (s *Service) Condition() *bool

func (*Service) Id

func (s *Service) Id() string

func (*Service) IsValid

func (s *Service) IsValid() bool

func (*Service) Key

func (s *Service) Key() string

func (*Service) MayFail

func (s *Service) MayFail() bool

func (*Service) Type

func (s *Service) Type() string

type Signature

type Signature struct {
	FingerPrint string `json:"fingerprint"`
	Algo        string `json:"algo"`
	Value       string `json:"value"`
}

func (*Signature) Columns

func (s *Signature) Columns() string

func (*Signature) Condition

func (s *Signature) Condition() *bool

func (*Signature) Id

func (s *Signature) Id() string

func (*Signature) IsValid

func (s *Signature) IsValid() bool

func (*Signature) Key

func (s *Signature) Key() string

func (*Signature) MayFail

func (s *Signature) MayFail() bool

func (*Signature) Type

func (s *Signature) Type() string
type SymLink struct {
	Path   string `json:"path" hcl:"path,label"`
	Owner  string `json:"owner" hcl:"owner,optional"`
	Group  string `json:"group" hcl:"group,optional"`
	Target string `json:"target" hcl:"target"`
}
func NewSymLink() *SymLink

func (*SymLink) Columns

func (s *SymLink) Columns() string

func (*SymLink) Condition

func (s *SymLink) Condition() *bool

func (*SymLink) Id

func (s *SymLink) Id() string

func (*SymLink) IsValid

func (s *SymLink) IsValid() bool

func (*SymLink) Key

func (s *SymLink) Key() string

func (*SymLink) MayFail

func (s *SymLink) MayFail() bool

func (*SymLink) Type

func (s *SymLink) Type() string

type Tag

type Tag struct {
	Name  string `json:"name" hcl:"name,label"`
	Value string `json:"value" hcl:"value"`
}

func NewTag

func NewTag() *Tag

func (*Tag) Columns

func (t *Tag) Columns() string

func (*Tag) Condition

func (t *Tag) Condition() *bool

func (*Tag) Id

func (t *Tag) Id() string

func (*Tag) IsValid

func (t *Tag) IsValid() bool

func (*Tag) Key

func (t *Tag) Key() string

func (*Tag) MayFail

func (t *Tag) MayFail() bool

func (*Tag) Type

func (t *Tag) Type() string

type Template

type Template struct {
	Name   string `json:"name" hcl:"path,label"`
	Source string `json:"source" hcl:"source"`
	Output string `json:"output" hcl:"output"`

	Owner string `json:"owner" hcl:"owner,optional"`
	Group string `json:"group" hcl:"group,optional"`
	Mode  string `json:"mode" hcl:"mode,optional"`
}

func NewTemplate

func NewTemplate() *Template

func (*Template) Columns

func (t *Template) Columns() string

func (*Template) Condition

func (t *Template) Condition() *bool

func (*Template) Id

func (t *Template) Id() string

func (*Template) IsValid

func (t *Template) IsValid() bool

func (*Template) Key

func (t *Template) Key() string

func (*Template) MayFail

func (t *Template) MayFail() bool

func (*Template) Type

func (t *Template) Type() string

type Zpkg

type Zpkg struct {
	Name        string `json:"name" hcl:"name,label"`
	Version     string `json:"version" hcl:"version"`
	Publisher   string `json:"publisher" hcl:"publisher"`
	Arch        string `json:"arch" hcl:"arch"`
	Os          string `json:"os" hcl:"os"`
	Summary     string `json:"summary" hcl:"summary"`
	Description string `json:"description" hcl:"description"`
}

func NewZpkg

func NewZpkg() *Zpkg

func (*Zpkg) Columns

func (z *Zpkg) Columns() string

func (*Zpkg) Condition

func (z *Zpkg) Condition() *bool

func (*Zpkg) Id

func (z *Zpkg) Id() string

func (*Zpkg) IsValid

func (z *Zpkg) IsValid() bool

func (*Zpkg) Key

func (z *Zpkg) Key() string

func (*Zpkg) MayFail

func (z *Zpkg) MayFail() bool

func (*Zpkg) Type

func (z *Zpkg) Type() string

Jump to

Keyboard shortcuts

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