config

package
v0.0.0-...-886a64d Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsetGoal = "#-- UNSET --#"
)

Variables

View Source
var (
	Objs = Objectives{}
)

Functions

func Get

func Get(cfg *Config, defaultConfig string) error

func GetObjectives

func GetObjectives(cfg *Objectives, defaultConfig string) error

Types

type Config

type Config struct {
	Main  MainSettings
	Redis RedisCredentials
}

type Main

type Main struct {
	Name  string
	Goal1 string
	Goal2 string
}

func (*Main) GenerateGoals

func (m *Main) GenerateGoals(currentPlayer string, players []string) (string, string)

type MainSettings

type MainSettings struct {
	Debug bool
}

type Objectives

type Objectives struct {
	Settings     Settings
	Mains        []Main
	Secondaries  []Secondary
	Placeholders []Placeholder
}

type Placeholder

type Placeholder struct {
	Name string
	List []string
}

type RedisCredentials

type RedisCredentials struct {
	Address  string
	Password string
	DB       int
}

func (*RedisCredentials) Get

func (rc *RedisCredentials) Get() (*redis.Client, error)

type Secondary

type Secondary struct {
	Goal string
}

func (*Secondary) GenerateGoal

func (s *Secondary) GenerateGoal(currentPlayer string, players []string) string

type Settings

type Settings struct {
	Lang                string
	NumberOfSecondaries int
}

Jump to

Keyboard shortcuts

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