Documentation
¶
Index ¶
- Constants
- func CheckCredentialRequests(executor *toi.Executor, spec *toi.PackageSpecification, ...) (map[string]CredentialsRequestSpec, map[string]string, error)
- func GetResource(res ocm.ResourceAccess, target interface{}) error
- func NewFunctions(ctx ocm.Context, credvals CredentialValues) spiffing.Functions
- func ProcessConfig(name string, octx ocm.Context, cv ocm.ComponentVersionAccess, ...) ([]byte, error)
- func ValidateByScheme(src []byte, schemedata []byte) error
- type CredentialSpec
- type CredentialValues
- type Credentials
- type CredentialsRequest
- type CredentialsRequestSpec
- type Driver
- type ExecutorContext
- type Operation
- type OperationResult
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CheckCredentialRequests ¶
func CheckCredentialRequests(executor *toi.Executor, spec *toi.PackageSpecification, espec *toi.ExecutorSpecification) (map[string]CredentialsRequestSpec, map[string]string, error)
CheckCredentialRequests determine required credentials for executor.
func GetResource ¶
func GetResource(res ocm.ResourceAccess, target interface{}) error
func NewFunctions ¶ added in v0.3.0
func NewFunctions(ctx ocm.Context, credvals CredentialValues) spiffing.Functions
func ProcessConfig ¶
func ProcessConfig(name string, octx ocm.Context, cv ocm.ComponentVersionAccess, resolver ocm.ComponentVersionResolver, template []byte, config []byte, libraries []metav1.ResourceReference, schemedata []byte) ([]byte, error)
func ValidateByScheme ¶
Types ¶
type CredentialSpec ¶
type CredentialSpec = toi.CredentialSpec
type CredentialValues ¶ added in v0.3.0
type CredentialValues map[string]common.Properties
func GetCredentials ¶
func GetCredentials(ctx credentials.Context, spec *Credentials, req map[string]CredentialsRequestSpec, mapping map[string]string) (*globalconfig.Config, CredentialValues, error)
type Credentials ¶
type Credentials = toi.Credentials
func ParseCredentialSpecification ¶
func ParseCredentialSpecification(data []byte, desc string) (*Credentials, error)
type CredentialsRequest ¶
type CredentialsRequest = toi.CredentialsRequest
func ParseCredentialRequest ¶
func ParseCredentialRequest(data []byte) (*CredentialsRequest, error)
type CredentialsRequestSpec ¶
type CredentialsRequestSpec = toi.CredentialsRequestSpec
type ExecutorContext ¶
type ExecutorContext struct {
Spec toi.ExecutorSpecification
Image *toi.Image
CV ocm.ComponentVersionAccess
}
func DetermineExecutor ¶
func DetermineExecutor(executor *toi.Executor, octx ocm.Context, cv ocm.ComponentVersionAccess, resolver ocm.ComponentVersionResolver) (*ExecutorContext, error)
type Operation ¶
type Operation struct {
// Action is the action to be performed. It is passed a srgument to the executable
Action string
// ComponentVersion is the name of the root component/version to install
ComponentVersion string
// Image is the image to invoke
Image toi.Image
// Environment contains environment variables that should be injected into the container execution
Environment map[string]string
// Files contains files that should be injected into the invocation image.
Files map[string]blobaccess.BlobAccess
// Outputs map of output (sub)paths (e.g. NAME) to the name of the output.
// Indicates which outputs the driver should return the contents of in the OperationResult.
Outputs map[string]string
// Output stream for log messages from the driver
Out io.Writer
// Output stream for error messages from the driver
Err io.Writer
}
Operation describes the data passed into the driver to run an operation.
type OperationResult ¶
type OperationResult struct {
// Outputs maps from the name of the output to its content.
Outputs map[string][]byte
// Error is any errors from executing the operation.
Error error
}
OperationResult is the output of the Driver running an Operation.
func Execute ¶
func Execute(p common.Printer, d Driver, name string, rid metav1.Identity, credsrc blobaccess.DataSource, paramsrc blobaccess.DataSource, octx ocm.Context, cv ocm.ComponentVersionAccess, resolver ocm.ComponentVersionResolver) (*OperationResult, error)
func ExecuteAction ¶
func ExecuteAction(p common.Printer, d Driver, name string, spec *toi.PackageSpecification, creds *Credentials, params []byte, octxp ocm.ContextProvider, cv ocm.ComponentVersionAccess, resolver ocm.ComponentVersionResolver) (*OperationResult, error)
ExecuteAction prepared the execution options and executes the action.
Click to show internal directories.
Click to hide internal directories.