Documentation
¶
Overview ¶
Package config contains the logic to manage the config of the packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directories ¶
Directories is the directories of the config.
func (*Directories) GetState ¶
func (d *Directories) GetState() (State, error)
GetState returns the state of the directories.
func (*Directories) PromoteExperiment ¶
func (d *Directories) PromoteExperiment(_ context.Context) error
PromoteExperiment promotes the experiment to the stable.
func (*Directories) RemoveExperiment ¶
func (d *Directories) RemoveExperiment(_ context.Context) error
RemoveExperiment removes the experiment from the directories.
func (*Directories) WriteExperiment ¶
func (d *Directories) WriteExperiment(ctx context.Context, operations Operations) error
WriteExperiment writes the experiment to the directories.
type FileOperation ¶
type FileOperation struct {
FileOperationType FileOperationType `json:"file_op"`
FilePath string `json:"file_path"`
DestinationPath string `json:"destination_path,omitempty"`
Patch json.RawMessage `json:"patch,omitempty"`
}
FileOperation is the operation to perform on a config.
type FileOperationType ¶
type FileOperationType string
FileOperationType is the type of operation to perform on the config.
const ( // FileOperationPatch patches the config at the given path with the given JSON patch (RFC 6902). FileOperationPatch FileOperationType = "patch" // FileOperationMergePatch merges the config at the given path with the given JSON merge patch (RFC 7396). FileOperationMergePatch FileOperationType = "merge-patch" // FileOperationDelete deletes the config at the given path. FileOperationDelete FileOperationType = "delete" // FileOperationDeleteAll deletes the config at the given path and all its subdirectories. FileOperationDeleteAll FileOperationType = "delete-all" // FileOperationCopy copies the config at the given path to the given path. FileOperationCopy FileOperationType = "copy" // FileOperationMove moves the config at the given path to the given path. FileOperationMove FileOperationType = "move" )
type Operations ¶
type Operations struct {
DeploymentID string `json:"deployment_id"`
FileOperations []FileOperation `json:"file_operations"`
}
Operations is the list of operations to perform on the configs.
Click to show internal directories.
Click to hide internal directories.