gitee

package
v3.56.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootPath
	Endpoint      string `json:"endpoint" type:"string" help:"Gitee API endpoint, default https://gitee.com/api/v5"`
	Token         string `json:"token" type:"string"`
	Owner         string `json:"owner" type:"string" required:"true"`
	Repo          string `json:"repo" type:"string" required:"true"`
	Ref           string `json:"ref" type:"string" help:"Branch, tag or commit SHA, defaults to repository default branch"`
	DownloadProxy string `json:"download_proxy" type:"string" help:"Prefix added before download URLs, e.g. https://mirror.example.com/"`
	Cookie        string `json:"cookie" type:"string" help:"Cookie returned from user info request"`
}

type Content

type Content struct {
	Type        string `json:"type"`
	Size        *int64 `json:"size"`
	Name        string `json:"name"`
	Path        string `json:"path"`
	Sha         string `json:"sha"`
	URL         string `json:"url"`
	HtmlURL     string `json:"html_url"`
	DownloadURL string `json:"download_url"`
	Links       Links  `json:"_links"`
}

type ErrResp

type ErrResp struct {
	Message string `json:"message"`
}

type Gitee

type Gitee struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*Gitee) Config

func (d *Gitee) Config() driver.Config

func (*Gitee) Drop

func (d *Gitee) Drop(ctx context.Context) error

func (*Gitee) GetAddition

func (d *Gitee) GetAddition() driver.Additional

func (*Gitee) Init

func (d *Gitee) Init(ctx context.Context) error
func (d *Gitee) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Gitee) List

func (d *Gitee) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
type Links struct {
	Self string `json:"self"`
	Html string `json:"html"`
}

type Object

type Object struct {
	model.Object
	DownloadURL string
	HtmlURL     string
}

func (*Object) URL

func (o *Object) URL() string

type Repo

type Repo struct {
	DefaultBranch string `json:"default_branch"`
}

Jump to

Keyboard shortcuts

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