provider

package
v0.0.0-...-964918b Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CYCLONE_SERVER_HOST = "CYCLONE_SERVER_HOST"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

type GitHub struct {
}

GitHub is the type for Github remote provider.

func NewGitHub

func NewGitHub() *GitHub

NewGitHub returns a new GitHub remoter.

func (*GitHub) Authcallback

func (g *GitHub) Authcallback(code, state string) (string, error)

Authcallback is the callback handler.

func (*GitHub) CreateHook

func (g *GitHub) CreateHook(service *api.Service) error

CreateHook is a helper to register webhook.

func (*GitHub) DeleteHook

func (g *GitHub) DeleteHook(service *api.Service) error

DeleteHook is a helper to unregister webhook.

func (*GitHub) GetRepos

func (g *GitHub) GetRepos(userID string) (Repos []api.Repo, username, avatarURL string, err error)

GetRepos gets token by using code from github.

func (*GitHub) GetTokenQuestURL

func (g *GitHub) GetTokenQuestURL(userID string) (string, error)

GetTokenQuestURL gets the URL for token request.

func (*GitHub) LogOut

func (g *GitHub) LogOut(userID string) error

LogOut logs out.

func (*GitHub) PostCommitStatus

func (g *GitHub) PostCommitStatus(service *api.Service, version *api.Version) error

PostCommitStatus posts Commit Status To Github.

type GitLab

type GitLab struct {
}

GitLab if the type for GitLab remote provider.

func NewGitLab

func NewGitLab() *GitLab

NewGitLab returns a new GitLab remoter.

func (*GitLab) Authcallback

func (g *GitLab) Authcallback(code, state string) (string, error)

Authcallback is the callback handler.

func (*GitLab) CreateHook

func (g *GitLab) CreateHook(service *api.Service) error

CreateHook is a helper to register webhook.

func (*GitLab) DeleteHook

func (g *GitLab) DeleteHook(service *api.Service) error

DeleteHook is a helper to unregister webhook.

func (*GitLab) GetRepos

func (g *GitLab) GetRepos(userID string) (repos []api.Repo, username string, avatarURL string, err error)

GetRepos gets token by using code from gitlab.

func (*GitLab) GetTokenQuestURL

func (g *GitLab) GetTokenQuestURL(userID string) (string, error)

GetTokenQuestURL gets the URL for token request.

func (*GitLab) LogOut

func (g *GitLab) LogOut(userID string) error

LogOut logs out.

func (*GitLab) PostCommitStatus

func (g *GitLab) PostCommitStatus(service *api.Service, version *api.Version) error

PostCommitStatus posts Commit Status To gitlab.

Jump to

Keyboard shortcuts

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