cmd

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelMatcher

type ChannelMatcher struct {
	MatchTitle string         `json:"match_title,omitempty" toml:"match_title,omitempty"`
	Command    commandAndArgs `json:"command,omitempty" toml:"command,omitempty"`
	CommandKey string         `json:"command_key,omitempty" toml:"command_key,omitempty"`
	Proxy      bool           `json:"proxy" toml:"proxy"`
}

type Command

type Command struct {
	Title   string         `json:"title" toml:"title"`
	Command commandAndArgs `json:"command" toml:"command"`
	Proxy   bool           `json:"proxy" toml:"proxy"`
	// contains filtered or unexported fields
}

type CommandContext

type CommandContext struct {
	CustomOptions Command
	MetaData      MetaData
	URL           func() (string, error)
}

type MetaData

type MetaData struct {
	PerspectiveTitle string
	Event            string
	Category         string
	Title            string
	Session          string
	Date             time.Time
	Year             string
	Country          string
	Series           string
	EpisodeNumber    int64
	OrdinalNumber    int64
	Circuit          string

	Source interface{}
}

MetaData contains title metadata

type MultiCommand

type MultiCommand struct {
	Title   string           `json:"title,omitempty" toml:"title,omitempty"`
	Targets []ChannelMatcher `json:"targets,omitempty" toml:"targets,omitempty"`
}

type Store

type Store struct {
	Commands     []Command
	MultiCommads []MultiCommand
	// contains filtered or unexported fields
}

func NewStore

func NewStore(customCommands []Command, multiCommands []MultiCommand, lang []string, logger util.Logger, accentColor tcell.Color) *Store

func (*Store) GetCommand

func (s *Store) GetCommand(multi ChannelMatcher) Command

func (*Store) RunCommand

func (s *Store) RunCommand(cc CommandContext) error

Jump to

Keyboard shortcuts

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