client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 7 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 {
	// contains filtered or unexported fields
}

Client

func New

func New(opts *Options) *Client

New Client constructor

func (*Client) Get

func (c *Client) Get(url, path, ref string) error

Get get url and clone/sync to path using ref. Defaults to default branch if ref is nil.

func (*Client) GetPlumb

func (c *Client) GetPlumb(p *plumb.Plumb) error

GetPlumb same as get but url, path and ref are fetch from plumb.Plumb

func (*Client) GetRepo

func (c *Client) GetRepo(url, ref string) (*plumb.Plumb, error)

GetRepo fetch repo and store in repo store

func (*Client) GetTemplate

func (c *Client) GetTemplate(url, ref string) (*plumb.Plumb, error)

GetTemplate fetch template and store in template store

type Options

type Options struct {
	CallPlumbRepos     callbacks.MakePlumb `validate:"required"`
	CallPlumbTemplates callbacks.MakePlumb `validate:"required"`
	Err                errs.HandlerIface   `validate:"required"`
	Stdout             io.Writer           `validate:"required"`
	VCS                *vcs.VCS            `validate:"required"`
}

Options for New function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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