model

package
v2.2.2-rc4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitlabType          = "gitlab"
	GithubType          = "github"
	BitbucketCloudType  = "bitbucketcloud"
	BitbucketServerType = "bitbucketserver"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	TriggerType     string `json:"triggerType,omitempty"`
	TriggerUserName string `json:"triggerUserName,omitempty"`
	Commit          string `json:"commit,omitempty"`
	Event           string `json:"event,omitempty"`
	RepositoryURL   string `json:"repositoryUrl,omitempty"`
	Branch          string `json:"branch,omitempty"`
	Ref             string `json:"ref,omitempty"`
	RefSpec         string `json:"refSpec,omitempty"`
	HTMLLink        string `json:"htmlLink,omitempty"`
	Title           string `json:"title,omitempty"`
	Message         string `json:"message,omitempty"`
	Sender          string `json:"sender,omitempty"`
	Author          string `json:"author,omitempty"`
	AvatarURL       string `json:"avatarUrl,omitempty"`
	Email           string `json:"email,omitempty"`
}

type Refresher

type Refresher interface {
	Refresh(cred *v3.SourceCodeCredential) (bool, error)
}

type Remote

type Remote interface {
	Type() string

	//Login handle oauth login
	Login(code string) (*v3.SourceCodeCredential, error)

	Repos(account *v3.SourceCodeCredential) ([]v3.SourceCodeRepository, error)

	CreateHook(pipeline *v3.Pipeline, accessToken string) (string, error)

	DeleteHook(pipeline *v3.Pipeline, accessToken string) error

	GetPipelineFileInRepo(repoURL string, ref string, accessToken string) ([]byte, error)

	SetPipelineFileInRepo(repoURL string, ref string, accessToken string, content []byte) error

	GetBranches(repoURL string, accessToken string) ([]string, error)

	GetHeadInfo(repoURL string, branch string, accessToken string) (*BuildInfo, error)
}

Jump to

Keyboard shortcuts

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