download

package
v2.23.1-dev.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentFlag               = "environment"
	UrlFlag                       = "url"
	ManifestFlag                  = "manifest"
	TokenFlag                     = "token"
	OAuthIdFlag                   = "oauth-client-id"
	OAuthSecretFlag               = "oauth-client-secret"
	ApiFlag                       = "api"
	SettingsSchemaFlag            = "settings-schema"
	ProjectFlag                   = "project"
	OutputFolderFlag              = "output-folder"
	ForceFlag                     = "force"
	OnlyApisFlag         OnlyFlag = "only-apis"
	OnlySettingsFlag     OnlyFlag = "only-settings"
	OnlyAutomationFlag   OnlyFlag = "only-automation"
	OnlyDocumentsFlag    OnlyFlag = "only-documents"
	OnlyBucketsFlag      OnlyFlag = "only-buckets"
	OnlyOpenPipelineFlag OnlyFlag = "only-openpipeline"
	OnlySloV2Flag        OnlyFlag = "only-slo-v2"
	OnlySegmentsFlag     OnlyFlag = "only-segments"
)

Variables

This section is empty.

Functions

func GetDownloadCommand

func GetDownloadCommand(fs afero.Fs, command Command) (cmd *cobra.Command)

Types

type Command

type Command interface {
	DownloadConfigsBasedOnManifest(ctx context.Context, fs afero.Fs, cmdOptions downloadCmdOptions) error
	DownloadConfigs(ctx context.Context, fs afero.Fs, cmdOptions downloadCmdOptions) error
}

Command is used to test the CLi commands properly without executing the actual monaco download.

The actual implementations are in the DefaultCommand struct.

type DefaultCommand

type DefaultCommand struct{}

DefaultCommand is used to implement the Command interface.

func (DefaultCommand) DownloadConfigs

func (d DefaultCommand) DownloadConfigs(ctx context.Context, fs afero.Fs, cmdOptions downloadCmdOptions) error

func (DefaultCommand) DownloadConfigsBasedOnManifest

func (d DefaultCommand) DownloadConfigsBasedOnManifest(ctx context.Context, fs afero.Fs, cmdOptions downloadCmdOptions) error

type Downloadable added in v2.23.1

type Downloadable interface {

	// Download returns downloaded project.ConfigsPerType, and an error, if something went wrong during the download.
	// The string projectName is used to set the Project attribute of each downloaded config.
	Download(ctx context.Context, projectName string) (project.ConfigsPerType, error)
}

type OnlyFlag added in v2.23.1

type OnlyFlag = string

type OnlyOptions added in v2.23.1

type OnlyOptions map[OnlyFlag]bool

func (OnlyOptions) IsSingleOption added in v2.23.1

func (o OnlyOptions) IsSingleOption(f OnlyFlag) bool

IsSingleOption returns true if the provided "only" flag is the only one being enabled

func (OnlyOptions) OnlyCount added in v2.23.1

func (o OnlyOptions) OnlyCount() int

OnlyCount returns the amount of enabled "only" flags

func (OnlyOptions) ShouldDownload added in v2.23.1

func (o OnlyOptions) ShouldDownload(f OnlyFlag) bool

ShouldDownload returns true if the provided "only" flag is enabled or if no flag is set at all

Jump to

Keyboard shortcuts

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