promobot

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

nolint[lll]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateManifest

func GenerateManifest(ctx context.Context, options GenerateManifestOptions) (*api.Manifest, error)

GenerateManifest generates a manifest containing the files in options.BaseDir nolint[lll]

func ReadManifest

func ReadManifest(options PromoteFilesOptions) (*api.Manifest, error)

ReadManifest reads a manifest.

func RunPromoteFiles

func RunPromoteFiles(ctx context.Context, options PromoteFilesOptions) error

RunPromoteFiles executes a file promotion command nolint[gocyclo]

Types

type GenerateManifestOptions

type GenerateManifestOptions struct {
	// BaseDir is the directory containing the files to hash
	BaseDir string

	// Prefix exports only files matching the specified prefix.
	//
	// If we were instead to change BaseDir, we would also
	// restrict the files, but the relative paths would also
	// change.
	Prefix string
}

GenerateManifestOptions holds the parameters for a hash-files operation.

func (*GenerateManifestOptions) PopulateDefaults

func (o *GenerateManifestOptions) PopulateDefaults()

PopulateDefaults sets the default values for GenerateManifestOptions.

type PromoteFilesOptions

type PromoteFilesOptions struct {
	// FilestoresPath is the path to the manifest file containing the filestores section
	FilestoresPath string

	// FilesPath specifies a path to manifest files containing the files section.
	FilesPath string

	// DryRun (if set) will not perform operations, but print them instead
	DryRun bool

	// UseServiceAccount must be true, for service accounts to be used
	// This gives some protection against a hostile manifest.
	UseServiceAccount bool

	// Out is the destination for "normal" output (such as dry-run)
	Out io.Writer
}

PromoteFilesOptions holds the flag-values for a file promotion

func (*PromoteFilesOptions) PopulateDefaults

func (o *PromoteFilesOptions) PopulateDefaults()

PopulateDefaults sets the default values for PromoteFilesOptions

Jump to

Keyboard shortcuts

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