models

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageBuildsForProvider

func GetImageBuildsForProvider(provider string) ([]types.ImageBuild, error)

func NewImage

func NewImage(imageID string, imageName string, createdAt time.Time, env types.Environment) types.Image

Types

type BuildBlock

type BuildBlock struct {
	Name        string   `hcl:"name,optional"`
	Description string   `hcl:"description,optional"`
	FromSources []string `hcl:"sources,optional"`
	Config      hcl.Body `hcl:",remain"`
}

type Image

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

func (*Image) CreatedAt

func (i *Image) CreatedAt() string

func (*Image) Destroy added in v0.4.0

func (i *Image) Destroy() error

func (*Image) Environment

func (i *Image) Environment() types.Environment

func (*Image) ID

func (i *Image) ID() string

func (*Image) Launch

func (i *Image) Launch(imageLaunchOptions types.ImageLaunchOptions) error

func (*Image) MarshalJSON added in v0.5.0

func (i *Image) MarshalJSON() ([]byte, error)

func (*Image) Name

func (i *Image) Name() string

func (*Image) Profile added in v0.4.0

func (i *Image) Profile() types.Profile

func (*Image) Provider added in v0.4.0

func (i *Image) Provider() types.Provider

type ImageBuild

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

func NewImageBuild

func NewImageBuild(buildPath, provider, provisioner string) *ImageBuild

func (*ImageBuild) Build

func (b *ImageBuild) Build() error

func (*ImageBuild) MarshalJSON added in v0.5.0

func (b *ImageBuild) MarshalJSON() ([]byte, error)

func (*ImageBuild) Name

func (b *ImageBuild) Name() string

func (*ImageBuild) ProviderType

func (b *ImageBuild) ProviderType() string

func (*ImageBuild) Provisioner

func (b *ImageBuild) Provisioner() string

type Machine

type Machine struct {
	InstanceName       string             `json:"name"`
	InstanceID         string             `json:"id"`
	CurrentUpTime      time.Duration      `json:"up_time"`
	InstanceType       string             `json:"type"`
	PublicIPAddresses  []string           `json:"public_ip_addresses"`
	PrivateIPAddresses []string           `json:"private_ip_addresses"`
	CurrentState       types.MachineState `json:"current_state"`
	Env                types.Environment  `json:"-"`
}

func (*Machine) Cmd added in v0.3.2

func (m *Machine) Cmd(user string, privateIP bool, cmdArgs ...string) (string, error)

func (*Machine) Destroy added in v0.4.0

func (m *Machine) Destroy() error

func (*Machine) Environment

func (m *Machine) Environment() types.Environment

func (*Machine) ExecSSH

func (m *Machine) ExecSSH(user string, privateIP bool, cmdArgs ...string) error

func (*Machine) ID

func (m *Machine) ID() string

func (*Machine) IPAddress

func (m *Machine) IPAddress() string

func (*Machine) Name

func (m *Machine) Name() string

func (*Machine) NewSSHSession

func (m *Machine) NewSSHSession(user string, privateIP bool) (*ssh_util.Session, error)

func (*Machine) PrivateIPAddress added in v0.5.5

func (m *Machine) PrivateIPAddress() string

func (*Machine) Profile added in v0.3.2

func (m *Machine) Profile() types.Profile

func (*Machine) Provider added in v0.3.2

func (m *Machine) Provider() types.Provider

func (*Machine) Restart

func (m *Machine) Restart() error

func (*Machine) Start

func (m *Machine) Start() error

func (*Machine) StartVNC

func (m *Machine) StartVNC(user string, privateIP bool, killVNC bool) error

func (*Machine) State

func (m *Machine) State() string

func (*Machine) Stop

func (m *Machine) Stop() error

func (*Machine) Type added in v0.3.2

func (m *Machine) Type() string

func (*Machine) UpTime added in v0.3.2

func (m *Machine) UpTime() time.Duration

type PackerConfig

type PackerConfig struct {
	Source SourceBlock `hcl:"source,block"`
	Build  BuildBlock  `hcl:"build,block"`
}

type Project added in v0.4.0

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

func NewProject added in v0.4.0

func NewProject(buildPath string) *Project

func (*Project) AddMachine added in v0.4.0

func (d *Project) AddMachine(machine *types.ProjectMachine, noApply bool) error

func (*Project) GetConfig added in v0.4.0

func (d *Project) GetConfig() (*types.ProjectConfig, error)

func (*Project) MarshalJSON added in v0.5.0

func (d *Project) MarshalJSON() ([]byte, error)

func (*Project) Name added in v0.4.0

func (d *Project) Name() string

func (*Project) SaveConfig added in v0.4.0

func (d *Project) SaveConfig() error

func (*Project) TerraformApply added in v0.4.0

func (d *Project) TerraformApply() error

type SourceBlock

type SourceBlock struct {
	Type   string   `hcl:"type,label"`
	Name   string   `hcl:"name,label"`
	Config hcl.Body `hcl:",remain"`
}

Jump to

Keyboard shortcuts

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