expose

package
v0.0.0-...-3d8ba93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ExposeType = "expose"

Variables

This section is empty.

Functions

func FromTrait

func FromTrait(from common.ApplicationTrait) (apis.Trait, error)

Types

type ExposeSpec

type ExposeSpec struct {
	// Specify the annotations of the exposed service
	Annotations map[string]string `json:"annotations"`
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
	// Deprecated, the old way to specify the exposion ports
	Port []int32 `json:"port,omitempty"`
	// Specify portsyou want customer traffic sent to
	Ports []Ports `json:"ports,omitempty"`
	// Specify what kind of Service you want. options: \"ClusterIP\",\"NodePort\",\"LoadBalancer\",\"ExternalName\"
	Type *string `json:"type"`
}

ExposeSpec struct for ExposeSpec

func NewExposeSpec

func NewExposeSpec() *ExposeSpec

NewExposeSpec is short for NewExposeSpecWithDefault which instantiates a new ExposeSpec object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewExposeSpecEmpty

func NewExposeSpecEmpty() *ExposeSpec

NewExposeSpecEmpty instantiates a new ExposeSpec object with no properties set. This constructor will not assign any default values to properties.

func NewExposeSpecList

func NewExposeSpecList(ps ...*ExposeSpec) []ExposeSpec

NewExposeSpecs converts a list ExposeSpec pointers to objects. This is helpful when the SetExposeSpec requires a list of objects

func NewExposeSpecWith

func NewExposeSpecWith(annotations map[string]string, type_ string) *ExposeSpec

NewExposeSpecWith instantiates a new ExposeSpec object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewExposeSpecWithDefault

func NewExposeSpecWithDefault() *ExposeSpec

NewExposeSpecWithDefault instantiates a new ExposeSpec object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (ExposeSpec) MarshalJSON

func (o ExposeSpec) MarshalJSON() ([]byte, error)

func (ExposeSpec) ToMap

func (o ExposeSpec) ToMap() (map[string]interface{}, error)

type ExposeTrait

type ExposeTrait struct {
	Base       apis.TraitBase
	Properties ExposeSpec
}

func Expose

func Expose() *ExposeTrait

func (*ExposeTrait) Build

func (e *ExposeTrait) Build() common.ApplicationTrait

func (*ExposeTrait) DefType

func (e *ExposeTrait) DefType() string

func (*ExposeTrait) FromTrait

func (e *ExposeTrait) FromTrait(from common.ApplicationTrait) (*ExposeTrait, error)

func (*ExposeTrait) GetAnnotations

func (o *ExposeTrait) GetAnnotations() map[string]string

GetAnnotations returns the Annotations field value

func (*ExposeTrait) GetAnnotationsOk

func (o *ExposeTrait) GetAnnotationsOk() (map[string]string, bool)

GetAnnotationsOk returns a tuple with the Annotations field value and a boolean to check if the value has been set.

func (*ExposeTrait) GetMatchLabels

func (o *ExposeTrait) GetMatchLabels() map[string]string

GetMatchLabels returns the MatchLabels field value if set, zero value otherwise.

func (*ExposeTrait) GetMatchLabelsOk

func (o *ExposeTrait) GetMatchLabelsOk() (map[string]string, bool)

GetMatchLabelsOk returns a tuple with the MatchLabels field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ExposeTrait) GetPort

func (o *ExposeTrait) GetPort() []int32

GetPort returns the Port field value if set, zero value otherwise.

func (*ExposeTrait) GetPortOk

func (o *ExposeTrait) GetPortOk() ([]int32, bool)

GetPortOk returns a tuple with the Port field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ExposeTrait) GetPorts

func (o *ExposeTrait) GetPorts() []Ports

GetPorts returns the Ports field value if set, zero value otherwise.

func (*ExposeTrait) GetPortsOk

func (o *ExposeTrait) GetPortsOk() ([]Ports, bool)

GetPortsOk returns a tuple with the Ports field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ExposeTrait) GetType

func (o *ExposeTrait) GetType() string

GetType returns the Type field value

func (*ExposeTrait) GetTypeOk

func (o *ExposeTrait) GetTypeOk() (*string, bool)

GetTypeOk returns a tuple with the Type field value and a boolean to check if the value has been set.

func (*ExposeTrait) HasMatchLabels

func (o *ExposeTrait) HasMatchLabels() bool

HasMatchLabels returns a boolean if a field has been set.

func (*ExposeTrait) HasPort

func (o *ExposeTrait) HasPort() bool

HasPort returns a boolean if a field has been set.

func (*ExposeTrait) HasPorts

func (o *ExposeTrait) HasPorts() bool

HasPorts returns a boolean if a field has been set.

func (*ExposeTrait) SetAnnotations

func (o *ExposeTrait) SetAnnotations(v map[string]string) *ExposeTrait

SetAnnotations sets field value

func (*ExposeTrait) SetMatchLabels

func (o *ExposeTrait) SetMatchLabels(v map[string]string) *ExposeTrait

SetMatchLabels gets a reference to the given map[string]string and assigns it to the matchLabels field. MatchLabels:

func (*ExposeTrait) SetPort

func (o *ExposeTrait) SetPort(v []int32) *ExposeTrait

SetPort gets a reference to the given []int32 and assigns it to the port field. Port: Deprecated, the old way to specify the exposion ports

func (*ExposeTrait) SetPorts

