1
0
Fork 0

ACME TLS ALPN

This commit is contained in:
Ludovic Fernandez 2018-07-03 12:44:04 +02:00 committed by Traefiker Bot
parent 17ad5153b8
commit 139f280f35
258 changed files with 25528 additions and 1516 deletions

View file

@ -0,0 +1,59 @@
package sacloud
// propInstance インスタンス内包型
type propInstance struct {
Instance *Instance `json:",omitempty"` // インスタンス
}
// GetInstance インスタンス 取得
func (p *propInstance) GetInstance() *Instance {
return p.Instance
}
// IsUp インスタンスが起動しているか判定
func (p *propInstance) IsUp() bool {
if p.Instance == nil {
return false
}
return p.Instance.IsUp()
}
// IsDown インスタンスがダウンしているか確認
func (p *propInstance) IsDown() bool {
if p.Instance == nil {
return false
}
return p.Instance.IsDown()
}
// GetInstanceStatus ステータス 取得
func (p *propInstance) GetInstanceStatus() string {
if p.Instance == nil {
return ""
}
return p.Instance.GetStatus()
}
// GetInstanceBeforeStatus 以前のステータス 取得
func (p *propInstance) GetInstanceBeforeStatus() string {
if p.Instance == nil {
return ""
}
return p.Instance.GetBeforeStatus()
}
// MaintenanceScheduled メンテナンス予定の有無
func (p *propInstance) MaintenanceScheduled() bool {
if p.Instance == nil {
return false
}
return p.Instance.MaintenanceScheduled()
}
// GetMaintenanceInfoURL メンテナンス情報 URL取得
func (p *propInstance) GetMaintenanceInfoURL() string {
if p.Instance == nil {
return ""
}
return p.Instance.Host.InfoURL
}