client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Parser          = flags.NewParser(&opts, flags.Default)
	Table           = table.NewWriter()
	Mapper          = reflectx.NewMapper("json")
	AndromedaClient = client.Default
)
View Source
var DatacenterOptions struct {
	DatacenterList   `command:"list" description:"List Datacenters"`
	DatacenterShow   `command:"show" description:"Show Datacenter"`
	DatacenterCreate `command:"create" description:"Create Datacenter"`
	DatacenterDelete `command:"delete" description:"Delete Datacenter"`
}
View Source
var DomainOptions struct {
	DomainList   `command:"list" description:"List Domains"`
	DomainShow   `command:"show" description:"Show Domain"`
	DomainCreate `command:"create" description:"Create Domain"`
	DomainDelete `command:"delete" description:"Delete Domain"`
	DomainSet    `command:"set" description:"Update Domain"`
}
View Source
var GeomapOptions struct {
	GeomapList   `command:"list" description:"List Geomaps"`
	GeomapShow   `command:"show" description:"Show Geomap"`
	GeomapCreate `command:"create" description:"Create Geomap"`
	GeomapDelete `command:"delete" description:"Delete Geomap"`
}
View Source
var MemberOptions struct {
	MemberList   `command:"list" description:"List Members"`
	MemberShow   `command:"show" description:"Show Member"`
	MemberCreate `command:"create" description:"Create Member"`
	MemberDelete `command:"delete" description:"Delete Member"`
	MemberSet    `command:"set" description:"Update Member"`
}
View Source
var MonitorOptions struct {
	MonitorList   `command:"list" description:"List Monitors"`
	MonitorShow   `command:"show" description:"Show Monitor"`
	MonitorCreate `command:"create" description:"Create Monitor"`
	MonitorDelete `command:"delete" description:"Delete Monitor"`
	MonitorSet    `command:"set" description:"Update Monitor"`
}
View Source
var PoolOptions struct {
	PoolList   `command:"list" description:"List Pools"`
	PoolShow   `command:"show" description:"Show Pool"`
	PoolCreate `command:"create" description:"Create Pool"`
	PoolDelete `command:"delete" description:"Delete Pool"`
}
View Source
var QuotaOptions struct {
	QuotaList     `command:"list" description:"List Quotas"`
	QuotaDefaults `command:"defaults" description:"Show default project quota"`
	QuotaShow     `command:"show" description:"Show project quota"`
	QuotaUpdate   `command:"update" description:"Update project quota"`
	QuotaDelete   `command:"reset" description:"Reset project quota to defaults"`
}
View Source
var ServiceOptions struct {
	ServiceList `command:"list" description:"List Services"`
}

Functions

func SetupClient

func SetupClient()

func WriteTable

func WriteTable(data interface{}) error

WriteTableFromStruct scans a struct and prints content via Table writer

Types

type DatacenterCreate

type DatacenterCreate struct {
	Name            string   `short:"n" long:"name" description:"Name of the Datacenter"`
	Provider        string   `long:"provider" description:"Provider name" required:"true"`
	Continent       *string  `long:"continent" description:"A two-letter code that specifies the continent where the data center maps to"`
	Country         *string  `long:"country" description:"A two-letter ISO 3166 country code that specifies the country where the data center maps to"`
	StateOrProvince *string  `` /* 142-byte string literal not displayed */
	City            *string  `long:"city" description:"The name of the city where the data center is located"`
	Latitude        *float64 `long:"latitude" description:"Specifies the geographical latitude of the data center's position"`
	Longitude       *float64 `long:"longitude" description:"Specifies the geographical longitude of the data center's position"`
	Disable         bool     `short:"d" long:"disable" description:"Disable Datacenter" optional:"true" optional-value:"false"`
}

func (*DatacenterCreate) Execute

func (*DatacenterCreate) Execute(_ []string) error

type DatacenterDelete

type DatacenterDelete struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the datacenter"`
	} `positional-args:"yes" required:"yes"`
}

func (*DatacenterDelete) Execute

func (*DatacenterDelete) Execute(_ []string) error

