vsn

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package vsn provides utilities for handling protocol versions, as well as Gophercraft software versions.

Index

Constants

View Source
const NewAuthSystem = V6_2_4
View Source
const NewCryptSystem = V8_3_0

Variables

This section is empty.

Functions

func BuildRangeOverlap

func BuildRangeOverlap(r1, r2 BuildRange) bool

func PrintBanner

func PrintBanner()

func QueryDescriptors

func QueryDescriptors(v Build, desc interface{}, to interface{}) error

QueryDescriptors expects

  • A map[vsn.BuildRange]<your type> In this case, it will return one match after finding a build range. if any overlaps are detected, it will return an error

Types

type Build

type Build uint32

A Build refers to the snapshot of a protocol that Gophercraft is trying to interact with.

const (
	Alpha   Build = 3368
	V1_12_1 Build = 5875
	V1_12_2 Build = 6005
	V2_0_1  Build = 6180
	V2_4_3  Build = 8606
	V3_0_2  Build = 9056
	V3_3_5a Build = 12340
	V4_0_1  Build = 13164
	V4_3_4  Build = 15595
	V5_4_8  Build = 18414
	V6_2_4  Build = 21742
	V8_3_0  Build = 33369
)
var (
	Max Build = 0xFFFFFFFF
)

func ParseDBD

func ParseDBD(str string) (Build, error)

Accepts DBD formatted builds e.g. 0.5.3.3368

func (Build) AddedIn

func (hasFeature Build) AddedIn(update Build) bool

func (Build) BuildInfo

func (b Build) BuildInfo() *BuildInfo

func (Build) ClientVersion

func (b Build) ClientVersion() *realmlist.ClientVersion

func (Build) DBD

func (b Build) DBD() string

func (Build) Exp

func (b Build) Exp() int

func (Build) RemovedIn

func (hasFeature Build) RemovedIn(update Build) bool

func (Build) SemVer

func (b Build) SemVer() string

func (Build) String

func (b Build) String() string

func (Build) VersionData

func (b Build) VersionData() []byte

(legacy auth protocol) Returns a 3-byte field describing the version data. For instance, version 3.3.5 would return []byte{ 3, 3, 5 }

type BuildInfo

type BuildInfo struct {
	MajorVersion    uint32
	MinorVersion    uint32
	BugfixVersion   uint32
	HotfixVersion   string
	WinAuthSeed     []byte
	Win64AuthSeed   []byte
	Mac64AuthSeed   []byte
	WinChecksumSeed []byte
	MacChecksumSeed []byte
}

type BuildRange

type BuildRange [2]Build

func Range

func Range(min, max Build) BuildRange

func (BuildRange) Contains

func (br BuildRange) Contains(v Build) bool

func (BuildRange) String

func (br BuildRange) String() string

func (BuildRange) Unary

func (b BuildRange) Unary() bool

type CoreVersion

type CoreVersion struct {
	Major Rev
	Minor Rev
	Patch Rev
}

Refers to the current version of Gophercraft core.

var GophercraftVersion CoreVersion

func ParseCoreVersion

func ParseCoreVersion(str string) (CoreVersion, error)

func (CoreVersion) Cmp

func (i CoreVersion) Cmp(j CoreVersion) int

func (CoreVersion) LessThan

func (i CoreVersion) LessThan(j CoreVersion) bool

func (CoreVersion) String

func (cv CoreVersion) String() string

type Rev

type Rev uint16

type Selector

type Selector string

func (Selector) Match

func (sl Selector) Match(b Build) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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