client

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrgKind        = "org"
	GroupKind      = "group"
	UserKind       = "user"
	EnterpriseKind = "enterprise"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name      string `json:"name"`
	Protected bool   `json:"protected"`
	Merged    bool   `json:"merged"`
}

type CodeHostClient

type CodeHostClient interface {
	ListBranches(opt ListOpt) ([]*Branch, error)
	ListTags(opt ListOpt) ([]*Tag, error)
	ListPrs(opt ListOpt) ([]*PullRequest, error)
	ListNamespaces(keyword string) ([]*Namespace, error)
	ListProjects(opt ListOpt) ([]*Project, error)
}

type ListOpt

type ListOpt struct {
	Namespace     string
	NamespaceType string
	ProjectName   string
	Key           string
	Page          int
	PerPage       int
	TargeBr       string
}

type Namespace

type Namespace struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	Kind        string `json:"kind"`
	ProjectUUID string `json:"project_uuid,omitempty"`
}

type Project

type Project struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	DefaultBranch string `json:"defaultBranch"`
	Namespace     string `json:"namespace"`
	RepoUUID      string `json:"repo_uuid,omitempty"`
	RepoID        string `json:"repo_id,omitempty"`
}

type PullRequest

type PullRequest struct {
	ID             int    `json:"id"`
	TargetBranch   string `json:"targetBranch"`
	SourceBranch   string `json:"sourceBranch"`
	ProjectID      int    `json:"projectId"`
	Title          string `json:"title"`
	State          string `json:"state"`
	CreatedAt      int64  `json:"createdAt"`
	UpdatedAt      int64  `json:"updatedAt"`
	AuthorUsername string `json:"authorUsername"`
	Number         int    `json:"number"`
	User           string `json:"user"`
	Base           string `json:"base,omitempty"`
}

type Tag

type Tag struct {
	Name       string `json:"name"`
	ZipballURL string `json:"zipball_url"`
	TarballURL string `json:"tarball_url"`
	Message    string `json:"message"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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