client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 25 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"`
}
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"`
}
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"`
}
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        *float32 `long:"latitude" description:"Specifies the geographical latitude of the data center's position"`
	Longitude       *float32 `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"`
	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 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 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 {
		PoolID strfmt.UUID `description:"UUID of the pool"`
		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" required:"no"`
}

func (*MemberList) Execute

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

type MemberShow

type MemberShow struct {
	PositionalMemberShow struct {
		PoolID   strfmt.UUID `description:"UUID of the pool"`
		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"`
}

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 {
}

func (*MonitorList) Execute

func (*MonitorList) 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