service

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	OwnerName      string
	RepositoryName string
	CloneURL       string
	Description    string
	Token          string
}

type Provider

type Provider interface {
	GetType() gitea.GitServiceType
	GetHosts() []string

	RetrieveRepoOptions(ctx context.Context, repo *url.URL, login *config.Login) (*Options, error)
	RetrieveProfileOptions(ctx context.Context, owner *url.URL, login *config.Login) ([]Options, error)
}

func NewGitHubProvider

func NewGitHubProvider() Provider

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Register

func (r *Registry) Register(p Provider)

func (*Registry) RetrieveProfileOptions

func (r *Registry) RetrieveProfileOptions(ctx context.Context, profile *url.URL, login *config.Login) ([]gitea.MigrateRepoOption, error)

func (*Registry) RetrieveRepoOptions

func (r *Registry) RetrieveRepoOptions(ctx context.Context, repo *url.URL, login *config.Login) (*gitea.MigrateRepoOption, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL