Documentation
¶
Index ¶
- Constants
- Variables
- type AuthenticateService
- type HostingService
- func (s *HostingService) CreateRepository(ctx context.Context, ref repository.Reference, ...) (*hosting.Repository, error)
- func (s *HostingService) CreateRepositoryFromTemplate(ctx context.Context, ref repository.Reference, tmp repository.Reference, ...) (*hosting.Repository, error)
- func (s *HostingService) DeleteRepository(ctx context.Context, reference repository.Reference) error
- func (s *HostingService) ForkRepository(ctx context.Context, ref repository.Reference, target repository.Reference, ...) (*hosting.Repository, error)
- func (s *HostingService) GetRepository(ctx context.Context, reference repository.Reference) (*hosting.Repository, error)
- func (s *HostingService) GetTokenFor(ctx context.Context, host, owner string) (string, auth.Token, error)
- func (s *HostingService) GetURLOf(ref repository.Reference) (*url.URL, error)
- func (s *HostingService) ListRepository(ctx context.Context, opts hosting.ListRepositoryOptions) iter.Seq2[*hosting.Repository, error]
- func (s *HostingService) ParseURL(u *url.URL) (*repository.Reference, error)
- type Token
Constants ¶
View Source
const ( GlobalHost = "github.com" GlobalAPIHost = "api.github.com" ClientID = "Ov23li6aEWIxek6F8P5L" )
View Source
const (
RepoListMaxLimitPerPage = 100
)
Variables ¶
View Source
var ErrTokenNotFound = errors.New("no token found")
Functions ¶
This section is empty.
Types ¶
type AuthenticateService ¶
type AuthenticateService struct{}
func NewAuthenticateService ¶
func NewAuthenticateService() *AuthenticateService
type HostingService ¶
type HostingService struct {
// contains filtered or unexported fields
}
func NewHostingService ¶
func NewHostingService(tokenService auth.TokenService, defaultNameService repository.DefaultNameService) *HostingService
NewHostingService creates a new HostingService instance
func (*HostingService) CreateRepository ¶
func (s *HostingService) CreateRepository( ctx context.Context, ref repository.Reference, opts hosting.CreateRepositoryOptions, ) (*hosting.Repository, error)
func (*HostingService) CreateRepositoryFromTemplate ¶
func (s *HostingService) CreateRepositoryFromTemplate( ctx context.Context, ref repository.Reference, tmp repository.Reference, opts hosting.CreateRepositoryFromTemplateOptions, ) (*hosting.Repository, error)
func (*HostingService) DeleteRepository ¶
func (s *HostingService) DeleteRepository(ctx context.Context, reference repository.Reference) error
DeleteRepository deletes a repository from a remote source
func (*HostingService) ForkRepository ¶
func (s *HostingService) ForkRepository( ctx context.Context, ref repository.Reference, target repository.Reference, opts hosting.ForkRepositoryOptions, ) (*hosting.Repository, error)
ForkRepository implements hosting.HostingService.
func (*HostingService) GetRepository ¶
func (s *HostingService) GetRepository(ctx context.Context, reference repository.Reference) (*hosting.Repository, error)
GetRepository retrieves repository information from a remote source
func (*HostingService) GetTokenFor ¶
func (s *HostingService) GetTokenFor(ctx context.Context, host, owner string) (string, auth.Token, error)
GetTokenFor cache requested token for the host and owner
func (*HostingService) GetURLOf ¶
func (s *HostingService) GetURLOf(ref repository.Reference) (*url.URL, error)
GetURLOf implements hosting.HostingService.
func (*HostingService) ListRepository ¶
func (s *HostingService) ListRepository(ctx context.Context, opts hosting.ListRepositoryOptions) iter.Seq2[*hosting.Repository, error]
ListRepository retrieves a list of repositories from a remote source
func (*HostingService) ParseURL ¶
func (s *HostingService) ParseURL(u *url.URL) (*repository.Reference, error)
ParseURL implements hosting.HostingService.
Click to show internal directories.
Click to hide internal directories.