gitlab

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiVersion = "/api/v3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*gitlab.Client
}

func (*Client) Group

func (c *Client) Group() GroupInterface

func (*Client) GroupMember

func (c *Client) GroupMember() GroupMemberInterface

func (*Client) Project

func (c *Client) Project() ProjectInterface

func (*Client) ProjectMember

func (c *Client) ProjectMember() ProjectMemberInterface

func (*Client) Repository

func (c *Client) Repository() RepositoryInterface

func (*Client) RepositoryFile

func (c *Client) RepositoryFile() RepositoryFileInterface

func (*Client) Session

func (c *Client) Session() SessionInterface

func (*Client) User

func (c *Client) User() UserInterface

type ClientInterface

type ClientInterface interface {
	SetBaseURL(baseUrl string) error
	Session() SessionInterface
	Group() GroupInterface
	GroupMember() GroupMemberInterface
	Project() ProjectInterface
	ProjectMember() ProjectMemberInterface
	RepositoryFile() RepositoryFileInterface
	Repository() RepositoryInterface
	User() UserInterface
}

type Group

type Group struct {
	scm.Group
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(client NewClient) *Group

func (*Group) GetGroup

func (g *Group) GetGroup(token, baseUrl string, gid int) (*scm.Group, error)

func (*Group) ListGroupProjects

func (g *Group) ListGroupProjects(token, baseUrl string, gid, page int) ([]scm.Project, error)

func (*Group) ListGroups

func (g *Group) ListGroups(token, baseUrl string, page int) ([]scm.Group, error)

type GroupInterface

type GroupInterface interface {
	ListGroups(opt *gitlab.ListGroupsOptions, options ...gitlab.OptionFunc) ([]*gitlab.Group, *gitlab.Response, error)
	GetGroup(gid interface{}, options ...gitlab.OptionFunc) (*gitlab.Group, *gitlab.Response, error)
	ListGroupProjects(gid interface{}, opt *gitlab.ListGroupProjectsOptions, options ...gitlab.OptionFunc) ([]*gitlab.Project, *gitlab.Response, error)
}

type GroupMember

type GroupMember struct {
	scm.GroupMember
	// contains filtered or unexported fields
}

func NewGroupMember

func NewGroupMember(c NewClient) *GroupMember

func (*GroupMember) GetGroupMember

func (gm *GroupMember) GetGroupMember(token, baseUrl string, gid, uid int) (*scm.GroupMember, error)

func (*GroupMember) ListGroupMembers

func (gm *GroupMember) ListGroupMembers(token, baseUrl string, gid, uid int) (int, error)

type GroupMemberInterface

type GroupMemberInterface interface {
	ListGroupMembers(gid interface{}, opt *gitlab.ListGroupMembersOptions, options ...gitlab.OptionFunc) ([]*gitlab.GroupMember, *gitlab.Response, error)
}

type NewClient

type NewClient func(url, token string) ClientInterface

type Project

type Project struct {
	scm.Project
	// contains filtered or unexported fields
}

func NewProject

func NewProject(c NewClient) *Project

func (*Project) GetGroupId

func (p *Project) GetGroupId(baseUrl, token string, pid int) (int, error)

func (*Project) GetProject

func (p *Project) GetProject(baseUrl, id, token string) (int, int, error)

func (*Project) ListProjects

func (p *Project) ListProjects(baseUrl, token, search string, page int) ([]scm.Project, error)

func (*Project) Search

func (p *Project) Search(baseUrl, token, search string) ([]scm.Project, error)

type ProjectInterface

type ProjectInterface interface {
	GetProject(pid interface{}, options ...gitlab.OptionFunc) (*gitlab.Project, *gitlab.Response, error)
	ListProjects(opt *gitlab.ListProjectsOptions, options ...gitlab.OptionFunc) ([]*gitlab.Project, *gitlab.Response, error)
}

type ProjectMember

type ProjectMember struct {
	scm.ProjectMember
	// contains filtered or unexported fields
}

func NewProjectMember

func NewProjectMember(c NewClient) *ProjectMember

func (*ProjectMember) GetProjectMember

func (p *ProjectMember) GetProjectMember(token, baseUrl string, pid, uid, gid int) (scm.ProjectMember, error)

type ProjectMemberInterface

type ProjectMemberInterface interface {
	GetProjectMember(pid interface{}, user int, options ...gitlab.OptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
}

type Repository

type Repository struct {
	scm.TreeNode
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(c NewClient) *Repository

func (*Repository) ListTree

func (r *Repository) ListTree(baseUrl, token, ref string, pid int) ([]scm.TreeNode, error)

type RepositoryFile

type RepositoryFile struct {
	scm.TreeNode
	// contains filtered or unexported fields
}

func NewRepositoryFile

func NewRepositoryFile(c NewClient) *RepositoryFile

func (*RepositoryFile) GetRepository

func (r *RepositoryFile) GetRepository(baseUrl, token, filePath, ref string, pid int) (string, error)

type RepositoryFileInterface

type RepositoryFileInterface interface {
	GetFile(pid interface{}, opt *gitlab.GetFileOptions, options ...gitlab.OptionFunc) (*gitlab.File, *gitlab.Response, error)
}

type RepositoryInterface

type RepositoryInterface interface {
	ListTree(pid interface{}, opt *gitlab.ListTreeOptions, options ...gitlab.OptionFunc) ([]*gitlab.TreeNode, *gitlab.Response, error)
}

type Session

type Session struct {
	scm.Session
	// contains filtered or unexported fields
}

func NewSession

func NewSession(c NewClient) *Session

func (*Session) GetId

func (s *Session) GetId() int

func (*Session) GetSession

func (s *Session) GetSession(baseUrl, username, password string) error

func (*Session) GetToken

func (s *Session) GetToken() string

type SessionInterface

type SessionInterface interface {
	GetSession(opt *gitlab.GetSessionOptions, options ...gitlab.OptionFunc) (*gitlab.Session, *gitlab.Response, error)
}

type TreeNode

type TreeNode struct {
	scm.TreeNode
}

type User

type User struct {
	scm.User
	// contains filtered or unexported fields
}

func NewUser

func NewUser(c NewClient) *User

func (*User) GetUser

func (s *User) GetUser(baseUrl, accessToken string) (*scm.User, error)

type UserInterface

type UserInterface interface {
	CurrentUser(options ...gitlab.OptionFunc) (*gitlab.User, *gitlab.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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