storage

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func At

func At(s Interface, chatID int64, m time.Month, d int) (models.Events, error)

func Next

func Next(s Interface, chatID int64) (models.Events, error)

func Today

func Today(s Interface, chatID int64) (models.Events, error)

Types

type Interface

type Interface interface {
	Format(chatID int64) string
	ChatIDs() []int64
	IsEnabled(chatID int64) bool

	At(chatID int64, t time.Time) (models.Events, error)
	Add(chatID int64, e models.Event) error
	Remove(chatID int64, e models.Event) error
}

type YAML

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

func NewYAML

func NewYAML(path string) (*YAML, error)

func (*YAML) Add

func (y *YAML) Add(chatID int64, e models.Event) error

func (*YAML) At

func (y *YAML) At(chatID int64, t time.Time) (models.Events, error)

func (*YAML) ChatIDs

func (y *YAML) ChatIDs() []int64

func (*YAML) Format

func (y *YAML) Format(chatID int64) string

func (*YAML) IsEnabled

func (y *YAML) IsEnabled(chatID int64) bool

func (*YAML) Remove

func (y *YAML) Remove(chatID int64, e models.Event) error

Jump to

Keyboard shortcuts

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