cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cmd implements the onsengo command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Types

type Episoder added in v1.0.0

type Episoder interface {
	Id() int
	JstUpdatedAt() (time.Time, bool)
	Manifest() (string, bool)
}

type Filter added in v1.0.0

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

Filter stores a chain of if-else procedure and run these tests on each Push() to filter input episodes. It stores all the manifests of the episodes that passed the filtering.

func NewFilter added in v1.0.0

func NewFilter(opts ...FilterOpt) *Filter

func (*Filter) Out added in v1.0.0

func (f *Filter) Out() []string

func (*Filter) Push added in v1.0.0

func (f *Filter) Push(e Episoder)

Takes an episode to run through the filter chain.

func (*Filter) With added in v1.0.0

func (f *Filter) With(opts ...FilterOpt)

type FilterFn added in v1.0.0

type FilterFn func(Episoder) bool

type FilterOpt added in v1.0.0

type FilterOpt func(*Filter)

func FilterUpdatedAfter added in v1.0.0

func FilterUpdatedAfter(dt time.Time) FilterOpt

Filters out an episode if it was updated before the given date.

type JstHyphenDate added in v1.0.0

type JstHyphenDate time.Time

A custom date format to fulfill pflag.Value interface.

func (*JstHyphenDate) Set added in v1.0.0

func (h *JstHyphenDate) Set(dt string) error

func (*JstHyphenDate) String added in v1.0.0

func (h *JstHyphenDate) String() string

func (*JstHyphenDate) Type added in v1.0.0

func (h *JstHyphenDate) Type() string

Jump to

Keyboard shortcuts

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