cmds

package
v0.0.0-...-5129a00 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DebugFlag is used to specify whether command should run in development debug mode. Specific behavior depends on the command.
	DebugFlag = "debug"

	// GRPCFlag is used to specify that binary should run in gRPC server mode.
	GRPCFlag = "grpc"

	// IndexingFlag specifies whether platform is indexed for searching.
	IndexingFlag = "indexing"

	// InitDb forces initialization of the database (whether during opening or during reinitialization).
	InitDb = "init-db"

	// InterfaceFlag is used to specify network interface used for binary to listen on.
	InterfaceFlag = "interface"

	// JSONFlag is used to specify whether json output should be used.
	JSONFlag = "json"

	// LanguageFlag is used to specify language code.
	LanguageFlag = "language"

	// ListFlag is used by status to decide what type of listing should be shown.
	ListFlag = "list"

	// PageFlag is used to specify page of paging mechanism (games etc.).
	PageFlag = "page"

	// PageLimitFlag is used to specify maximum number of entries per page in paging mechanism.
	PageLimitFlag = "page-limit"

	// PlatformFlag is used to specify console platforms.
	PlatformFlag = "platform"

	// RegionFlag is used to specify region (PAL, NTSC-U, etc.).
	RegionFlag = "region"

	// TextFlag is used to specify text to be searched in games titles or descriptions.
	TextFlag = "text"

	// UIDFlag represents a unique identifier.
	UIDFlag = "uid"
)
View Source
const (

	// GamesResultStep is used for specifying that status includes information about results of game searching
	GamesResultStep = "games-results"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	Execute() error
	Start() error
	Wait() error
	Stdout() ([]byte, error)
}

type Dl

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

Dl is used to execute dl component binary

func NewDl

func NewDl(cfg DlCfg, args DlArguments) Dl

NewDl returns Dl command that is ready to be executed

func (Dl) Execute

func (dl Dl) Execute() error

Execute runs the command and waits for it to finish

func (Dl) InitializeWriters

func (c Dl) InitializeWriters(outWriter io.Writer, errWriter io.Writer) error

func (Dl) Start

func (c Dl) Start() error

func (Dl) Stdout

func (c Dl) Stdout() ([]byte, error)

func (Dl) Wait

func (c Dl) Wait() error

type DlArguments

type DlArguments struct {
	Platforms []string
	GRPC      bool
}

DlArguments is used to provide arguments for command executing the Dl component binary

type DlCfg

type DlCfg struct {
	Path      string
	Output    io.Writer
	ErrOutput io.Writer
}

DlCfg is used to control the behavior of command executing the Dl component binary

type Games

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

Games is used to execute Games component binary

func NewGames

func NewGames(cfg GamesCfg, args GamesArguments) Games

NewGames returns new Games cmd

func (Games) Execute

func (games Games) Execute() (queries.GamesResult, error)

Execute runs the command and waits for it to finish

type GamesArguments

type GamesArguments struct {
	Platforms []string
	Regions   []string
	Text      string
	Page      int
	PageLimit int
}

GamesArguments is used to provide arguments for command executing the Games component binary

type GamesCfg

type GamesCfg struct {
	Path string
}

GamesCfg is used to control the behavior of command executing the Games component binary

type GamesResultStatus

type GamesResultStatus struct {
	Step string              `json:"step"`
	Data queries.GamesResult `json:"data"`
}

GamesResultStatus is a result output from running games component

type Idx

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

Idx is used to execute dl component binary

func NewIdx

func NewIdx(cfg IdxCfg, args IdxArguments) Idx

NewIdx returns new Idx cmd

func (Idx) Execute

func (idx Idx) Execute() error

Execute runs the command and waits for it to finish

func (Idx) InitializeWriters

func (c Idx) InitializeWriters(outWriter io.Writer, errWriter io.Writer) error

func (Idx) Start

func (c Idx) Start() error

func (Idx) Stdout

func (c Idx) Stdout() ([]byte, error)

func (Idx) Wait

func (c Idx) Wait() error

type IdxArguments

type IdxArguments struct {
	Platforms []string
	GRPC      bool
}

IdxArguments is used to provide arguments for command executing the Dl component binary

type IdxCfg

type IdxCfg struct {
	Path      string
	Output    io.Writer
	ErrOutput io.Writer
}

IdxCfg is used to control the behavior of command executing the Dl component binary

Jump to

Keyboard shortcuts

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