version

package
v1.0.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 2 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version refs.Version

Version represents v2-compatible version.

func Current

func Current() *Version

Current returns Version instance that initialized to current SDK revision number.

func New

func New() *Version

New creates and initializes blank Version.

Defaults:

  • major: 0;
  • minor: 0.

func NewFromV2

func NewFromV2(v *refs.Version) *Version

NewFromV2 wraps v2 Version message to Version.

Nil refs.Version converts to nil.

func (*Version) Major

func (v *Version) Major() uint32

Major returns major number of the revision.

func (*Version) Marshal

func (v *Version) Marshal() ([]byte, error)

Marshal marshals Version into a protobuf binary form.

func (*Version) MarshalJSON

func (v *Version) MarshalJSON() ([]byte, error)

MarshalJSON encodes Version to protobuf JSON format.

func (*Version) Minor

func (v *Version) Minor() uint32

Minor returns minor number of the revision.

func (*Version) SetMajor

func (v *Version) SetMajor(val uint32)

SetMajor sets major number of the revision.

func (*Version) SetMinor

func (v *Version) SetMinor(val uint32)

SetMinor sets minor number of the revision.

func (*Version) String

func (v *Version) String() string

func (*Version) ToV2

func (v *Version) ToV2() *refs.Version

ToV2 converts Version to v2 Version message.

Nil Version converts to nil.

func (*Version) Unmarshal

func (v *Version) Unmarshal(data []byte) error

Unmarshal unmarshals protobuf binary representation of Version.

func (*Version) UnmarshalJSON

func (v *Version) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes Version from protobuf JSON format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL