subcmd

package
v0.0.0-...-0e73c5b Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Record

func Record(streamURL string, outputPath string, duration int)

func ServerRecord

func ServerRecord(streamURL string, prefix string, duration int)

Types

type Area

type Area struct {
	Areajp string `xml:"areajp"`
	Area   string `xml:"area"`
	R1     string `xml:"r1"`
	R2     string `xml:"r2"`
	Fm     string `xml:"fm"`
}

type AreaCmd

type AreaCmd struct{}

func (*AreaCmd) Execute

func (r *AreaCmd) Execute(x context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*AreaCmd) Name

func (*AreaCmd) Name() string

func (*AreaCmd) SetFlags

func (r *AreaCmd) SetFlags(f *flag.FlagSet)

func (*AreaCmd) Synopsis

func (*AreaCmd) Synopsis() string

func (*AreaCmd) Usage

func (*AreaCmd) Usage() string

type Areas

type Areas map[string]Area

func NewAreas

func NewAreas(configUrl string) Areas

func (*Areas) GetStreamURL

func (areas *Areas) GetStreamURL(stationID, channel string) (string, error)

type BookCmd

type BookCmd struct {
	List      bool
	Start     string
	Duration  int
	StationID string
	Channel   string
	Prefix    string
}

func (*BookCmd) Execute

func (b *BookCmd) Execute(x context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*BookCmd) Name

func (*BookCmd) Name() string

func (*BookCmd) SetFlags

func (b *BookCmd) SetFlags(f *flag.FlagSet)

func (*BookCmd) Synopsis

func (*BookCmd) Synopsis() string

func (*BookCmd) Usage

func (*BookCmd) Usage() string

func (*BookCmd) Validate

func (b *BookCmd) Validate() bool

type Config

type Config struct {
	General struct {
		API_URL string `yaml:"api_url"`
	} `yaml:"general"`

	DB struct {
		Dir           string `yaml:"db_dir"`
		Name          string `yaml:"db_name"`
		BookTableName string `yaml:"book_table"`
	} `yaml:"db"`
}

func GetDefaultConfig

func GetDefaultConfig() Config

func NewConfig

func NewConfig(fname ...string) *Config

type RecordCmd

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

func (*RecordCmd) Execute

func (r *RecordCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*RecordCmd) Name

func (*RecordCmd) Name() string

func (*RecordCmd) SetFlags

func (r *RecordCmd) SetFlags(f *flag.FlagSet)

func (*RecordCmd) Synopsis

func (*RecordCmd) Synopsis() string

func (*RecordCmd) Usage

func (*RecordCmd) Usage() string

type ServerCmd

type ServerCmd struct {
}

func (*ServerCmd) Execute

func (s *ServerCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*ServerCmd) Name

func (*ServerCmd) Name() string

func (*ServerCmd) SetFlags

func (s *ServerCmd) SetFlags(f *flag.FlagSet)

func (*ServerCmd) Synopsis

func (*ServerCmd) Synopsis() string

func (*ServerCmd) Usage

func (*ServerCmd) Usage() string

Jump to

Keyboard shortcuts

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