elite

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

README

eliteJournal

Go reference GitHub go.mod Go version GoReportCard example GitHub license

Golang library for parsing elite dangerous journal files

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allegiance

type Allegiance int

Allegiance is an enumeration of Elite Dangerous Allegiances with Major Factions

ENUM( Independent Alliance Empire Federation Pirate PilotsFederation Thargoids Guardians )

const (
	// Independent is a Allegiance of type Independent.
	Independent Allegiance = iota
	// Alliance is a Allegiance of type Alliance.
	Alliance
	// Empire is a Allegiance of type Empire.
	Empire
	// Federation is a Allegiance of type Federation.
	Federation
	// Pirate is a Allegiance of type Pirate.
	Pirate
	// PilotsFederation is a Allegiance of type PilotsFederation.
	PilotsFederation
	// Thargoids is a Allegiance of type Thargoids.
	Thargoids
	// Guardians is a Allegiance of type Guardians.
	Guardians
)

func ParseAllegiance

func ParseAllegiance(name string) (Allegiance, error)

ParseAllegiance attempts to convert a string to a Allegiance

func (Allegiance) MarshalText

func (x Allegiance) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Allegiance) MarshalZerologObject added in v0.1.4

func (x Allegiance) MarshalZerologObject(e *zerolog.Event)

func (*Allegiance) Scan

func (x *Allegiance) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (Allegiance) String

func (x Allegiance) String() string

String implements the Stringer interface.

func (*Allegiance) UnmarshalText

func (x *Allegiance) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

func (Allegiance) Value

func (x Allegiance) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullAllegiance

type NullAllegiance struct {
	Allegiance Allegiance
	Valid      bool
	Set        bool
}

func NewNullAllegiance

func NewNullAllegiance(val interface{}) (x NullAllegiance)

func (NullAllegiance) MarshalJSON

func (n NullAllegiance) MarshalJSON() ([]byte, error)

MarshalJSON correctly serializes a NullAllegiance to JSON.

func (*NullAllegiance) Scan

func (x *NullAllegiance) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*NullAllegiance) UnmarshalJSON

func (n *NullAllegiance) UnmarshalJSON(b []byte) error

UnmarshalJSON correctly deserializes a NullAllegiance from JSON.

func (NullAllegiance) Value

func (x NullAllegiance) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPower

type NullPower struct {
	Power Power
	Valid bool
	Set   bool
}

func NewNullPower

func NewNullPower(val interface{}) (x NullPower)

func (NullPower) MarshalJSON

func (n NullPower) MarshalJSON() ([]byte, error)

MarshalJSON correctly serializes a NullPower to JSON.

func (*NullPower) Scan

func (x *NullPower) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*NullPower) UnmarshalJSON

func (n *NullPower) UnmarshalJSON(b []byte) error

UnmarshalJSON correctly deserializes a NullPower from JSON.

func (NullPower) Value

func (x NullPower) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullRank

type NullRank struct {
	Rank  Rank
	Valid bool
	Set   bool
}

func NewNullRank

func NewNullRank(val interface{}) (x NullRank)

func (NullRank) MarshalJSON

func (n NullRank) MarshalJSON() ([]byte, error)

MarshalJSON correctly serializes a NullRank to JSON.

func (*NullRank) Scan

func (x *NullRank) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*NullRank) UnmarshalJSON

func (n *NullRank) UnmarshalJSON(b []byte) error

UnmarshalJSON correctly deserializes a NullRank from JSON.

func (NullRank) Value

func (x NullRank) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Power

type Power int

Power is an enumeration of Elite Dangerous Powers

ENUM( Uncontrolled Aisling Duval Archon Delaine Arissa Lavigny-Duval Denton Patreus Edmund Mahon Felicia Winters Li Yong-Rui Pranav Antal Yuri Grom Zachary Hudson Zemina Torval )

const (
	// Uncontrolled is a Power of type Uncontrolled.
	Uncontrolled Power = iota
	// AislingDuval is a Power of type Aisling Duval.
	AislingDuval
	// ArchonDelaine is a Power of type Archon Delaine.
	ArchonDelaine
	// ArissaLavignyDuval is a Power of type Arissa Lavigny-Duval.
	ArissaLavignyDuval
	// DentonPatreus is a Power of type Denton Patreus.
	DentonPatreus
	// EdmundMahon is a Power of type Edmund Mahon.
	EdmundMahon
	// FeliciaWinters is a Power of type Felicia Winters.
	FeliciaWinters
	// LiYongRui is a Power of type Li Yong-Rui.
	LiYongRui
	// PranavAntal is a Power of type Pranav Antal.
	PranavAntal
	// YuriGrom is a Power of type Yuri Grom.
	YuriGrom
	// ZacharyHudson is a Power of type Zachary Hudson.
	ZacharyHudson
	// ZeminaTorval is a Power of type Zemina Torval.
	ZeminaTorval
)

func ParsePower

func ParsePower(name string) (Power, error)

ParsePower attempts to convert a string to a Power

func (Power) MarshalText

func (x Power) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Power) MarshalZerologObject added in v0.1.4

func (x Power) MarshalZerologObject(e *zerolog.Event)

func (*Power) Scan

func (x *Power) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (Power) String

func (x Power) String() string

String implements the Stringer interface.

func (*Power) UnmarshalText

func (x *Power) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

func (Power) Value

func (x Power) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Rank

type Rank int

Rank is an enumeration of Elite Dangerous Ranks

ENUM( None=-1 Rookie Agent Officer SeniorOfficer Leader )

const (
	// None is a Rank of type None.
	None Rank = iota + -1
	// Rookie is a Rank of type Rookie.
	Rookie
	// Agent is a Rank of type Agent.
	Agent
	// Officer is a Rank of type Officer.
	Officer
	// SeniorOfficer is a Rank of type SeniorOfficer.
	SeniorOfficer
	// Leader is a Rank of type Leader.
	Leader
)

func ParseRank

func ParseRank(name string) (Rank, error)

ParseRank attempts to convert a string to a Rank

func (Rank) MarshalText

func (x Rank) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Rank) MarshalZerologObject added in v0.1.4

func (x Rank) MarshalZerologObject(e *zerolog.Event)

func (*Rank) Scan

func (x *Rank) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (Rank) String

func (x Rank) String() string

String implements the Stringer interface.

func (*Rank) UnmarshalText

func (x *Rank) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

func (Rank) Value

func (x Rank) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type SLEF

type SLEF struct {
	Header struct {
		AppName    string `json:"appName"`
		AppVersion int    `json:"appVersion"`
		AppURL     string `json:"appURL"`
	} `json:"header"`
	Data journal.Loadout `json:"data"`
}

SLEF Ship data for inara and various other tools to commonly support

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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