...

Source file src/github.com/redhat-developer/odo/pkg/libdevfile/component_openshift.go

Documentation: github.com/redhat-developer/odo/pkg/libdevfile

     1  package libdevfile
     2  
     3  import (
     4  	"github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
     5  	"github.com/devfile/library/v2/pkg/devfile/parser"
     6  )
     7  
     8  // openshiftComponent implements the component interface
     9  type openshiftComponent struct {
    10  	component  v1alpha2.Component
    11  	devfileObj parser.DevfileObj
    12  }
    13  
    14  var _ component = (*openshiftComponent)(nil)
    15  
    16  func newOpenshiftComponent(devfileObj parser.DevfileObj, component v1alpha2.Component) *openshiftComponent {
    17  	return &openshiftComponent{
    18  		component:  component,
    19  		devfileObj: devfileObj,
    20  	}
    21  }
    22  
    23  func (e *openshiftComponent) CheckValidity() error {
    24  	return nil
    25  }
    26  
    27  func (e *openshiftComponent) Apply(handler Handler, kind v1alpha2.CommandGroupKind) error {
    28  	return handler.ApplyOpenShift(e.component, kind)
    29  }
    30  

View as plain text