Documentation
¶
Index ¶
- Variables
- func GetNames(cn base.Connection, dataCenter string) ([]string, error)
- func IDByName(cn base.Connection, dataCenter string, name string) (string, error)
- func IsWeekDay(day string) bool
- type CPU
- type CreateReq
- type Defaults
- type DeleteReq
- type DiskUsage
- type Entity
- type GetBillingReq
- type GetBillingRes
- type GetHAPolicy
- type GetReq
- type GetScheduledActivities
- type GetStatsReq
- type GetStatsRes
- type Group
- type GroupBilling
- type GroupPatchOperation
- type GuestDiskUsage
- type HAPolicy
- type LBForHA
- type LBForHARequest
- type List
- type Memory
- type Network
- type PrimaryDNS
- type RestoreReq
- type RestoreRes
- type ScheduledActivities
- type SecondaryDNS
- type ServerBilling
- type SetDefaults
- type SetHAPolicy
- type SetScheduledActivities
- type Stats
- type TemplateName
- type UpdateReq
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ListTimeout = 200
)
View Source
var (
WeekDays = []string{
"sun",
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
}
)
Functions ¶
Types ¶
type CreateReq ¶
type CreateReq struct {
Name string `valid:"required"`
Description string
ParentGroupId string
ParentGroupName string `json:"-"`
CustomFields []customfields.Def
}
type Defaults ¶
type Defaults struct {
Cpu CPU
MemoryGB Memory
NetworkId Network
PrimaryDns PrimaryDNS
SecondaryDns SecondaryDNS
TemplateName TemplateName
}
type Entity ¶
type Entity struct {
Id string
Name string
Description string
LocationId string
Type string
Status string
ServersCount int64
Groups []Entity
Links []models.LinkEntity
ChangeInfo models.ChangeInfo
CustomFields []customfields.FullDef
}
type GetBillingReq ¶
type GetBillingReq struct {
Group `argument:"composed" URIParam:"GroupId" json:"-"`
}
type GetBillingRes ¶
type GetBillingRes struct {
Date base.Time
Groups map[string]GroupBilling
}
type GetHAPolicy ¶
type GetHAPolicy struct {
Group `URIParam:"GroupId" argument:"composed" json:"-"`
}
type GetScheduledActivities ¶
type GetScheduledActivities struct {
Group `URIParam:"GroupId" argument:"composed" json:"-"`
}
type GetStatsReq ¶
type GetStatsReq struct {
Group `argument:"composed" URIParam:"GroupId" json:"-"`
Start string `URIParam:"yes"`
End string `URIParam:"yes"`
SampleInterval string `URIParam:"yes"`
Type string `URIParam:"yes" oneOf:"latest,hourly,realtime"`
}
func (*GetStatsReq) ApplyDefaultBehaviour ¶
func (g *GetStatsReq) ApplyDefaultBehaviour() error
func (*GetStatsReq) Validate ¶
func (g *GetStatsReq) Validate() error
type GetStatsRes ¶
type GroupBilling ¶
type GroupBilling struct {
Name string
Servers map[string]ServerBilling
}
type GroupPatchOperation ¶
type GuestDiskUsage ¶
type LBForHARequest ¶
type PrimaryDNS ¶
type RestoreReq ¶
type RestoreReq struct {
Group `argument:"composed" URIParam:"GroupId" json:"-"`
TargetGroupId string
TargetGroupName string `json:"-"`
}
func (*RestoreReq) GetNames ¶
func (r *RestoreReq) GetNames(cn base.Connection, property string) ([]string, error)
func (*RestoreReq) InferID ¶
func (r *RestoreReq) InferID(cn base.Connection) error
func (*RestoreReq) Validate ¶
func (r *RestoreReq) Validate() error
type RestoreRes ¶
type RestoreRes struct {
IsQueued bool
Links []models.LinkEntity
ErrorMessage string
}
type ScheduledActivities ¶
type ScheduledActivities struct {
Id string
LocationId string
ChangeInfo models.ChangeInfo
Status string
Type string
BeginDateUTC base.Time
Repeat string
CustomWeeklyDays []string
Expire string
ExpireCount int64
ExpireDateUTC base.Time
TimeZoneOffset string
IsExpired bool
LastOccurrenceDateUTC base.Time
OccurrenceCount int64
NextOccurrenceDateUTC base.Time
}
type SecondaryDNS ¶
type ServerBilling ¶
type SetDefaults ¶
type SetDefaults struct {
Group `URIParam:"GroupId" argument:"composed" json:"-"`
Cpu int64 `json:",omitempty"`
MemoryGb int64 `json:",omitempty"`
NetworkId string `json:",omitempty"`
PrimaryDns string `json:",omitempty"`
SecondaryDns string `json:",omitempty"`
TemplateName string `json:",omitempty"`
}
func (*SetDefaults) Validate ¶
func (s *SetDefaults) Validate() error
type SetHAPolicy ¶
type SetHAPolicy struct {
Group `URIParam:"GroupId" argument:"composed" json:"-"`
PolicyId string `valid:"required"`
LoadBalancer LBForHARequest `json:"LoadBalancerPool"`
}
func (*SetHAPolicy) Validate ¶
func (s *SetHAPolicy) Validate() error
type SetScheduledActivities ¶
type SetScheduledActivities struct {
Group `URIParam:"GroupId" argument:"composed" json:"-"`
Status string `oneOf:"on,off" valid:"required"`
Type string `oneOf:"archive,createsnapshot,delete,deletesnapshot,pause,poweron,reboot,shutdown" valid:"required"`
BeginDateUtc time.Time `json:"beginDateUTC"`
Repeat string `oneOf:"never,daily,weekly,monthly,customWeekly" valid:"required"`
CustomWeeklyDays []string
Expire string `oneOf:"never,afterDate,afterCount" valid:"required"`
ExpireCount int64 `json:",omitempty"`
ExpireDateUtc time.Time `json:"-"`
ExpireDateUTCString string `json:"expireDateUTC,omitempty" argument:"ignore"`
TimeZoneOffset string `valid:"required"`
}
func (*SetScheduledActivities) ApplyDefaultBehaviour ¶
func (s *SetScheduledActivities) ApplyDefaultBehaviour() error
func (*SetScheduledActivities) Validate ¶
func (s *SetScheduledActivities) Validate() error
type TemplateName ¶
type UpdateReq ¶
type UpdateReq struct {
Group `argument:"composed" URIParam:"GroupId" json:"-"`
PatchOperation []GroupPatchOperation `argument:"ignore"`
CustomFields []customfields.Def
Name string
Description string
ParentGroupId string
ParentGroupName string
}
func (*UpdateReq) ApplyDefaultBehaviour ¶
func (*UpdateReq) MarshalJSON ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.