gitlab

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//
	ErrGitLabInvalidToken = errors.New("Invalid Token")

	//
	ErrGitLabInvalidEndpoint = errors.New("Invalid GitLab endpoint")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	HasV4Support bool
	HasV3Support bool
	Endpoint     string
	Token        string
	APIPrefix    string
}

func NewClient

func NewClient(endpoint string, token string) (*Client, error)

func (*Client) GetArchive

func (c *Client) GetArchive(project *Project, ref string) ([]byte, error)

func (*Client) GetFile

func (c *Client) GetFile(project *Project, path, ref string) ([]byte, error)

func (*Client) GetProjectById

func (c *Client) GetProjectById(projectId int) (*Project, error)

func (*Client) GetProjectList

func (c *Client) GetProjectList() ([]*Project, error)

func (*Client) GetTagList

func (c *Client) GetTagList(project *Project) ([]*Tag, error)

type File

type File struct {
	Content  string `json:"content"`
	Encoding string `json:"encoding"`
}

type Project

type Project struct {
	ID                int      `json:"id"`
	Name              string   `json:"name"`
	PathWithNamespace string   `json:"path_with_namespace"`
	SSHURL            string   `json:"ssh_url_to_repo"`
	HTTPURL           string   `json:"http_url_to_repo"`
	WWWURL            string   `json:"web_url"`
	TagList           []string `json:"tag_list"`
}

type Tag

type Tag struct {
	Name   string        `json:"name"`
	Commit commitInlined `json:"commit"`
}

Jump to

Keyboard shortcuts

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