service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(service Service) string

Name returns the name of a service

Types

type Github

type Github struct {
}

Github represents the Github service

func (*Github) GetStars

func (g *Github) GetStars(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(trendingChan chan<- *model.StarResult, token string, language string, verbose bool)

GetTrending returns the trending repositories

func (*Github) Login

func (g *Github) Login() (string, error)

Login logs in to Github

type Gitlab added in v0.4.0

type Gitlab struct {
}

Gitlab represents the Gitlab service

func (*Gitlab) GetStars added in v0.4.0

func (g *Gitlab) GetStars(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(trendingChan chan<- *model.StarResult, token string, language string, verbose bool)

GetTrending returns the trending repositories

func (*Gitlab) Login added in v0.4.0

func (g *Gitlab) Login() (string, error)

Login logs in to Gitlab

type NotFound

type NotFound struct {
}

NotFound is used when the specified service is not found

func (*NotFound) GetStars

func (nf *NotFound) GetStars(starChan chan<- *model.StarResult, token string, user string)

GetStars is not implemented

func (*NotFound) GetTrending added in v0.4.0

func (nf *NotFound) GetTrending(trendingChan chan<- *model.StarResult, token string, language string, verbose bool)

GetTrending is not implemented

func (*NotFound) Login

func (nf *NotFound) Login() (string, error)

Login is not implemented

type Service

type Service interface {
	Login() (string, error)
	GetStars(starChan chan<- *model.StarResult, token string, user string)
	GetTrending(trendingChan chan<- *model.StarResult, token string, language string, verbose bool)
}

Service represents a service

func ForName

func ForName(name string) (Service, error)

ForName returns the service for a given name, or an error if it doesn't exist

Jump to

Keyboard shortcuts

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