migration

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// project permission
	ProjectAdmin = "PROJECT_ADMIN"
	ProjectWrite = "PROJECT_WRITE"
	ProjectRead  = "PROJECT_READ"
	// repo permission
	RepoAdmin  = "REPO_ADMIN"
	RepoWrite  = "REPO_WRITE"
	RepoRead   = "REPO_READ"
	RepoCreate = "REPO_CREATE"
)

Variables

This section is empty.

Functions

func NewBitbucket

func NewBitbucket(ctx context.Context, logger *slog.Logger) (*bitbucket, error)

NewBitbucket creates a new instance of the bitbucket struct.

func NewGitea

func NewGitea(ctx context.Context, logger *slog.Logger) (*gitea, error)

NewGitea creates a new instance of the gitea struct.

func NewMigration

func NewMigration(ctx context.Context, opts Option) (*migration, error)

NewMigration creates a new instance of the migration struct.

Types

type CreateNewOrgOption

type CreateNewOrgOption struct {
	Name        string
	Description string
	Public      bool
	Permission  map[string][]string
}

CreateNewOrgOption create new organization option

type CreateOrgOption

type CreateOrgOption struct {
	Name        string
	Description string
	Visibility  bool
}

CreateOrgOption create organization option

type CreateUserOption

type CreateUserOption struct {
	SourceID  int64
	LoginName string
	Username  string
	FullName  string
	Email     string
}

type MigrateNewRepoOption

type MigrateNewRepoOption struct {
	Owner       string
	Name        string
	CloneAddr   string
	Description string
	Private     bool
	Permission  map[string][]string
}

MigrateNewRepoOption migrate repository option

type MigrateRepoOption

type MigrateRepoOption struct {
	RepoName     string
	RepoOwner    string
	CloneAddr    string
	Private      bool
	Description  string
	AuthUsername string
	AuthPassword string
}

MigrateRepoOption migrate repository option

type Option

type Option struct {
	Debug bool
}

Option migration option

type ProjectResponse

type ProjectResponse struct {
	Project    bitbucketv1.Project
	Permission map[string][]string
}

ProjectResponse project response

type RepositoryResponse

type RepositoryResponse struct {
	Repository bitbucketv1.Repository
	Permission map[string][]string
}

RepositoryResponse repository response

Jump to

Keyboard shortcuts

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