forgejo

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *http.Client) *Client

func (*Client) GetClient

func (c *Client) GetClient() *http.Client

func (*Client) GetLatestRelease

func (c *Client) GetLatestRelease(ctx context.Context, owner, repo string) (*Release, error)

func (*Client) GetRelease

func (c *Client) GetRelease(ctx context.Context, owner, repo, tag string) (*Release, error)

func (*Client) GetToken

func (c *Client) GetToken() string

func (*Client) ListReleases

func (c *Client) ListReleases(ctx context.Context, owner, repo string) ([]*Release, error)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

type Release

type Release struct {
	ID          int64           `json:"id"`
	TagName     string          `json:"tag_name"`
	Name        string          `json:"name"`
	Body        string          `json:"body"`
	Draft       bool            `json:"draft"`
	Prerelease  bool            `json:"prerelease"`
	CreatedAt   time.Time       `json:"created_at"`
	PublishedAt time.Time       `json:"published_at"`
	Assets      []*ReleaseAsset `json:"assets"`
}

type ReleaseAsset

type ReleaseAsset struct {
	ID                 int64     `json:"id"`
	Name               string    `json:"name"`
	Size               int64     `json:"size"`
	DownloadCount      int64     `json:"download_count"`
	CreatedAt          time.Time `json:"created_at"`
	UUID               string    `json:"uuid"`
	BrowserDownloadURL string    `json:"browser_download_url"`
}

Jump to

Keyboard shortcuts

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