gitea

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gitea contains Gitea client specific functionality.

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
}

Client is a client that communicates with the Gitea API.

func NewClient

func NewClient(endpoint, username, password string) (*Client, error)

NewClient creates and returns a new Gitea client.

func (*Client) AddReadOnlyUserToRepository

func (g *Client) AddReadOnlyUserToRepository(ctx context.Context, repo, username string) error

AddReadOnlyUserToRepository adds a read only user to a repository.

func (*Client) CreatePackageRegistryToken

func (g *Client) CreatePackageRegistryToken(ctx context.Context) (string, error)

CreatePackageRegistryToken creates or replaces an existing package registry token.

func (*Client) CreateReadOnlyUser

func (g *Client) CreateReadOnlyUser(ctx context.Context, username, password string) error

CreateReadOnlyUser creates a non-admin Zarf user.

func (*Client) DoRequest

func (g *Client) DoRequest(ctx context.Context, method string, path string, body []byte) (_ []byte, _ int, err error)

DoRequest performs a request to the Gitea API at the given path.

func (*Client) UpdateGitUser

func (g *Client) UpdateGitUser(ctx context.Context, username string, password string) error

UpdateGitUser updates Zarf git server users.

Jump to

Keyboard shortcuts

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