ComposeFile.AddSecret
Method
type ComposeFile interface { // ... omitted for brevity AddSecret( name string, options ...*AddSecretOptions, ) ComposeFile}Signature
method
AddSecret Adds a top-level secret definition to the Docker Compose file.
AddSecret( name string, options ...*AddSecretOptions,) ComposeFileParameters
namestringThe name of the secret.options...*AddSecretOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddSecretOptions argument.
File*stringThe path to the secret file.External*boolA value indicating whether the secret is managed outside the generated Compose file.Configurefunc(obj Secret) callbackAn optional callback for further secret customization.Returns
ComposeFile The updated Docker Compose file.
Returns a handle; failures surface later via Err().
Defined on
This method is defined on the following type: