git

package
v0.0.0-...-8fc2537 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Key is a name of the github plugin variable
	Key      = Namespace("git")
	KeySetup = "Setup"
)

Variables

This section is empty.

Functions

func Clone

func Clone(repo interface{}) (force.Action, error)

Clone executes inner action and posts result of it's execution to github

func Scope

func Scope() (force.Group, error)

Scope returns a new scope with all the functions and structs defined, this is the entrypoint into plugin as far as force is concerned

Types

type CloneAction

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

CloneAction clones repository

func (*CloneAction) Eval

func (p *CloneAction) Eval(ctx force.ExecutionContext) (interface{}, error)

func (*CloneAction) MarshalCode

func (c *CloneAction) MarshalCode(ctx force.ExecutionContext) ([]byte, error)

MarshalCode marshals action into code representation

func (*CloneAction) Type

func (p *CloneAction) Type() interface{}

type Config

type Config struct {
	// Token is an access token
	Token string
	// TokenFile is a path to access token
	TokenFile string
	// User force.StringVar
	User string
	// PrivateKeyFile is a path to SSH private key
	PrivateKeyFile string
	// KnownHostsFile is a file with known_hosts public keys
	KnownHostsFile string
}

Config holds git configuration

func (*Config) Auth

func (cfg *Config) Auth() (transport.AuthMethod, error)

func (*Config) CheckAndSetDefaults

func (cfg *Config) CheckAndSetDefaults() error

type Namespace

type Namespace string

Namespace is a wrapper around string to namespace a variable

type NewClone

type NewClone struct {
}

NewClone creates functions cloning repositories

func (*NewClone) NewInstance

func (n *NewClone) NewInstance(group force.Group) (force.Group, interface{})

NewInstance returns a function that wraps underlying action and tracks the result, posting the result back

type Plugin

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

Plugin is a new plugin

type Repo

type Repo struct {
	URL string
	// Into into dir
	Into string
	// Hash is a commit hash to clone
	Hash string
	// Tag is a git tag to clone
	Tag string
	// Branch is a branch to clone
	Branch string
	// Submodules is an optional submodule to init
	Submodules []string
}

Repo is a repository to clone

func (*Repo) CheckAndSetDefaults

func (r *Repo) CheckAndSetDefaults() error

type Setup

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

Setup creates new plugins

func (*Setup) Eval

func (n *Setup) Eval(ctx force.ExecutionContext) (interface{}, error)

Run sets up git plugin for the process group

func (*Setup) MarshalCode

func (n *Setup) MarshalCode(ctx force.ExecutionContext) ([]byte, error)

MarshalCode marshals plugin code to representation

func (*Setup) NewInstance

func (n *Setup) NewInstance(group force.Group) (force.Group, interface{})

NewInstance returns function creating new client bound to the process group and registers plugin variable

func (*Setup) Type

func (n *Setup) Type() interface{}

Jump to

Keyboard shortcuts

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