model

package
v2.1.13-rc1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GitlabType = "gitlab"
	GithubType = "github"
)

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"`
	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 Remote

type Remote interface {
	Type() string

	CanLogin() bool

	CanRepos() bool

	CanHook() bool

	//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

	GetDefaultBranch(repoURL string, accessToken string) (string, 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