Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminClient ¶
type AdminClient interface {
PrepareRepository(*domain.Codeset, *string) (*string, *string, error)
CreateRepoWebhook(string, string, *string) (*int64, error)
DeleteRepoWebhook(string, string, *int64) error
GetRepositories(org, label *string) ([]*domain.Codeset, error)
GetRepository(org, name string) (*domain.Codeset, error)
DeleteRepository(org, name string) error
}
AdminClient describes the interface of Gitea Admin Client
func NewAdminClient ¶
func NewAdminClient(logger *log.Logger) (AdminClient, error)
NewAdminClient creates a new gitea client and performs authentication from the credentials provided as env variables
type Client ¶
type Client interface {
GetOrg(orgname string) (*gitea.Organization, *gitea.Response, error)
CreateOrg(gitea.CreateOrgOption) (*gitea.Organization, *gitea.Response, error)
GetUserInfo(string) (*gitea.User, *gitea.Response, error)
AdminCreateUser(gitea.CreateUserOption) (*gitea.User, *gitea.Response, error)
ListOrgTeams(string, gitea.ListTeamsOptions) ([]*gitea.Team, *gitea.Response, error)
AddTeamMember(int64, string) (*gitea.Response, error)
GetRepo(string, string) (*gitea.Repository, *gitea.Response, error)
CreateOrgRepo(string, gitea.CreateRepoOption) (*gitea.Repository, *gitea.Response, error)
AddRepoTopic(string, string, string) (*gitea.Response, error)
ListRepoHooks(string, string, gitea.ListHooksOptions) ([]*gitea.Hook, *gitea.Response, error)
ListOrgRepos(string, gitea.ListOrgReposOptions) ([]*gitea.Repository, *gitea.Response, error)
CreateRepoHook(string, string, gitea.CreateHookOption) (*gitea.Hook, *gitea.Response, error)
DeleteRepoHook(string, string, int64) (*gitea.Response, error)
ListRepoTopics(string, string, gitea.ListRepoTopicsOptions) ([]string, *gitea.Response, error)
ListMyOrgs(gitea.ListOrgsOptions) ([]*gitea.Organization, *gitea.Response, error)
DeleteRepo(string, string) (*gitea.Response, error)
}
Client describes the interface of Gitea Client
Click to show internal directories.
Click to hide internal directories.