Documentation
¶
Index ¶
- Variables
- func Issues(ctx context.Context, client *gitlab.Client, pid string, since time.Time) <-chan IssueResult
- func LabelEvents(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event
- func Notes(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event
- func SortedEvents(inputs ...<-chan Event) chan Event
- func StateEvents(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event
- type ErrorEvent
- type Event
- type EventKind
- type Gitlab
- func (g *Gitlab) Configure(repo *cache.RepoCache, params core.BridgeParams, interactive bool) (core.Configuration, error)
- func (g *Gitlab) LoginMetaKey() string
- func (Gitlab) NewExporter() core.Exporter
- func (Gitlab) NewImporter() core.Importer
- func (Gitlab) Target() string
- func (g *Gitlab) ValidParams() map[string]interface{}
- func (g *Gitlab) ValidateConfig(conf core.Configuration) error
- type IssueResult
- type LabelEvent
- type NoteEvent
- type StateEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBadProjectURL = errors.New("bad project url")
)
View Source
var (
ErrMissingIdentityToken = errors.New("missing identity token")
)
Functions ¶
func Issues ¶
func Issues(ctx context.Context, client *gitlab.Client, pid string, since time.Time) <-chan IssueResult
Issues returns a channel with gitlab project issues, ascending order. An error while listing is reported on the channel and ends the iteration.
func LabelEvents ¶
LabelEvents returns a channel with label events.
func SortedEvents ¶
SortedEvents fan-in some Event-channels into one, sorted by creation date, using CreatedAt-method. This function assume that each channel is pre-ordered.
func StateEvents ¶
StateEvents returns a channel with state change events.
Types ¶
type ErrorEvent ¶
func (ErrorEvent) CreatedAt ¶
func (e ErrorEvent) CreatedAt() time.Time
func (ErrorEvent) ID ¶
func (e ErrorEvent) ID() string
func (ErrorEvent) Kind ¶
func (e ErrorEvent) Kind() EventKind
func (ErrorEvent) UserID ¶
func (e ErrorEvent) UserID() int64
type EventKind ¶
type EventKind int
const ( EventUnknown EventKind = iota EventError EventComment EventTitleChanged EventDescriptionChanged EventClosed EventReopened EventLocked EventUnlocked EventChangedDuedate EventRemovedDuedate EventAssigned EventUnassigned EventChangedMilestone EventRemovedMilestone EventAddLabel EventRemoveLabel EventMentionedInIssue EventMentionedInMergeRequest EventMentionedInCommit )
type Gitlab ¶
type Gitlab struct{}
func (*Gitlab) Configure ¶
func (g *Gitlab) Configure(repo *cache.RepoCache, params core.BridgeParams, interactive bool) (core.Configuration, error)
func (*Gitlab) LoginMetaKey ¶
func (Gitlab) NewExporter ¶
func (Gitlab) NewImporter ¶
func (*Gitlab) ValidParams ¶
func (*Gitlab) ValidateConfig ¶
func (g *Gitlab) ValidateConfig(conf core.Configuration) error
type IssueResult ¶ added in v0.11.0
type IssueResult struct {
Issue *gitlab.Issue
Err error
}
IssueResult is either a gitlab issue, or the error that interrupted the listing.
type LabelEvent ¶
type LabelEvent struct{ gitlab.LabelEvent }
func (LabelEvent) CreatedAt ¶
func (l LabelEvent) CreatedAt() time.Time
func (LabelEvent) ID ¶
func (l LabelEvent) ID() string
func (LabelEvent) Kind ¶
func (l LabelEvent) Kind() EventKind
func (LabelEvent) UserID ¶
func (l LabelEvent) UserID() int64
type StateEvent ¶
type StateEvent struct{ gitlab.StateEvent }
func (StateEvent) CreatedAt ¶
func (s StateEvent) CreatedAt() time.Time
func (StateEvent) ID ¶
func (s StateEvent) ID() string
func (StateEvent) Kind ¶
func (s StateEvent) Kind() EventKind
func (StateEvent) UserID ¶
func (s StateEvent) UserID() int64
Click to show internal directories.
Click to hide internal directories.