github.com/rancher/types@v0.0.0-20220328215343-4370ff10ecd5/mapper/container_probe.go (about)

     1  package mapper
     2  
     3  import (
     4  	"github.com/rancher/norman/types"
     5  	"github.com/rancher/norman/types/convert"
     6  	"github.com/rancher/norman/types/values"
     7  )
     8  
     9  type ContainerProbeHandler struct {
    10  }
    11  
    12  func (n ContainerProbeHandler) FromInternal(data map[string]interface{}) {
    13  	value := values.GetValueN(data, "tcpSocket", "port")
    14  	if !convert.IsAPIObjectEmpty(value) {
    15  		data["tcp"] = true
    16  	}
    17  }
    18  
    19  func (n ContainerProbeHandler) ToInternal(data map[string]interface{}) error {
    20  	return nil
    21  }
    22  
    23  func (n ContainerProbeHandler) ModifySchema(schema *types.Schema, schemas *types.Schemas) error {
    24  	return nil
    25  }