8c920d75a6
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>
28 lines
403 B
Go
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
|
|
}
|