client

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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