api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoResult = errors.New("no result from remote server")
)

Functions

This section is empty.

Types

type MergeOption

type MergeOption struct {
	Title string
	Body  string

	SourceBranch string
	TargetBranch string

	Upstream *Repository
}

type Provider

type Provider interface {
	Name() string
	SearchRepositories(group, query string) ([]*Repository, error)
	ListRepositories(group string) ([]*Repository, error)
	GetRepository(name string) (*Repository, error)

	GetMerge(repo *core.Repository, opts MergeOption) (string, error)
	CreateMerge(repo *core.Repository, opts MergeOption) (string, error)

	GetRelease(repo *core.Repository, tag string) (*Release, error)
	ListReleases(repo *core.Repository) ([]*Release, error)
	DownloadReleaseFile(repo *core.Repository, file *ReleaseFile) (io.ReadCloser, error)
}

type Release added in v0.3.0

type Release struct {
	Name string
	Tag  string

	WebURL string

	Files []*ReleaseFile
}

type ReleaseFile added in v0.3.0

type ReleaseFile struct {
	ID any

	Name string

	Size int64
}

type Repository

type Repository struct {
	Name string

	Remote *core.Remote

	WebURL string

	DefaultBranch string

	Upstream *Repository

	Archived bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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