cli

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationFlow added in v0.3.1

func AuthenticationFlow(service config.ServiceConfig, backend auth.OAuth2Authenticator)

func GetServiceConfigFromFlag

func GetServiceConfigFromFlag(cmd *cobra.Command, flagName string) (config.ServiceConfig, error)

func Prompt

func Prompt(opt models.BackendOption) (any, error)

func PromptBool

func PromptBool(opt models.BackendOption) (bool, error)

func PromptExtraOptions

func PromptExtraOptions(config config.ServiceConfig) (config.ServiceConfig, error)

func PromptInt added in v0.4.0

func PromptInt(opt models.BackendOption) (int, error)

func PromptSecret

func PromptSecret(opt models.BackendOption) (string, error)

func PromptString

func PromptString(opt models.BackendOption) (string, error)

func PromptYesNo

func PromptYesNo(label string, defaultValue bool) (bool, error)

func SelectBackend

func SelectBackend(selected string) (string, error)

func SelectService

func SelectService(cmd *cobra.Command) (config.ServiceConfig, error)

Types

type TransferCmd

type TransferCmd[E models.Backend, I models.ImportBackend, R models.ListensResult | models.LovesResult] struct {
	ExpBackend E
	ImpBackend I
	// contains filtered or unexported fields
}

func NewTransferCmd

func NewTransferCmd[
	E models.Backend,
	I models.ImportBackend,
	R models.ListensResult | models.LovesResult,
](
	cmd *cobra.Command,
	db *storage.Database,
	entity models.Entity,
	source string,
	target string,
) (TransferCmd[E, I, R], error)

func (*TransferCmd[E, I, R]) Transfer

func (c *TransferCmd[E, I, R]) Transfer(exp backends.ExportProcessor[R], imp backends.ImportProcessor[R]) error

Jump to

Keyboard shortcuts

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