Documentation ¶
Index ¶
- Variables
- type DefaultVersionProvider
- func (v DefaultVersionProvider) AsVersionInfo() *VersionInfo
- func (v DefaultVersionProvider) Branch() string
- func (v DefaultVersionProvider) BuildDate() string
- func (v DefaultVersionProvider) EncoderDecoder() VersionEncDec
- func (v DefaultVersionProvider) Revision() string
- func (v DefaultVersionProvider) Version() string
- type SemVer
- type VersionEncDec
- type VersionEncDecImpl
- type VersionInfo
- type VersionProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var StdVersionEncDec = VersionEncDecImpl{}
Functions ¶
This section is empty.
Types ¶
type DefaultVersionProvider ¶ added in v2.0.30
type DefaultVersionProvider struct { SourceBranch string VersionInfo }
func (DefaultVersionProvider) AsVersionInfo ¶ added in v2.0.30
func (v DefaultVersionProvider) AsVersionInfo() *VersionInfo
func (DefaultVersionProvider) Branch ¶ added in v2.0.30
func (v DefaultVersionProvider) Branch() string
func (DefaultVersionProvider) BuildDate ¶ added in v2.0.30
func (v DefaultVersionProvider) BuildDate() string
func (DefaultVersionProvider) EncoderDecoder ¶ added in v2.0.30
func (v DefaultVersionProvider) EncoderDecoder() VersionEncDec
func (DefaultVersionProvider) Revision ¶ added in v2.0.30
func (v DefaultVersionProvider) Revision() string
func (DefaultVersionProvider) Version ¶ added in v2.0.30
func (v DefaultVersionProvider) Version() string
type SemVer ¶
type SemVer struct {
// contains filtered or unexported fields
}
func MustParseSemVer ¶
func ParseSemVer ¶
type VersionEncDec ¶
type VersionEncDec interface { Encode(*VersionInfo) ([]byte, error) Decode([]byte) (*VersionInfo, error) }
type VersionEncDecImpl ¶
type VersionEncDecImpl struct{}
func (*VersionEncDecImpl) Decode ¶
func (encDec *VersionEncDecImpl) Decode(info []byte) (*VersionInfo, error)
func (*VersionEncDecImpl) Encode ¶
func (encDec *VersionEncDecImpl) Encode(info *VersionInfo) ([]byte, error)
type VersionInfo ¶
func (*VersionInfo) GetVersion ¶
func (self *VersionInfo) GetVersion() (*SemVer, error)
func (*VersionInfo) HasMinimumVersion ¶
func (self *VersionInfo) HasMinimumVersion(compareVersionStr string) (bool, error)
type VersionProvider ¶
type VersionProvider interface { Version() string BuildDate() string Revision() string Branch() string AsVersionInfo() *VersionInfo EncoderDecoder() VersionEncDec }
func NewDefaultVersionProvider ¶ added in v2.0.30
func NewDefaultVersionProvider() VersionProvider
Click to show internal directories.
Click to hide internal directories.