Documentation
¶
Index ¶
- func Name(service Service) string
- type Github
- func (g *Github) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, ...)
- func (g *Github) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, ...)
- func (g *Github) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, ...)
- func (g *Github) Login(ctx context.Context) (string, error)
- type Gitlab
- func (g *Gitlab) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, ...)
- func (g *Gitlab) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, ...)
- func (g *Gitlab) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, ...)
- func (g *Gitlab) Login(ctx context.Context) (string, error)
- type NotFound
- func (nf *NotFound) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, ...)
- func (nf *NotFound) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, ...)
- func (nf *NotFound) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, ...)
- func (nf *NotFound) Login(ctx context.Context) (string, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Github ¶
type Github struct { }
Github represents the Github service
func (*Github) GetEvents ¶ added in v0.5.0
func (g *Github) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, page, count int)
GetEvents returns the events for the authenticated user
func (*Github) GetStars ¶
func (g *Github) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, user string)
GetStars returns the stars for the specified user (empty string for authenticated user)
func (*Github) GetTrending ¶ added in v0.4.0
func (g *Github) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, language string, verbose bool)
GetTrending returns the trending repositories
type Gitlab ¶ added in v0.4.0
type Gitlab struct { }
Gitlab represents the Gitlab service
func (*Gitlab) GetEvents ¶ added in v0.5.0
func (g *Gitlab) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, page, count int)
GetEvents returns the events for the authenticated user
func (*Gitlab) GetStars ¶ added in v0.4.0
func (g *Gitlab) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, user string)
GetStars returns the stars for the specified user (empty string for authenticated user)
func (*Gitlab) GetTrending ¶ added in v0.4.0
func (g *Gitlab) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, language string, verbose bool)
GetTrending returns the trending repositories
type NotFound ¶
type NotFound struct { }
NotFound is used when the specified service is not found
func (*NotFound) GetEvents ¶ added in v0.5.0
func (nf *NotFound) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, page, count int)
GetEvents is not implemented
func (*NotFound) GetStars ¶
func (nf *NotFound) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token string, user string)
GetStars is not implemented
func (*NotFound) GetTrending ¶ added in v0.4.0
func (nf *NotFound) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token string, language string, verbose bool)
GetTrending is not implemented
type Service ¶
type Service interface { Login(ctx context.Context) (string, error) GetStars(ctx context.Context, starChan chan<- *model.StarResult, token, user string) GetTrending(ctx context.Context, trendingChan chan<- *model.StarResult, token, language string, verbose bool) GetEvents(ctx context.Context, eventChan chan<- *model.EventResult, token, user string, page, count int) }
Service represents a service
Click to show internal directories.
Click to hide internal directories.