cmd_parvati

package
v0.0.0-...-3264e59 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(base *flags.Command) (*flags.Command, error)

func CheckAutoHost

func CheckAutoHost(api *parvatigo.Api, gameConfig *cmd_lowlevel.GameConfig, lastStat string, user *swagger.User, hostMessage string) (*swagger.GameCheckInfo, error)

func ConfigureIfacePrefs

func ConfigureIfacePrefs(confFile, inV4, inV6 string) (*iface.Config, error)

func DumpUserData

func DumpUserData(user *swagger.User, show_ids, has_admin bool)

func ProcessIPDelta

func ProcessIPDelta(delta *swagger.UserDelta, checkOnly, commentSame bool) error

func StringOrDefault

func StringOrDefault(s, d string) string

func TranslateDate

func TranslateDate(d string) string

func TrueOrDefault

func TrueOrDefault(b bool, d string) string

func UpdateIPs

func UpdateIPs(api *parvatigo.Api, ipFlags, v4INum, v6INum int, doIt bool) (*swagger.UserDelta, error)

Types

type Details

type Details struct {
	User           string `long:"user" short:"u" required:"false" description:"Get details for this user rather than yourself."`
	ShowIdentities bool   `long:"show-identities" short:"i" required:"false" description:"Show identities. Only valid if getting your own data."`
	// contains filtered or unexported fields
}

func (*Details) AddCommands

func (self *Details) AddCommands(base *flags.Command) (*flags.Command, error)

func (*Details) Execute

func (self *Details) Execute(args []string) error

func (*Details) NeedsAPI

func (self *Details) NeedsAPI() bool

func (*Details) NeedsAPIConfig

func (self *Details) NeedsAPIConfig() bool

func (*Details) SetAPI

func (self *Details) SetAPI(api *parvatigo.Api)

func (*Details) SetAPIConfig

func (self *Details) SetAPIConfig(api *parvatigo.ApiConfig)

type HostWatch

type HostWatch struct {
	EnabledGames  []string `short:"E" long:"enable" description:"Enable a game by (game) name or config section name." value-name:"<game>"`
	DisabledGames []string `` /* 137-byte string literal not displayed */
	V4Iface       string   `long:"iface4" required:"false" value-name:"<name>|<id>" description:"Use this interface name/number for public v4 IP."`
	V6Iface       string   `long:"iface6" required:"false" value-name:"<name>|<id>" description:"Use this interface name/number for public v6 IP."`
	HostMessage   string   `short:"m" long:"host-message" decription:"Use this message to host (overrides config files)" value-name:"<text>"`
	NoIPUpdate    bool     `long:"no-ip-update" required:"false" description:"Do not also update IPs."`
	// contains filtered or unexported fields
}

func (*HostWatch) AddCommands

func (self *HostWatch) AddCommands(base *flags.Command) (*flags.Command, error)

func (*HostWatch) Execute

func (self *HostWatch) Execute(args []string) error

func (*HostWatch) NeedsAPI

func (self *HostWatch) NeedsAPI() bool

func (*HostWatch) NeedsAPIConfig

func (self *HostWatch) NeedsAPIConfig() bool

func (*HostWatch) SetAPI

func (self *HostWatch) SetAPI(api *parvatigo.Api)

func (*HostWatch) SetAPIConfig

func (self *HostWatch) SetAPIConfig(api *parvatigo.ApiConfig)

func (*HostWatch) SetConfigFile

func (self *HostWatch) SetConfigFile(filePath string)

type UpdateIP

type UpdateIP struct {
	SetV6   bool   `short:"6" required:"false" description:"Update v6 IP (ignores enabled games)."`
	SetV4   bool   `short:"4" required:"false" description:"Update v4 IP (ignores enabled games)."`
	Check   bool   `short:"n" long:"no-update" required:"false" description:"Just show what would be done, do not actually update."`
	V4Iface string `long:"iface4" required:"false" value-name:"<name>|<id>" description:"Use this interface name/number for public v4 IP."`
	V6Iface string `long:"iface6" required:"false" value-name:"<name>|<id>" description:"Use this interface name/number for public v6 IP."`
	Repeat  bool   `long:"repeat" short:"r" required:"false" description:"Constantly updated over time."`
	// contains filtered or unexported fields
}

func (*UpdateIP) AddCommands

func (self *UpdateIP) AddCommands(base *flags.Command) (*flags.Command, error)

func (*UpdateIP) Execute

func (self *UpdateIP) Execute(args []string) error

func (*UpdateIP) NeedsAPI

func (self *UpdateIP) NeedsAPI() bool

func (*UpdateIP) NeedsAPIConfig

func (self *UpdateIP) NeedsAPIConfig() bool

func (*UpdateIP) SetAPI

func (self *UpdateIP) SetAPI(api *parvatigo.Api)

func (*UpdateIP) SetAPIConfig

func (self *UpdateIP) SetAPIConfig(api *parvatigo.ApiConfig)

func (*UpdateIP) SetConfigFile

func (self *UpdateIP) SetConfigFile(filePath string)

Jump to

Keyboard shortcuts

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