Documentation ¶
Index ¶
Constants ¶
const BlockButton = "BLOCK_BUTTON"
BlockButton is an env var name for i3 block button
const BlockButtonRightClick = "3"
BlockButtonRightClick is the value for right click
const EnvUsername = "I3_NOTIFY_MOE_USERNAME"
EnvUsername is an env var name for username
const StateFilename = "state"
StateFilename is where the state is peristed at (released, today, unreleased)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration contains environment variables that are set and influence the behavior of the application
func (Configuration) IsRightButtonClicked ¶
func (cfg Configuration) IsRightButtonClicked() bool
IsRightButtonClicked checks whether the environment variable for block button indicates a right button click
type ConfigurationService ¶
type ConfigurationService interface { LoadPersistedState(reader io.Reader) error PersistState(writer io.Writer) error SetStateItems(stateItems []StateItem) error GetConfiguration() *Configuration GetState() *State }
ConfigurationService interface for configuration
func NewConfigurationService ¶
func NewConfigurationService() ConfigurationService
NewConfigurationService creates a new ConfigurationService
type State ¶
type State struct { ReleasedAnimes []StateItem TodayAnimes []StateItem UnreleasedAnimes []StateItem }
State contains a list of each category of queried animes (released, today, unreleasd)
type StateItem ¶
StateItem describes an anime
func (StateItem) DatetimeToDate ¶
DatetimeToDate converts datetime string to a timezone aware datetime object and extracts the date
func (StateItem) DatetimeToTime ¶
DatetimeToTime converts datetime string to a timezone aware datetime object and extracts the time
func (*StateItem) FromString ¶
FromString deserializes a StateItem string