This section is empty.


This section is empty.


This section is empty.


type PortSpec

type PortSpec struct {
	Min uint16 `json:"Min,omitempty"`
	Max uint16 `json:"Max,omitempty"`
	// contains filtered or unexported fields

    PortSpec is the specification of a port or port range

    func NewPortSpec

    func NewPortSpec(min, max uint16, value interface{}) (*PortSpec, error)

      NewPortSpec creates a new port spec

      func NewPortSpecFromString

      func NewPortSpecFromString(ports string, value interface{}) (*PortSpec, error)

        NewPortSpecFromString creates a new port spec

        func (*PortSpec) IsMultiPort

        func (s *PortSpec) IsMultiPort() bool

          IsMultiPort returns true if the spec is for multiple ports.

          func (*PortSpec) Range

          func (s *PortSpec) Range() (uint16, uint16)

            Range returns the range of a spec.

            func (*PortSpec) SinglePort

            func (s *PortSpec) SinglePort() (uint16, error)

              SinglePort returns the port of a non multi-port spec

              func (*PortSpec) String

              func (s *PortSpec) String() string

                MultiPort returns the multi-port range as a string.

                func (*PortSpec) Value

                func (s *PortSpec) Value() interface{}

                  Value returns the value of the portspec if one is there

                  Source Files