Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions hcloud/schema_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ You can find a documentation of goverter here: https://goverter.jmattheis.de/
// goverter:extend int64FromServerType
// goverter:extend floatingIPFromInt64
// goverter:extend int64FromFloatingIP
// goverter:extend storageBoxFromInt64
// goverter:extend int64FromStorageBox
// goverter:extend int64FromStorageBoxSnapshot
// goverter:extend mapFromFloatingIPDNSPtrSchema
// goverter:extend floatingIPDNSPtrSchemaFromMap
// goverter:extend mapFromPrimaryIPDNSPtrSchema
Expand Down Expand Up @@ -372,9 +375,10 @@ type converter interface {
// goverter:map Name | mapEmptyStringToNil
SchemaFromStorageBoxUpdateOpts(StorageBoxUpdateOpts) schema.StorageBoxUpdateRequest

// goverter:map StorageBox | mapStorageBoxIDStorageBoxPtr
StorageBoxSnapshotFromSchema(schema.StorageBoxSnapshot) *StorageBoxSnapshot

SchemaFromStorageBoxSnapshot(*StorageBoxSnapshot) schema.StorageBoxSnapshot

SchemaFromStorageBoxSnapshotCreateOpts(StorageBoxSnapshotCreateOpts) schema.StorageBoxSnapshotCreateRequest

SchemaFromStorageBoxSnapshotUpdateOpts(StorageBoxSnapshotUpdateOpts) schema.StorageBoxSnapshotUpdateRequest
Expand All @@ -387,21 +391,21 @@ type converter interface {

SchemaFromStorageBoxUpdateAccessSettingsOpts(StorageBoxUpdateAccessSettingsOpts) schema.StorageBoxUpdateAccessSettingsRequest

// goverter:map Snapshot SnapshotID | mapStorageBoxSnapshotPtrStorageBoxSnapshotID
// goverter:map Snapshot SnapshotID
SchemaFromStorageBoxRollbackSnapshotOpts(StorageBoxRollbackSnapshotOpts) schema.StorageBoxRollbackSnapshotRequest

// goverter:map DayOfWeek | mapStorageBoxWeekdayPtrToIntPtr
SchemaFromStorageBoxEnableSnapshotPlanOpts(StorageBoxEnableSnapshotPlanOpts) schema.StorageBoxEnableSnapshotPlanRequest

// goverter:map StorageBox | mapStorageBoxIDStorageBoxPtr
StorageBoxSubaccountFromSchema(schema.StorageBoxSubaccount) *StorageBoxSubaccount

SchemaFromStorageBoxSubaccount(*StorageBoxSubaccount) schema.StorageBoxSubaccount

SchemaFromStorageBoxSubaccountCreateOpts(StorageBoxSubaccountCreateOpts) schema.StorageBoxSubaccountCreateRequest

SchemaFromStorageBoxSubaccountUpdateOpts(StorageBoxSubaccountUpdateOpts) schema.StorageBoxSubaccountUpdateRequest

// goverter:ignoreMissing
// goverter:map StorageBox | mapStorageBoxIDStorageBoxPtr
StorageBoxSubaccountFromCreateResponse(schema.StorageBoxSubaccountCreateResponseSubaccount) *StorageBoxSubaccount

SchemaFromStorageBoxSubaccountResetPasswordOpts(StorageBoxSubaccountResetPasswordOpts) schema.StorageBoxSubaccountResetPasswordRequest
Expand Down Expand Up @@ -598,6 +602,24 @@ func int64FromFloatingIP(f *FloatingIP) int64 {
return f.ID
}

func storageBoxFromInt64(id int64) *StorageBox {
return &StorageBox{ID: id}
}

func int64FromStorageBox(sb *StorageBox) int64 {
if sb == nil {
return 0
}
return sb.ID
}

func int64FromStorageBoxSnapshot(sbs *StorageBoxSnapshot) int64 {
if sbs == nil {
return 0
}
return sbs.ID
}

func firewallStatusFromSchemaServerFirewall(fw schema.ServerFirewall) *ServerFirewallStatus {
return &ServerFirewallStatus{
Firewall: Firewall{ID: fw.ID},
Expand Down Expand Up @@ -1038,18 +1060,6 @@ func stringSlicePtrFromStringSlice(s []string) *[]string {
return &s
}

func mapStorageBoxIDStorageBoxPtr(id int64) *StorageBox {
return &StorageBox{ID: id}
}

func mapStorageBoxSnapshotPtrStorageBoxSnapshotID(snapshot *StorageBoxSnapshot) int64 {
if snapshot == nil {
return 0
}

return snapshot.ID
}

func mapStorageBoxWeekdayPtrToIntPtr(w *time.Weekday) *int {
if w == nil {
return nil
Expand Down
56 changes: 52 additions & 4 deletions hcloud/zz_schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.