Documentation ¶
Index ¶
- func GenerateManifest(ctx context.Context, options GenerateManifestOptions) (*api.Manifest, error)
- func ReadManifest(options PromoteFilesOptions) (*api.Manifest, error)
- func ReadManifests(options PromoteFilesOptions) ([]*api.Manifest, error)
- func RunPromoteFiles(ctx context.Context, options PromoteFilesOptions) error
- type GenerateManifestOptions
- type PromoteFilesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateManifest ¶
GenerateManifest generates a manifest containing the files in options.BaseDir
func ReadManifest ¶
func ReadManifest(options PromoteFilesOptions) (*api.Manifest, error)
ReadManifest reads a manifest.
func ReadManifests ¶
func ReadManifests(options PromoteFilesOptions) ([]*api.Manifest, error)
ReadManifests reads a set of manifests.
func RunPromoteFiles ¶
func RunPromoteFiles(ctx context.Context, options PromoteFilesOptions) error
RunPromoteFiles executes a file promotion command
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 // ManifestsPath specifies a path containing filestores and files for // multiple projects. // // Example layout: // // ├── filestores // │ ├── project1 // │ │ └── filepromoter-manifest.yaml // │ └── project2 // │ └── filepromoter-manifest.yaml // └── manifests // ├── project1 // │ ├── blue.yaml // │ ├── green.yaml // │ └── red.yaml // └── project2 // ├── blue.yaml // ├── green.yaml // └── red.yaml ManifestsPath 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
Click to show internal directories.
Click to hide internal directories.