reminder

package
v0.0.0-...-d71c2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExceeds24Hours = fmt.Errorf("exceeds 24 hours")
View Source
var ErrParseClock = errors.New("parse clock")

Functions

func ParseClock

func ParseClock(s string) (hour int, minute int, err error)

func ScanSpace

func ScanSpace(data []byte, atEOF bool) (advance int, token []byte, err error)

Types

type Dependency

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

func New

func New(memory *bigcache.BigCache) (*Dependency, error)

func (*Dependency) CheckUserLimit

func (d *Dependency) CheckUserLimit(ctx context.Context, id int64) (n int, err error)

func (*Dependency) DecrementUserLimit

func (d *Dependency) DecrementUserLimit(ctx context.Context, id int64) error

func (*Dependency) Handler

func (d *Dependency) Handler(ctx context.Context, c tb.Context) error

func (*Dependency) IncrementUserLimit

func (d *Dependency) IncrementUserLimit(ctx context.Context, id int64) error

type Reminder

type Reminder struct {
	Subject []string // maximum of 3 person ping
	Time    time.Time
	Object  string
}

func ParseText

func ParseText(ctx context.Context, text string) (Reminder, error)

type SentenceElement

type SentenceElement uint8
const (
	None SentenceElement = iota
	Subject
	Time
	Verb
	TimePreposition
	VerbPreposition
	Conjunction
)

Jump to

Keyboard shortcuts

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