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) HasToken() bool
- func (c *Client) ListPublicRepos() ([]Repository, error)
- func (c *Client) ListUserPublicRepos() ([]Repository, error)
- func (c *Client) RepoExists(repoName string) (bool, 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) 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
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.