Documentation
¶
Index ¶
- type CachedGitClient
- func (c *CachedGitClient) Archive(ctx context.Context, opts *domain.ArchiveOptions) (*domain.GetRepoArchiveResp, error)
- func (c *CachedGitClient) Blob(ctx context.Context, opts *domain.BlobOptions) (*domain.GetBlobResp, error)
- func (c *CachedGitClient) Branches(ctx context.Context, opts *domain.BranchesOptions) ([]*domain.BranchInfo, error)
- func (c *CachedGitClient) CheckPAT(ctx context.Context, token, repoURL string) (bool, *domain.BindRepository, error)
- func (c *CachedGitClient) CreateWebhook(ctx context.Context, opts *domain.CreateWebhookOptions) error
- func (c *CachedGitClient) DeleteWebhook(ctx context.Context, opts *domain.WebhookOptions) error
- func (c *CachedGitClient) Logs(ctx context.Context, opts *domain.LogsOptions) (*domain.GetGitLogsResp, error)
- func (c *CachedGitClient) Repositories(ctx context.Context, opts *domain.RepositoryOptions) ([]domain.AuthRepository, error)
- func (c *CachedGitClient) Tree(ctx context.Context, opts *domain.TreeOptions) (*domain.GetRepoTreeResp, error)
- func (c *CachedGitClient) UserInfo(ctx context.Context, token string) (*domain.PlatformUserInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedGitClient ¶
type CachedGitClient struct {
// contains filtered or unexported fields
}
CachedGitClient wraps a GitClienter and adds in-memory caching for Repositories.
func NewCachedGitClient ¶
func NewCachedGitClient(inner domain.GitClienter, c *gocache.Cache, cacheKey string) *CachedGitClient
func (*CachedGitClient) Archive ¶
func (c *CachedGitClient) Archive(ctx context.Context, opts *domain.ArchiveOptions) (*domain.GetRepoArchiveResp, error)
func (*CachedGitClient) Blob ¶
func (c *CachedGitClient) Blob(ctx context.Context, opts *domain.BlobOptions) (*domain.GetBlobResp, error)
func (*CachedGitClient) Branches ¶
func (c *CachedGitClient) Branches(ctx context.Context, opts *domain.BranchesOptions) ([]*domain.BranchInfo, error)
func (*CachedGitClient) CheckPAT ¶
func (c *CachedGitClient) CheckPAT(ctx context.Context, token, repoURL string) (bool, *domain.BindRepository, error)
func (*CachedGitClient) CreateWebhook ¶
func (c *CachedGitClient) CreateWebhook(ctx context.Context, opts *domain.CreateWebhookOptions) error
func (*CachedGitClient) DeleteWebhook ¶
func (c *CachedGitClient) DeleteWebhook(ctx context.Context, opts *domain.WebhookOptions) error
func (*CachedGitClient) Logs ¶
func (c *CachedGitClient) Logs(ctx context.Context, opts *domain.LogsOptions) (*domain.GetGitLogsResp, error)
func (*CachedGitClient) Repositories ¶
func (c *CachedGitClient) Repositories(ctx context.Context, opts *domain.RepositoryOptions) ([]domain.AuthRepository, error)
func (*CachedGitClient) Tree ¶
func (c *CachedGitClient) Tree(ctx context.Context, opts *domain.TreeOptions) (*domain.GetRepoTreeResp, error)
func (*CachedGitClient) UserInfo ¶
func (c *CachedGitClient) UserInfo(ctx context.Context, token string) (*domain.PlatformUserInfo, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gitea 提供 Gitea 客户端功能
|
Package gitea 提供 Gitea 客户端功能 |
|
Package gitee 提供 Gitee 客户端功能
|
Package gitee 提供 Gitee 客户端功能 |
|
Package github 提供 GitHub 客户端功能(PAT 模式,不含 GitHub App)
|
Package github 提供 GitHub 客户端功能(PAT 模式,不含 GitHub App) |
|
Package gitlab 提供 GitLab 客户端功能,支持多个 GitLab 实例
|
Package gitlab 提供 GitLab 客户端功能,支持多个 GitLab 实例 |
Click to show internal directories.
Click to hide internal directories.