docs: Add documentation for the method types

This commit is contained in:
PapaTutuWawa 2024-01-11 20:53:31 +01:00
parent 80234fd5ba
commit 55e63eee5b

View File

@ -19,12 +19,18 @@ type GetRepositoryMethod func(username, repositoryName string) (Repository, erro
// <username>/<repository>@<branch> exists. If not, returns "", error. // <username>/<repository>@<branch> exists. If not, returns "", error.
type GetFileMethod func(username, repositoryName, branch, path string, since *time.Time) ([]byte, bool, error) type GetFileMethod func(username, repositoryName, branch, path string, since *time.Time) ([]byte, bool, error)
// Returns the result of a CNAME lookup for @domain.
type LookupCNAMEMethod func(domain string) (string, error) type LookupCNAMEMethod func(domain string) (string, error)
// Return the repository the domain should point to by looking up the TXT record
// "_rio-pages.<domain>".
type LookupRepoTXTMethod func(domain string) (string, error) type LookupRepoTXTMethod func(domain string) (string, error)
// Check of the repository <username>/<repositoryName> contains the specified
// branch.
type HasBranchMethod func(username, repositoryName, branchName string) bool type HasBranchMethod func(username, repositoryName, branchName string) bool
// Check if the specified username exists.
type HasUserMethod func(username string) bool type HasUserMethod func(username string) bool
type Repository struct { type Repository struct {