type DatacenterList

type DatacenterList struct {
}

func (*DatacenterList) Execute

func (*DatacenterList) Execute(_ []string) error

type DatacenterShow

type DatacenterShow struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the datacenter"`
	} `positional-args:"yes" required:"yes"`
}

func (*DatacenterShow) Execute

func (*DatacenterShow) Execute(_ []string) error

type DomainCreate

type DomainCreate struct {
	Name       string        `short:"n" long:"name" description:"Name of the Domain"`
	Provider   string        `short:"v" long:"provider" description:"Provider name" required:"true"`
	FQDN       string        `short:"q" long:"fqdn" description:"Fully qualified domain name" required:"true"`
	Mode       string        `` /* 193-byte string literal not displayed */
	RecordType string        `short:"r" long:"recordtype" description:"Record type" default:"A"`
	Pools      []strfmt.UUID `short:"p" long:"pool" description:"Pool ID to associate, can be specified multiple times"`
	Disable    bool          `short:"d" long:"disable" description:"Disable Domain" optional:"true" optional-value:"false"`
}

func (*DomainCreate) Execute

func (*DomainCreate) Execute(_ []string) error

type DomainDelete

type DomainDelete struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the domain"`
	} `positional-args:"yes" required:"yes"`
}

func (*DomainDelete) Execute

func (*DomainDelete) Execute(_ []string) error

type DomainList

type DomainList struct {
	Long bool `long:"long" description:"List additional fields in output"`
}

func (*DomainList) Execute

func (*DomainList) Execute(_ []string) error

type DomainSet added in v1.0.0

type DomainSet struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the domain"`
	} `positional-args:"yes" required:"yes"`
	Name       string        `short:"n" long:"name" description:"Name of the Domain"`
	FQDN       string        `short:"q" long:"fqdn" description:"Fully qualified domain name"`
	Mode       string        `` /* 187-byte string literal not displayed */
	RecordType string        `short:"r" long:"recordtype" description:"Record type"`
	Pools      []strfmt.UUID `short:"p" long:"pool" description:"Pool ID to associate, can be specified multiple times"`
	NoPools    bool          `long:"no-pools" description:"Remove all pools from domain" optional:"true" optional-value:"true"`
	Disable    bool          `short:"d" long:"disable" description:"Enable Domain" optional:"true" optional-value:"true"`
	Enable     bool          `short:"e" long:"enable" description:"Enable Domain" optional:"true" optional-value:"true"`
}

func (*DomainSet) Execute added in v1.0.0

func (*DomainSet) Execute(_ []string) error

type DomainShow

type DomainShow struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the domain"`
	} `positional-args:"yes" required:"yes"`
}

func (*DomainShow) Execute

func (*DomainShow) Execute(_ []string) error

type GeomapCreate added in v1.0.0

type GeomapCreate struct {
	// Array of datacenter assignments
	Assignment map[string]strfmt.UUID `` /* 154-byte string literal not displayed */
	Default    *strfmt.UUID           `short:"d" long:"default-datacenter" description:"Default datacenter" required:"yes"`
	Name       *string                `short:"n" long:"name" description:"Name of the geographic map"`
	Provider   string                 `short:"p" long:"provider" description:"Provider name"`
	Scope      *string                `short:"s" long:"scope" description:"Scope of the geographic map" default:"private" choice:"private" choice:"shared"`
}

func (*GeomapCreate) Execute added in v1.0.0

func (*GeomapCreate) Execute(_ []string) error

type GeomapDelete added in v1.0.0

type GeomapDelete struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the geographic map"`
	} `positional-args:"yes" required:"yes"`
}

func (*GeomapDelete) Execute added in v1.0.0

func (*GeomapDelete) Execute(_ []string) error

type GeomapList added in v1.0.0

type GeomapList struct {
}

func (*GeomapList) Execute added in v1.0.0

func (*GeomapList) Execute(_ []string) error

type GeomapShow added in v1.0.0

type GeomapShow struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the geographic map"`
	} `positional-args:"yes" required:"yes"`
}

