manifest

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(path string) (result upstream.Guard, err error)

Types

type GitOptions

type GitOptions struct {
	Name     string
	Username string
	Token    string
	Email    string
}

type Manifest

type Manifest struct {
	Name           string   `toml:"name,omitempty"`
	BootstrapPeers []string `toml:"bootstrap_peers,omitempty"`
	ClusterKey     string   `toml:"cluster_key,omitempty"`
	Replications   int64    `toml:"replications,omitempty"`
	StatsNode      string   `toml:"stats_node,omitempty"`
	// contains filtered or unexported fields
}

func Init

func Init(path, url string, opts GitOptions) (*Manifest, error)

Init Clones/Pulls a Manifest Repository and Parses the Config

func (*Manifest) Commit

func (m *Manifest) Commit(path, commitMessage string) (err error)

Commit performs a git commit on the repository.

func (*Manifest) CreateBranch

func (m *Manifest) CreateBranch(branchName string) (err error)

CreateBranch creates a new branch within the input repository.

func (*Manifest) Decode

func (m *Manifest) Decode() error

Decode Manifest Configuration from Manifest Repository

func (*Manifest) Fork

func (m *Manifest) Fork() error

func (*Manifest) Generate

func (m *Manifest) Generate(input map[string]string) (string, error)

func (*Manifest) GetBranchName

func (m *Manifest) GetBranchName() (name string, err error)

GetBranchName returns the name of the current branch.

func (*Manifest) HaveWriteAccess

func (m *Manifest) HaveWriteAccess() (bool, error)

func (*Manifest) OpenPR

func (m *Manifest) OpenPR(mainBranch, prTitle, prBody string) error

func (*Manifest) Pull

func (m *Manifest) Pull() error

Pull Performs a git pull on the repository

func (*Manifest) PullBranch

func (m *Manifest) PullBranch(branchName string) (err error)

PullBranch attempts to pull the branch from the git origin fork.

func (*Manifest) Push

func (m *Manifest) Push() (err error)

Push performs a "git push" on the repository.

func (*Manifest) Search

func (m *Manifest) Search(path string) (map[string][]string, error)

func (*Manifest) SearchPrByBranch

func (m *Manifest) SearchPrByBranch(branchName string) error

func (*Manifest) SwitchBranch

func (m *Manifest) SwitchBranch(branchName string) (err error)

SwitchBranch switches from the current branch to the one with the name provided.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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