func (o *ExposeTrait) SetPorts(v []Ports) *ExposeTrait

SetPorts gets a reference to the given []Ports and assigns it to the ports field. Ports: Specify portsyou want customer traffic sent to

func (*ExposeTrait) SetType

func (o *ExposeTrait) SetType(v string) *ExposeTrait

SetType sets field value

func (*ExposeTrait) Validate

func (o *ExposeTrait) Validate() error

Validate validates this ExposeSpec 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type NullableExposeSpec

type NullableExposeSpec struct {
	// contains filtered or unexported fields
}

func NewNullableExposeSpec

func NewNullableExposeSpec(val *ExposeSpec) *NullableExposeSpec

func (*NullableExposeSpec) Get

func (v *NullableExposeSpec) Get() *ExposeSpec

func (*NullableExposeSpec) IsSet

func (v *NullableExposeSpec) IsSet() bool

func (NullableExposeSpec) MarshalJSON

func (v NullableExposeSpec) MarshalJSON() ([]byte, error)

func (*NullableExposeSpec) Set

func (v *NullableExposeSpec) Set(val *ExposeSpec)

func (*NullableExposeSpec) UnmarshalJSON

func (v *NullableExposeSpec) UnmarshalJSON(src []byte) error

func (*NullableExposeSpec) Unset

func (v *NullableExposeSpec) Unset()

type NullablePorts

type NullablePorts struct {
	// contains filtered or unexported fields
}

func NewNullablePorts

func NewNullablePorts(val *Ports) *NullablePorts

func (*NullablePorts) Get

func (v *NullablePorts) Get() *Ports

func (*NullablePorts) IsSet

func (v *NullablePorts) IsSet() bool

func (NullablePorts) MarshalJSON

func (v NullablePorts) MarshalJSON() ([]byte, error)

func (*NullablePorts) Set

func (v *NullablePorts) Set(val *Ports)

func (*NullablePorts) UnmarshalJSON

func (v *NullablePorts) UnmarshalJSON(src []byte) error

func (*NullablePorts) Unset

func (v *NullablePorts) Unset()

type Ports

type Ports struct {
	// Name of the port
	Name *string `json:"name,omitempty"`
	// exposed node port. Only Valid when exposeType is NodePort
	NodePort *int32 `json:"nodePort,omitempty"`
	// Number of port to expose on the pod's IP address
	Port *int32 `json:"port"`
	// Protocol for port. Must be UDP, TCP, or SCTP
	Protocol *string `json:"protocol"`
}

Ports struct for Ports

func NewPorts

func NewPorts() *Ports

NewPorts is short for NewPortsWithDefault which instantiates a new Ports object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewPortsEmpty

func NewPortsEmpty() *Ports

NewPortsEmpty instantiates a new Ports object with no properties set. This constructor will not assign any default values to properties.

func NewPortsList

func NewPortsList(ps ...*Ports) []Ports

NewPortss converts a list Ports pointers to objects. This is helpful when the SetPorts requires a list of objects

func NewPortsWith

func NewPortsWith(port int32, protocol string) *Ports

NewPortsWith instantiates a new Ports object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewPortsWithDefault

func NewPortsWithDefault() *Ports

NewPortsWithDefault instantiates a new Ports object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Ports) GetName

func (o *Ports) GetName() string

GetName returns the Name field value if set, zero value otherwise.

func (*Ports) GetNameOk

func (o *Ports) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Ports) GetNodePort

func (o *Ports) GetNodePort() int32

GetNodePort returns the NodePort field value if set, zero value otherwise.

func (*Ports) GetNodePortOk

func (o *Ports) GetNodePortOk() (*int32, bool)

GetNodePortOk returns a tuple with the NodePort field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Ports) GetPort

func (o *Ports) GetPort() int32

GetPort returns the Port field value

func (*Ports) GetPortOk

func (o *Ports) GetPortOk() (*int32, bool)

GetPortOk returns a tuple with the Port field value and a boolean to check if the value has been set.

func (*Ports) GetProtocol

func (o *Ports) GetProtocol() string

GetProtocol returns the Protocol field value

func (*Ports) GetProtocolOk

func (o *Ports) GetProtocolOk() (*string, bool)

GetProtocolOk returns a tuple with the Protocol field value and a boolean to check if the value has been set.

func (*Ports) HasName

func (o *Ports) HasName() bool

HasName returns a boolean if a field has been set.

func (*Ports) HasNodePort

func (o *Ports) HasNodePort() bool

HasNodePort returns a boolean if a field has been set.

func (Ports) MarshalJSON

func (o Ports) MarshalJSON() ([]byte, error)

func (*Ports) SetName

func (o *Ports) SetName(v string) *Ports

SetName gets a reference to the given string and assigns it to the name field. Name: Name of the port

func (*Ports) SetNodePort

func (o *Ports) SetNodePort(v int32) *Ports

SetNodePort gets a reference to the given int32 and assigns it to the nodePort field. NodePort: exposed node port. Only Valid when exposeType is NodePort

func (*Ports) SetPort

func (o *Ports) SetPort(v int32) *Ports

SetPort sets field value

func (*Ports) SetProtocol

func (o *Ports) SetProtocol(v string) *Ports

SetProtocol sets field value

func (Ports) ToMap

func (o Ports) ToMap() (map[string]interface{}, error)

func (*Ports) Validate

func (o *Ports) Validate() error

Validate validates this Ports 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL