...

Source file src/github.com/redhat-developer/odo/pkg/api/component.go

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

     1  package api
     2  
     3  // Component describes the state of a devfile component
     4  type Component struct {
     5  	DevfilePath       string            `json:"devfilePath,omitempty"`
     6  	DevfileData       *DevfileData      `json:"devfileData,omitempty"`
     7  	DevControlPlane   []DevControlPlane `json:"devControlPlane,omitempty"`
     8  	DevForwardedPorts []ForwardedPort   `json:"devForwardedPorts,omitempty"`
     9  	// RunningIn is the overall running mode map of the component;
    10  	// this is computing as a merge of RunningOn (all the different running modes
    11  	// for each platform the component is running on).
    12  	RunningIn RunningModes `json:"runningIn"`
    13  	// RunningOn represents the map of running modes for each platform the component is running on.
    14  	// The key is the platform, either cluster or podman.
    15  	RunningOn map[string]RunningModes `json:"runningOn,omitempty"`
    16  	Ingresses []ConnectionData        `json:"ingresses,omitempty"`
    17  	Routes    []ConnectionData        `json:"routes,omitempty"`
    18  	ManagedBy string                  `json:"managedBy"`
    19  }
    20  
    21  type ForwardedPort struct {
    22  	Platform      string `json:"platform,omitempty"`
    23  	ContainerName string `json:"containerName"`
    24  	PortName      string `json:"portName"`
    25  	IsDebug       bool   `json:"isDebug"`
    26  	LocalAddress  string `json:"localAddress"`
    27  	LocalPort     int    `json:"localPort"`
    28  	ContainerPort int    `json:"containerPort"`
    29  	Exposure      string `json:"exposure,omitempty"`
    30  	Protocol      string `json:"protocol,omitempty"`
    31  }
    32  
    33  func (o ForwardedPort) GetPlatform() string {
    34  	return o.Platform
    35  }
    36  
    37  type DevControlPlane struct {
    38  	Platform         string `json:"platform,omitempty"`
    39  	LocalPort        int    `json:"localPort"`
    40  	APIServerPath    string `json:"apiServerPath"`
    41  	WebInterfacePath string `json:"webInterfacePath,omitempty"`
    42  }
    43  
    44  func (o DevControlPlane) GetPlatform() string {
    45  	return o.Platform
    46  }
    47  
    48  type ConnectionData struct {
    49  	Name  string  `json:"name"`
    50  	Rules []Rules `json:"rules,omitempty"`
    51  }
    52  
    53  type Rules struct {
    54  	Host  string   `json:"host"`
    55  	Paths []string `json:"paths"`
    56  }
    57  

View as plain text