migration

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 10 Imported by: 0

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