client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 2 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 {
	Projects      ProjectsService
	Tags          TagsService
	MergeRequests MergeRequestsService
	Commits       CommitsService
	Issues        IssuesService
}

Client wraps the gitlab.Client with interfaces we are using

func New

func New(ctx context.Context, AccessToken string) *Client

New intialized and returns a new Client Uses AccessToken for authentication if not empty

type CommitsService

type CommitsService interface {
	GetCommit(
		pid interface{},
		sha string,
		options ...gitlab.OptionFunc,
	) (*gitlab.Commit, *gitlab.Response, error)
}

CommitsService describes the methods we use from gitlab.CommitsService

type IssuesService

type IssuesService interface {
	ListProjectIssues(
		pid interface{},
		opt *gitlab.ListProjectIssuesOptions,
		options ...gitlab.OptionFunc,
	) ([]*gitlab.Issue, *gitlab.Response, error)
}

IssuesService describes the methods we use from gitlab.IssuesService

type MergeRequestsService

type MergeRequestsService interface {
	ListProjectMergeRequests(
		pid interface{},
		opt *gitlab.ListProjectMergeRequestsOptions,
		options ...gitlab.OptionFunc,
	) ([]*gitlab.MergeRequest, *gitlab.Response, error)
}

MergeRequestsService describes the methods we use from gitlab.MergeRequestsService

type ProjectsService

type ProjectsService interface {
	GetProject(
		pid interface{},
		options ...gitlab.OptionFunc,
	) (*gitlab.Project, *gitlab.Response, error)
}

ProjectsService describes the methods we use from gitlab.ProjectsService

type TagsService

type TagsService interface {
	ListTags(
		pid interface{},
		opt *gitlab.ListTagsOptions,
		options ...gitlab.OptionFunc,
	) ([]*gitlab.Tag, *gitlab.Response, error)
}

TagsService describes the methods we use from gitlab.TagsService

Jump to

Keyboard shortcuts

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