github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/model/version.go (about) 1 package model 2 3 // Version missing godoc 4 type Version struct { 5 // for example 4.6 6 Value string 7 Deprecated *bool 8 // for example 4.5 9 DeprecatedSince *string 10 // if true, will be removed in the next version 11 ForRemoval *bool 12 } 13 14 // VersionInput missing godoc 15 type VersionInput struct { 16 Value string `json:"version"` 17 Deprecated *bool `json:",omitempty"` 18 DeprecatedSince *string `json:",omitempty"` 19 ForRemoval *bool `json:",omitempty"` 20 } 21 22 // ToVersion missing godoc 23 func (v *VersionInput) ToVersion() *Version { 24 if v == nil { 25 return nil 26 } 27 28 return &Version{ 29 Value: v.Value, 30 Deprecated: v.Deprecated, 31 DeprecatedSince: v.DeprecatedSince, 32 ForRemoval: v.ForRemoval, 33 } 34 }