...

Source file src/github.com/redhat-developer/odo/pkg/binding/backend/interface.go

Documentation: github.com/redhat-developer/odo/pkg/binding/backend

     1  package backend
     2  
     3  import (
     4  	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
     5  	"k8s.io/apimachinery/pkg/runtime/schema"
     6  
     7  	"github.com/redhat-developer/odo/pkg/binding/asker"
     8  )
     9  
    10  type AddBindingBackend interface {
    11  	// SelectNamespace returns the namespace which services instances should be listed from.
    12  	// An empty return value means that service instances will be listed from the current namespace.
    13  	SelectNamespace(flags map[string]string) (string, error)
    14  	// Validate returns error if the backend failed to validate; mainly useful for flags backend
    15  	Validate(flags map[string]string, withDevfile bool) error
    16  	// SelectWorkloadInstance asks user to select the workload to be bind;
    17  	// it returns the workload name in the form of '<name> (<kind>.<apigroup>)'
    18  	SelectWorkloadInstance(workloadName string) (string, schema.GroupVersionKind, error)
    19  	// SelectServiceInstance asks user to select the service to be bound to the component;
    20  	// it returns the service name in the form of '<name> (<kind>.<apigroup>)'
    21  	SelectServiceInstance(serviceName string, serviceMap map[string]unstructured.Unstructured) (string, error)
    22  	// AskBindingName asks for the service name to be set
    23  	AskBindingName(defaultName string, flags map[string]string) (string, error)
    24  	// AskBindAsFiles asks if service should be binded as files
    25  	AskBindAsFiles(flags map[string]string) (bool, error)
    26  	// AskNamingStrategy asks for the naming strategy to be used
    27  	AskNamingStrategy(flags map[string]string) (string, error)
    28  	// SelectCreationOption asks to select how to output the created servicebinding
    29  	SelectCreationOptions(flags map[string]string) ([]asker.CreationOption, error)
    30  	// AskOutputFilePath asks for the path of the file to output service binding
    31  	AskOutputFilePath(flags map[string]string, defaultValue string) (string, error)
    32  }
    33  

View as plain text