예제 #1
0
func toPrepaidInformation(res map[string]interface{}) *PrepaidInformation {
	return &PrepaidInformation{
		Id:          util.ToInt64(res["id"]),
		Amount:      util.ToString(res["amount"]),
		Currency:    util.ToString(res["currency"]),
		DateCreated: util.ToTime(res["date_created"]),
		DateUpdated: util.ToTime(res["date_updated"]),
	}
}
예제 #2
0
func ToDomainInfoBase(res map[string]interface{}) *DomainInfoBase {
	return &DomainInfoBase{
		AuthInfo:             util.ToString(res["authinfo"]),
		DateCreated:          util.ToTime(res["date_created"]),
		DateRegistryCreation: util.ToTime(res["date_registry_creation"]),
		DateRegistryEnd:      util.ToTime(res["date_registry_end"]),
		DateUpdated:          util.ToTime(res["date_updated"]),
		Fqdn:                 util.ToString(res["fqdn"]),
		Id:                   util.ToInt64(res["id"]),
		Status:               util.ToStringSlice(util.ToInterfaceSlice(res["status"])),
		Tld:                  util.ToString(res["tld"]),
	}
}
예제 #3
0
func ToOperationInfo(res map[string]interface{}) *OperationInfo {
	return &OperationInfo{
		DateCreated:      util.ToTime(res["date_created"]),
		DateStart:        util.ToTime(res["date_start"]),
		DateUpdated:      util.ToTime(res["date_updated"]),
		Eta:              util.ToString(res["eta"]),
		Id:               util.ToInt64(res["id"]),
		LastError:        util.ToString(res["last_error"]),
		SessionId:        util.ToInt64(res["session_id"]),
		Source:           util.ToString(res["source"]),
		Step:             util.ToString(res["step"]),
		Type:             util.ToString(res["type"]),
		OperationDetails: ToOperationDetails(util.ToXmlrpcStruct(res["infos"])),
		Params:           util.ToXmlrpcStruct(res["params"]),
	}
}
예제 #4
0
func ToZoneInfoBase(res map[string]interface{}) *ZoneInfoBase {
	return &ZoneInfoBase{
		DateUpdated: util.ToTime(res["date_updated"]),
		Id:          util.ToInt64(res["id"]),
		Name:        util.ToString(res["name"]),
		Public:      util.ToBool(res["public"]),
		Version:     util.ToInt64(res["version"]),
	}
}
예제 #5
0
func ToDomainInfoExtra(res map[string]interface{}) *DomainInfoExtra {
	return &DomainInfoExtra{
		DateDelete:           util.ToTime(res["date_delete"]),
		DateHoldBegin:        util.ToTime(res["date_hold_begin"]),
		DateHoldEnd:          util.ToTime(res["date_hold_end"]),
		DatePendingDeleteEnd: util.ToTime(res["date_pending_delete_end"]),
		DateRenewBegin:       util.ToTime(res["date_renew_begin"]),
		DateRestoreEnd:       util.ToTime(res["date_restore_end"]),
		Nameservers:          util.ToStringSlice(util.ToInterfaceSlice(res["nameservers"])),
		Services:             util.ToStringSlice(util.ToInterfaceSlice(res["services"])),
		ZoneId:               util.ToInt64(res["zone_id"]),
		Autorenew:            toAutorenewInfo(util.ToXmlrpcStruct(res["autorenew"])),
		Contacts:             toContactInfo(util.ToXmlrpcStruct(res["contacts"])),
	}
}
예제 #6
0
func ToVersionInfo(res map[string]interface{}) *VersionInfo {
	return &VersionInfo{
		Id:          util.ToInt64(res["id"]),
		DateCreated: util.ToTime(res["date_created"]),
	}
}