Documentation ¶
Overview ¶
Package gitlab implements a gitlab connector
Index ¶
- Constants
- Variables
- func CLIFlags() []cli.Flag
- func New(ctx *cli.Context) (connectors.Connector, error)
- type Connector
- func (c *Connector) GetNewTagURL(TagName string) (string, error)
- func (c *Connector) Issues(ctx context.Context, cerr chan<- error) (ctags <-chan data.Issue, cissuescounter <-chan bool, cmaxissues <-chan int)
- func (c *Connector) MRs(ctx context.Context, cerr chan<- error) (cmrs <-chan data.MR, cmrscounter <-chan bool, cmaxmrs <-chan int)
- func (c *Connector) ProjectID() string
- func (c *Connector) RepositoryExists() (bool, error)
- func (c *Connector) Tags(ctx context.Context, cerr chan<- error) (ctags <-chan data.Tag, ctagscounter <-chan bool, cmaxtags <-chan int)
Constants ¶
const AccessTokenEnvVar = "CHAGEN_GITHUB_TOKEN" // nolint: gosec
AccessTokenEnvVar contains the name of environment variable which sets the authentication access token
Variables ¶
var IssuesPerPage = 30 // nolint: gochecknoglobals
IssuesPerPage defined how many Issues are fetched per page
var MRsPerPage = 30 // nolint: gochecknoglobals
MRsPerPage defined how many MRs are fetched per page
var NewClient = client.New // nolint: gochecknoglobals
NewClient links to the constructor, which is used to create Connector.client
var TagsPerPage = 30 // nolint: gochecknoglobals
TagsPerPage defined how many tags are fetched per page
Functions ¶
Types ¶
type Connector ¶
type Connector struct { Owner string Repo string ProjectURL string // contains filtered or unexported fields }
Connector implements the GitHub connector
func (*Connector) GetNewTagURL ¶
GetNewTagURL returns the URL for a new tag, which does not exist yet
func (*Connector) Issues ¶
func (c *Connector) Issues( ctx context.Context, cerr chan<- error, ) ( ctags <-chan data.Issue, cissuescounter <-chan bool, cmaxissues <-chan int, )
Issues returns the issues via channels. Returns possible errors via given cerr channel cissues returns issues cissuescounter returns the channel, which ticks when an issue is proceeded cmaxissues returns the max available amount of issues
func (*Connector) MRs ¶
func (c *Connector) MRs( ctx context.Context, cerr chan<- error, ) ( cmrs <-chan data.MR, cmrscounter <-chan bool, cmaxmrs <-chan int, )
MRs returns the MRs via channels. Returns possible errors via given cerr channel cmrs returns MRs cmrscounter returns the channel, which ticks when a MR is proceeded cmaxmrs returns the max available amount of MRs
func (*Connector) RepositoryExists ¶
RepositoryExists checks if referenced repository is present
func (*Connector) Tags ¶
func (c *Connector) Tags( ctx context.Context, cerr chan<- error, ) ( ctags <-chan data.Tag, ctagscounter <-chan bool, cmaxtags <-chan int, )
Tags returns the git tags via channels. Returns possible errors via given cerr channel ctags returns tags ctagscounter returns the channel, which ticks when a tag is proceeded cmaxtags returns the max available amount of tags