repositoryCommands

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands interface {
	New(ctx *cli.Context) error
	Edit(ctx *cli.Context) error
	Import(ctx *cli.Context) error
	CheckoutCmd() common.Command
	CloneCmd() common.Command
	PushCmd() common.Command
	PullCmd() common.Command
}

func InitCommand

func InitCommand(new *LibCommands) Commands

type Getter

type Getter interface {
	Name() string
	Description() string
	RepoName() string
	RepoID() string
	Branch() string
	RepositoryURL() string
}

type LibCommands

type LibCommands struct {
	// New
	PromptNew         func(*cli.Context) (interface{}, Resource, error)
	LibNew            func(Resource) error
	I18nCreated       func(string)
	PromptsCreateThis string

	// Edit
	PromptsGetOrSelect func(*cli.Context) (Resource, error)
	PromptsEdit        func(*cli.Context, Resource) (interface{}, error)
	I18nEdited         func(string)
	PromptsEditThis    string

	// Repository
	I18nCheckedOut func(url string, branch string)
	I18nPulled     func(url string)
	I18nPushed     func(url string, commitMessage string)

	// Common
	Type           repositoryLib.RepositoryType
	LibSet         func(Resource) error
	TableConfirm   func(*cli.Context, Resource, string) bool
	I18nRegistered func(string)
}

type Resource

type Resource interface {
	Get() Getter
	Set() Setter
}

type Setter

type Setter interface {
	RepoID(string)
	RepoName(string)
}

Jump to

Keyboard shortcuts

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