modelgeneration

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client provides methods that the Juju client command uses to interact with models stored in the Juju Server.

func NewClient

func NewClient(st base.APICallCloser) *Client

NewClient creates a new `Client` based on an existing authenticated API connection.

func (*Client) AbortBranch

func (c *Client) AbortBranch(branchName string) error

Abort aborts an existing branch to the model.

func (*Client) AddBranch

func (c *Client) AddBranch(branchName string) error

AddBranch adds a new branch to the model.

func (*Client) BranchInfo

func (c *Client) BranchInfo(
	branchName string, detailed bool, formatTime func(time.Time) string,
) (model.GenerationSummaries, error)

BranchInfo returns information about "in-flight" branches. If a non-empty string is supplied for branch name, then only information for that branch is returned. Supplying true for detailed returns extra unit detail for the branch.

func (*Client) CommitBranch

func (c *Client) CommitBranch(branchName string) (int, error)

CommitBranch commits the branch with the input name to the model, effectively completing it and applying all branch changes across the model. The new generation ID of the model is returned.

func (*Client) HasActiveBranch

func (c *Client) HasActiveBranch(branchName string) (bool, error)

HasActiveBranch returns true if the model has an "in-flight" branch with the input name.

func (*Client) ListCommits

func (c *Client) ListCommits() (model.GenerationCommits, error)

ListCommits returns the details of all committed model branches.

func (*Client) ShowCommit

func (c *Client) ShowCommit(generationId int) (model.GenerationCommit, error)

ShowCommit details of the branch with the input generation ID.

func (*Client) TrackBranch

func (c *Client) TrackBranch(branchName string, entities []string, numUnits int) error

TrackBranch sets the input units and/or applications to track changes made under the input branch name.

Jump to

Keyboard shortcuts

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