gitlab

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 5 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 {
	Hostname string
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Client, error)

func (*Client) CreateBranch

func (c *Client) CreateBranch(
	projectId int, branch, ref string,
) error

func (*Client) CreateFile

func (c *Client) CreateFile(
	projectId int, branch, path string,
	content []byte, header CommitHeader,
) (commitID string, err error)

func (*Client) GetBranch

func (c *Client) GetBranch(
	projectId int, branch string,
) (*gitlab.Branch, error)

func (*Client) GetFileContent

func (c *Client) GetFileContent(
	projectId int, ref, path string,
) ([]byte, error)

func (*Client) ListTreeAll

func (c *Client) ListTreeAll(
	projectId int, ref string,
) ([]*gitlab.TreeNode, error)

func (*Client) Meta

func (c *Client) Meta(
	projectId int, ref, path string, out interface{},
) (ok bool, err error)

func (*Client) UpdateFile

func (c *Client) UpdateFile(
	projectId int, branch, lastCommit, path string,
	content []byte, header CommitHeader,
) (commitID string, err error)

type Commit

type Commit = gitlab.Commit

type CommitHeader

type CommitHeader struct {
	AuthorName    string
	AuthorEmail   string
	CommitMessage string
}

type Config

type Config struct {
	Hostname  string
	BaseUrl   string
	TokenPath string
}

Jump to

Keyboard shortcuts

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