frostfs-api-go/pkg/version.go
Alex Vanin 8c920d75a6 [#126] sdk: add reference types
This commits adds container id and neo 3 wallet id, that
is used as owner id for object and container. Version
is set out outside of refs packages since it store global
version of SDK.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00

28 lines
403 B
Go

package pkg
import (
"fmt"
"github.com/nspcc-dev/neofs-api-go/v2/refs"
)
type (
Version struct {
Major uint32
Minor uint32
}
)
var SDKVersion = Version{2, 0}
func (v Version) String() string {
return fmt.Sprintf("v%d.%d", v.Major, v.Minor)
}
func (v Version) ToV2Version() *refs.Version {
result := new(refs.Version)
result.SetMajor(v.Major)
result.SetMinor(v.Minor)
return result
}