Documentation
¶
Index ¶
- func GetRepoNames(repos []Repository) []string
- type Client
- func (c *Client) CreateRepo(repoName, description string, private bool) error
- func (c *Client) DeleteRepo(repoName string) error
- func (c *Client) GetRepo(repoName string) (Repository, bool, error)
- func (c *Client) HasToken() bool
- func (c *Client) ListPublicRepos() ([]Repository, error)
- func (c *Client) ListUserPublicRepos() ([]Repository, error)
- func (c *Client) RepoExists(repoName string) (bool, error)
- func (c *Client) UpdateRepoDescription(repoName, description string) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoNames ¶
func GetRepoNames(repos []Repository) []string
GetRepoNames returns just the repository names
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles Codeberg API operations
func (*Client) CreateRepo ¶
CreateRepo creates a new repository on Codeberg
func (*Client) DeleteRepo ¶
DeleteRepo deletes a repository from Codeberg
func (*Client) GetRepo ¶ added in v0.9.1
func (c *Client) GetRepo(repoName string) (Repository, bool, error)
GetRepo fetches a repository by name
func (*Client) ListPublicRepos ¶
func (c *Client) ListPublicRepos() ([]Repository, error)
ListPublicRepos lists all public repositories for an organization
func (*Client) ListUserPublicRepos ¶
func (c *Client) ListUserPublicRepos() ([]Repository, error)
ListUserPublicRepos lists all public repositories for a user
func (*Client) RepoExists ¶
RepoExists checks if a repository exists on Codeberg
func (*Client) UpdateRepoDescription ¶ added in v0.9.1
UpdateRepoDescription updates a repository description on Codeberg
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description"`
Private bool `json:"private"`
Fork bool `json:"fork"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CloneURL string `json:"clone_url"`
SSHURL string `json:"ssh_url"`
Size int `json:"size"`
Archived bool `json:"archived"`
Empty bool `json:"empty"`
}
Repository represents a Codeberg/Gitea repository
Click to show internal directories.
Click to hide internal directories.