service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptUserAndPassword

func PromptUserAndPassword(hostName string) (string, string)

Types

type AuthorizationsService added in v0.0.3

type AuthorizationsService interface {
	CreateToken(ctx context.Context) (string, error)
}

type Client

type Client interface {
	GetRepositories() RepositoriesService
	GetPullRequests() PullRequestsService
	GetIssues() IssuesService
	GetProjects() ProjectsService
	GetAuthorizations() AuthorizationsService
}

type ClientGenerator added in v0.0.3

type ClientGenerator interface {
	New(ctx context.Context, serviceConfig *etc.ServiceConfig) (Client, error)
	NewViaBasicAuth(ctx context.Context, serviceConfig *etc.ServiceConfig, username, pass string) (Client, error)
	GetType() string
}

type Issue

type Issue interface {
	GetNumber() int
	GetTitle() string
	GetHTMLURL() string
}

type IssuesService added in v0.0.3

type IssuesService interface {
	ListByRepo(ctx context.Context, owner, repo string) ([]Issue, error)
	GetIssuesURL(owner, repo string) (string, error)
	GetURL(owner, repo string, no int) (string, error)
}

type NewPullRequest added in v0.0.2

type NewPullRequest struct {
	Title      string
	Body       string
	BaseBranch string
	HeadBranch string
	BaseOwner  string
	HeadOwner  string
}

type NewRelease added in v0.0.2

type NewRelease struct {
	ID      int
	TagName string
	Name    string
	Body    string
	HTMLURL string
}

func (*NewRelease) GetBody added in v0.0.2

func (nr *NewRelease) GetBody() string

func (*NewRelease) GetHTMLURL added in v0.0.2

func (nr *NewRelease) GetHTMLURL() string

func (*NewRelease) GetID added in v0.0.2

func (nr *NewRelease) GetID() int

func (*NewRelease) GetName added in v0.0.2

func (nr *NewRelease) GetName() string

func (*NewRelease) GetTagName added in v0.0.2

func (nr *NewRelease) GetTagName() string

type ProjectsService added in v0.0.3

type ProjectsService interface {
	GetProjectsURL(owner, repo string) (string, error)
	GetURL(owner, repo string, no int) (string, error)
}

type PullRequest

type PullRequest interface {
	GetNumber() int
	GetTitle() string
	GetHTMLURL() string
}

type PullRequestsService added in v0.0.3

type PullRequestsService interface {
	List(ctx context.Context, owner, repo string) ([]PullRequest, error)
	Create(ctx context.Context, repo string, pull *NewPullRequest) (PullRequest, error)
	GetPullRequestsURL(owner, repo string) (string, error)
	GetURL(owner, repo string, no int) (string, error)
}

type Release added in v0.0.2

type Release interface {
	GetID() int64
	GetTagName() string
	GetName() string
	GetBody() string
	GetHTMLURL() string
}

type RepositoriesService added in v0.0.3

type RepositoriesService interface {
	Get(ctx context.Context, owner, repo string) (Repository, error)
	GetURL(owner, repo string) (string, error)
	GetWikisURL(owner, repo string) (string, error)
	GetMilestonesURL(owner, repo string) (string, error)
	GetMilestoneURL(owner, repo string, no int) (string, error)
	GetCommitsURL(owner, repo string) (string, error)
	Create(ctx context.Context, repo string) (Repository, error)
	CreateRelease(ctx context.Context, owner, repo string, newRelease *NewRelease) (Release, error)
}

type Repository

type Repository interface {
	GetHTMLURL() string
	GetGitURL() string
	GetCloneURL() string
}

Jump to

Keyboard shortcuts

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