cmd

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: GPL-3.0 Imports: 12 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"`
	Command    commandAndArgs `json:"command,omitempty"`
	CommandKey string         `json:"command_key,omitempty"`
}

type Command

type Command struct {
	Title   string         `json:"title"`
	Command commandAndArgs `json:"command"`
	// 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
	SessionTitle     string
	EventTitle       string
	CategoryTitle    string
	EpisodeTitle     string
	SeasonTitle      string
	Date             time.Time
	OrdinalNumber    int
}

MetaData contains title metadata

func (MetaData) String

func (t MetaData) String() string

type MultiCommand

type MultiCommand struct {
	Title   string           `json:"title,omitempty"`
	Targets []ChannelMatcher `json:"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