gitapi

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "v2.2.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitApi

type GitApi struct {
	*restapi.Api `json:"rest_api,omitempty"`
	*Property
}

GitApi

func New

func New(property *Property) *GitApi

Setup a *GitApi

func (*GitApi) EndpointRepos

func (t *GitApi) EndpointRepos() *GitApi

Initialize endpoint /repos/OWNER/REPO

Use current directory if GitApi.Repo is empty

func (*GitApi) EndpointReposActionsGithub

func (t *GitApi) EndpointReposActionsGithub() *GitApi

Initialize endpoint /repos/OWNER/REPO/actions/secrets/public-key

func (*GitApi) EndpointReposSecrets

func (t *GitApi) EndpointReposSecrets() *GitApi

Initialize endpoint /repos/OWNER/REPO/actions/secrets

func (*GitApi) EndpointReposSecretsPubkey

func (t *GitApi) EndpointReposSecretsPubkey() *GitApi

Initialize endpoint /repos/OWNER/REPO/actions/secrets/public-key

func (*GitApi) EndpointReposTopics

func (t *GitApi) EndpointReposTopics() *GitApi

Initialize endpoint /repos/OWNER/REPO/topics

func (*GitApi) EndpointUserRepos

func (t *GitApi) EndpointUserRepos() *GitApi

Initialize endpoint /user/repos

func (*GitApi) HeaderGithub

func (t *GitApi) HeaderGithub() *GitApi

Set github/gitea header

GitApi.Req.Token, if empty, authorization header will not be set.

func (*GitApi) HeaderInit

func (t *GitApi) HeaderInit() *GitApi

Setup empty API header

func (*GitApi) New

func (t *GitApi) New(property *Property) *GitApi

Setup a *GitApi

func (*GitApi) SetDel added in v2.2.1

func (t *GitApi) SetDel() *GitApi

func (*GitApi) SetGet added in v2.2.1

func (t *GitApi) SetGet() *GitApi

func (*GitApi) SetPatch added in v2.2.1

func (t *GitApi) SetPatch() *GitApi

func (*GitApi) SetPost added in v2.2.1

func (t *GitApi) SetPost() *GitApi

func (*GitApi) SetPut added in v2.2.1

func (t *GitApi) SetPut() *GitApi

type IInfo

type IInfo restapi.IInfo

type Property

type Property struct {
	Debug      bool   `json:"debug,omitempty"`
	EntryPoint string `json:"entry_point,omitempty"`
	Info       IInfo  `json:"info,omitempty"`
	SkipVerify bool   `json:"skip_verify,omitempty"`

	Name   string `json:"name,omitempty"`
	Repo   string `json:"repo,omitempty"`
	Token  string `json:"token,omitempty"`
	User   string `json:"user,omitempty"`
	Vendor Vendor `json:"vendor,omitempty"`
}

type Vendor

type Vendor string
const (
	VendorGithub Vendor = "github"
	VendorGitea  Vendor = "gitea"
	VendorGogs   Vendor = "gogs"
)

GitApi supported vendors

Jump to

Keyboard shortcuts

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