proxies

package
v2.64.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.55.0

func DeleteByID(client newclient.Client, spaceID string, ID string) error

DeleteByID deletes the machine proxy that matches the input ID.

func Get added in v2.55.0

func Get(client newclient.Client, spaceID string, proxyQuery ProxiesQuery) (*resources.Resources[*Proxy], error)

Get return the machine proxies that match the provided proxies query.

Types

type ProxiesQuery

type ProxiesQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

type Proxy added in v2.13.0

type Proxy struct {
	Name      string               `json:"Name" validate:"required,notblank"`
	SpaceID   string               `json:"SpaceId,omitempty"`
	Host      string               `json:"Host,omitempty"`
	Port      int                  `json:"Port,omitempty"`
	Username  string               `json:"Username,omitempty"`
	Password  *core.SensitiveValue `json:"Password,omitempty"`
	ProxyType string               `json:"ProxyType,omitempty" validate:"oneof=HTTP"`

	resources.Resource
}

func Add added in v2.55.0

func Add(client newclient.Client, proxy *Proxy) (*Proxy, error)

Add creates a new machine proxy.

func GetAll added in v2.55.0

func GetAll(client newclient.Client, spaceID string) ([]*Proxy, error)

GetAll returns all machine proxies. If an error occurs, it returns nil.

func GetByID added in v2.55.0

func GetByID(client newclient.Client, spaceID string, ID string) (*Proxy, error)

GetByID returns the machine proxy that matches the input ID.

func NewProxy added in v2.13.0

func NewProxy(name string, hostname string, username string, password *core.SensitiveValue) *Proxy

func Update added in v2.55.0

func Update(client newclient.Client, resource *Proxy) (*Proxy, error)

Update modifies a machine proxy based on the one provided as input.

func (*Proxy) GetHost added in v2.13.0

func (p *Proxy) GetHost() string

func (*Proxy) GetName added in v2.13.0

func (p *Proxy) GetName() string

func (*Proxy) GetPassword added in v2.13.0

func (p *Proxy) GetPassword() *core.SensitiveValue

func (*Proxy) GetPort added in v2.13.0

func (p *Proxy) GetPort() int

func (*Proxy) GetSpaceID added in v2.13.0

func (p *Proxy) GetSpaceID() string

func (*Proxy) GetUsername added in v2.13.0

func (p *Proxy) GetUsername() string

func (*Proxy) SetHost added in v2.13.0

func (p *Proxy) SetHost(host string)

func (*Proxy) SetName added in v2.13.0

func (p *Proxy) SetName(name string)

func (*Proxy) SetPassword added in v2.13.0

func (p *Proxy) SetPassword(password *core.SensitiveValue)

func (*Proxy) SetPort added in v2.13.0

func (p *Proxy) SetPort(port int)

func (*Proxy) SetSpaceID added in v2.13.0

func (p *Proxy) SetSpaceID(spaceID string)

func (*Proxy) SetUsername added in v2.13.0

func (p *Proxy) SetUsername(username string)

type ProxyService

type ProxyService struct {
	services.CanDeleteService
}

func NewProxyService

func NewProxyService(sling *sling.Sling, uriTemplate string) *ProxyService

func (*ProxyService) GetAll deprecated added in v2.13.0

func (p *ProxyService) GetAll() ([]*Proxy, error)

Deprecated: use proxies.GetAll

func (*ProxyService) GetById deprecated added in v2.16.0

func (p *ProxyService) GetById(id string) (*Proxy, error)

Deprecated: use proxies.GetByID

Jump to

Keyboard shortcuts

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