schema

package module
v0.0.0-...-75dcc22 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	Name     string `yaml:"name"`
	Port     int    `yaml:"port"`
	Protocol string `yaml:"protocol"`
}

type Probe

type Probe struct {
	InitialDelaySeconds int `yaml:"initialDelaySeconds"`
	PeriodSeconds       int `yaml:"periodSeconds"`
	FailureThreshold    int `yaml:"failureThreshold"`
	SuccessThreshold    int `yaml:"successThreshold"`
	TimeoutSeconds      int `yaml:"timeoutSeconds"`
}

type Probes

type Probes struct {
	Command        []string `yaml:"command"`
	StartupProbe   Probe    `yaml:"startupProbe"`
	ReadynessProbe Probe    `yaml:"readynessProbe"`
	LivenessProbe  Probe    `yaml:"livenessProbe"`
}

type Resources

type Resources struct {
	CPU    string `yaml:"cpu"`
	Memory string `yaml:"memory"`
}

type Schema

type Schema struct {
	Name     string          `yaml:"name"`
	Image    string          `yaml:"image"`
	URL      string          `yaml:"url"`
	Ratio    string          `yaml:"ratio"`
	Sizes    map[string]Size `yaml:"sizes"`
	Network  []Network       `yaml:"network"`
	Settings []Setting       `yaml:"settings"`
	Volumes  []Volume        `yaml:"volumes"`
	Probes   Probes          `yaml:"probes"`
}

func GetSchema

func GetSchema(game string) (Schema, error)

GetSchema gets a game schema from a yaml file and stores it as a Schema.

type Setting

type Setting struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type Size

type Size struct {
	Resources Resources `yaml:"resources"`
	Players   int       `yaml:"players"`
}

type Sizes

type Sizes struct {
	XS Size `yaml:"xs"`
	S  Size `yaml:"s"`
	M  Size `yaml:"m"`
	L  Size `yaml:"l"`
	XL Size `yaml:"xl"`
}

type Volume

type Volume struct {
	Name  string `yaml:"name"`
	Path  string `yaml:"path"`
	Class string `yaml:"class"`
	Size  string `yaml:"size"`
}

Jump to

Keyboard shortcuts

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