common

package module
v0.0.0-...-23adfd6 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: AGPL-3.0 Imports: 4 Imported by: 13

README

Common

Go Report Card

This module contains the code used by all internal modules.

No guarantees are given for the stability of the API.

Documentation

Index

Constants

View Source
const (
	AnnounceVersion0 = iota
	AnnounceVersion1
)
View Source
const (
	ErrSuccess = iota
	ErrGeneral
	ErrSignal
	ErrPidLock
	// ErrLast is only used as a marker to where to start, not a real error
	ErrLast
)
View Source
const (
	GameAoE1 = "age1"
	GameAoE2 = "age2"
	GameAoE3 = "age3"
	// GameAoE4 Unsupported
	GameAoE4 = "age4"
	// GameAoM Unsupported
	GameAoM = "athens"
)
View Source
const AnnounceHeader = Name
View Source
const AnnounceIdLength = 16
View Source
const AnnouncePort = 31978
View Source
const AnnounceVersionLatest = AnnounceVersion1
View Source
const AnnounceVersionLength = 1
View Source
const Cert = "cert.pem"
View Source
const CertSubjectOrganization = "github.com/luskaner/" + Name
View Source
const Domain = "aoe-api.worldsedgelink.com"
View Source
const Key = "key.pem"
View Source
const LauncherAgent = "agent"
View Source
const LauncherConfig = "config"
View Source
const LauncherConfigAdmin = "config-admin"
View Source
const LauncherConfigAdminAgent = "config-admin-agent"
View Source
const Name = "ageLANServer"
View Source
const Server = "server"
View Source
const ServerGenCert = "genCert"

Variables

Functions

func CalculateBroadcastIp

func CalculateBroadcastIp(ip net.IP, mask net.IPMask) net.IP

func CertificatePair

func CertificatePair(executablePath string) (ok bool, parentDir string, cert string)

func CertificatePairFolder

func CertificatePairFolder(executablePath string) string

func ChdirToExe

func ChdirToExe()

func GetExeFileName

func GetExeFileName(bin bool, executable string) string

func HostToIps

func HostToIps(host string) []net.IP

Types

type AnnounceMessage

type AnnounceMessage struct {
	Data    interface{}
	Version byte
	Ips     mapset.Set[string]
}

type AnnounceMessageData000

type AnnounceMessageData000 struct {
}

AnnounceMessageData000 Empty interface to be used as a placeholder for the message type

type AnnounceMessageData001

type AnnounceMessageData001 struct {
	GameIds []string
}

AnnounceMessageData001 Data structure for the announce version 1

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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