utils

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DmPlayer

func DmPlayer(message string, player string) string

func GetDatabase added in v0.2.0

func GetDatabase() *gorm.DB

func InitLocker

func InitLocker()

func LockDelete

func LockDelete(key string)

func LockDeleteDB added in v0.2.0

func LockDeleteDB(key string)

func LockRead

func LockRead(key string) (string, bool)

func LockReadDB added in v0.2.0

func LockReadDB(key string) (string, bool)

func LockWrite

func LockWrite(key, value string) bool

func LockWriteDB added in v0.2.0

func LockWriteDB(key, value string) bool

func LogScraper

func LogScraper(logFile string)

func RunBroadcastCommand

func RunBroadcastCommand(args ...string) string

func RunMinecraftCommand

func RunMinecraftCommand(args ...string) string

func RunMsmCommand

func RunMsmCommand(s []string) string

func RunServerCommand

func RunServerCommand(args ...string) string

Types

type DBLock added in v0.2.0

type DBLock struct {
	ID     uint   `gorm:"primaryKey"`
	Key    string `gorm:"uniqueIndex"`
	Value  string
	Locked bool
}

type Locker

type Locker struct {
	// contains filtered or unexported fields
}

type LogLine

type LogLine struct {
	UnsplitLogLine string
	Time           string
	Thread         string
	Message        string
	Player         string
}

func SplitLog

func SplitLog(line string) (LogLine, bool, bool)

Jump to

Keyboard shortcuts

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