func (*GeomapShow) Execute added in v1.0.0

func (*GeomapShow) Execute(_ []string) error

type MemberCreate

type MemberCreate struct {
	PositionalMemberCreate struct {
		PoolID strfmt.UUID `description:"UUID of the pool"`
	} `positional-args:"yes" required:"yes"`
	Name         string      `short:"n" long:"name" description:"Name of the Member"`
	Address      strfmt.IPv4 `short:"a" long:"address" description:"Address of the Member" required:"true"`
	Port         int64       `short:"p" long:"port" description:"Port of the Member" required:"true"`
	Disable      bool        `short:"d" long:"disable" description:"Disable Member" optional:"true" optional-value:"false"`
	DatacenterID strfmt.UUID `short:"i" long:"datacenter" description:"Datacenter ID"`
}

func (*MemberCreate) Execute

func (*MemberCreate) Execute(_ []string) error

type MemberDelete

type MemberDelete struct {
	PositionalMemberDelete struct {
		UUID strfmt.UUID `description:"UUID of the member"`
	} `positional-args:"yes" required:"yes"`
}

func (*MemberDelete) Execute

func (*MemberDelete) Execute(_ []string) error

type MemberList

type MemberList struct {
	PositionalMemberList struct {
		PoolID strfmt.UUID `description:"UUID of the pool"`
	} `positional-args:"yes"`
}

func (*MemberList) Execute

func (*MemberList) Execute(_ []string) error

type MemberSet added in v1.0.0

type MemberSet struct {
	PositionalMemberSet struct {
		UUID strfmt.UUID `description:"UUID of the member"`
	} `positional-args:"yes" required:"yes"`
	Name    *string      `short:"n" long:"name" description:"Name of the Member"`
	Address *strfmt.IPv4 `short:"a" long:"address" description:"Address of the Member"`
	Port    *int64       `short:"p" long:"port" description:"Port of the Member"`
	Disable bool         `short:"d" long:"disable" description:"Disable Member"`
	Enable  bool         `short:"e" long:"enable" description:"Enable Member"`
}

func (*MemberSet) Execute added in v1.0.0

func (*MemberSet) Execute(_ []string) error

type MemberShow

type MemberShow struct {
	PositionalMemberShow struct {
		MemberID strfmt.UUID `description:"UUID of the member"`
	} `positional-args:"yes" required:"yes"`
}

func (*MemberShow) Execute

func (*MemberShow) Execute(_ []string) error

type MonitorCreate

type MonitorCreate struct {
	Name       string  `short:"n" long:"name" description:"Name of the Monitor"`
	Pool       string  `short:"p" long:"pool" description:"ID of the pool to check members" required:"true"`
	Type       *string `short:"t" long:"type" description:"Type of the health check monitor"`
	Interval   *int64  `short:"i" long:"interval" description:"The interval, in seconds, between health checks." optional:"true"`
	Timeout    *int64  `short:"o" long:"timeout" description:"The time in total, in seconds, after which a health check times out" optional:"true"`
	Send       *string `short:"s" long:"send" description:"Specifies the text string that the monitor sends to the target member." optional:"true"`
	Receive    *string `` /* 140-byte string literal not displayed */
	Disable    bool    `short:"d" long:"disable" description:"Disable Monitor" optional:"true" optional-value:"false"`
	HTTPMethod *string `` /* 213-byte string literal not displayed */
	DomainName *string `short:"D" long:"domain-name" description:"Domain name to use for monitor checks. Only used for HTTP/S monitors."`
}

func (*MonitorCreate) Execute

func (*MonitorCreate) Execute(_ []string) error

type MonitorDelete

type MonitorDelete struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the monitor"`
	} `positional-args:"yes" required:"yes"`
}

func (*MonitorDelete) Execute

func (*MonitorDelete) Execute(_ []string) error

type MonitorList

type MonitorList struct {
	PositionalMonitorList struct {
		PoolID strfmt.UUID `description:"UUID of the pool"`
	} `positional-args:"yes"`
}

func (*MonitorList) Execute

func (*MonitorList) Execute(_ []string) error

type MonitorSet added in v1.0.0

type MonitorSet struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the monitor"`
	} `positional-args:"yes" required:"yes"`
	Name       *string `short:"n" long:"name" description:"Name of the Monitor"`
	Disable    bool    `short:"d" long:"disable" description:"Enable Monitor" optional:"true" optional-value:"true"`
	Enable     bool    `short:"e" long:"enable" description:"Enable Monitor" optional:"true" optional-value:"true"`
	HTTPMethod *string `` /* 213-byte string literal not displayed */
	DomainName *string `short:"D" long:"domain-name" description:"Domain name to use for monitor checks. Only used for HTTP/S monitors."`
}

func (*MonitorSet) Execute added in v1.0.0

func (*MonitorSet) Execute(_ []string) error

type MonitorShow

type MonitorShow struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the monitor"`
	} `positional-args:"yes" required:"yes"`
}

func (*MonitorShow) Execute

func (*MonitorShow) Execute(_ []string) error

type PoolCreate

type PoolCreate struct {
	Name    string   `short:"n" long:"name" description:"Name of the Pool"`
	Domain  []string `short:"a" long:"domain" description:"ID(s) of the associated Domain (multiple domains allowed)"`
	Disable bool     `short:"d" long:"disable" description:"Disable Pool" optional:"true" optional-value:"false"`
}

func (*PoolCreate) Execute

func (*PoolCreate) Execute(_ []string) error

type PoolDelete

type PoolDelete struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the pool"`
	} `positional-args:"yes" required:"yes"`
}

func (*PoolDelete) Execute

func (*PoolDelete) Execute(_ []string) error

type PoolList

type PoolList struct {
}

func (*PoolList) Execute

func (*PoolList) Execute(_ []string) error

type PoolShow

type PoolShow struct {
	Positional struct {
		UUID strfmt.UUID `description:"UUID of the pool"`
	} `positional-args:"yes" required:"yes"`
}

func (*PoolShow) Execute

func (*PoolShow) Execute(_ []string) error

type QuotaDefaults

type QuotaDefaults struct{}

func (*QuotaDefaults) Execute

func (*QuotaDefaults) Execute(_ []string) error

type QuotaDelete

type QuotaDelete struct {
	Positional struct {
		ProjectID strfmt.UUID `description:"The ID of the project to reset"`
	} `positional-args:"yes" required:"yes"`
}

func (*QuotaDelete) Execute

func (*QuotaDelete) Execute(_ []string) error

type QuotaList

type QuotaList struct{}

func (*QuotaList) Execute

func (*QuotaList) Execute(_ []string) error

type QuotaShow

type QuotaShow struct {
	Positional struct {
		ProjectID strfmt.UUID `description:"The ID of the project to query"`
	} `positional-args:"yes" required:"yes"`
}

func (*QuotaShow) Execute

func (*QuotaShow) Execute(_ []string) error

type QuotaUpdate

type QuotaUpdate struct {
	Positional struct {
		ProjectID strfmt.UUID `description:"The ID of the project to update"`
	} `positional-args:"yes" required:"yes"`
	Domain     *int64 `long:"domain" description:"Domains integer value"`
	Datacenter *int64 `long:"datacenter" description:"Datacenter integer value"`
	Pool       *int64 `long:"pool" description:"Pool integer value"`
	Member     *int64 `long:"member" description:"Member integer value"`
	Monitor    *int64 `long:"monitor" description:"Monitor integer value"`
}

func (*QuotaUpdate) Execute

func (*QuotaUpdate) Execute(_ []string) error

type ServiceList

type ServiceList struct{}

func (*ServiceList) Execute

func (*ServiceList) Execute(_ []string) error

type SyncDomain

type SyncDomain struct {
	Domains []strfmt.UUID `short:"d" long:"domain" required:"true" description:"Domain IDs to sync, can be specified multiple times"`
}

func (SyncDomain) Execute

func (sd SyncDomain) Execute(_ []string) error

Jump to

Keyboard shortcuts

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