core

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomCommands

func CustomCommands(irc oodle.IRCClient) oodle.Trigger

CustomCommands lets you make custom commands via. config

func Echo

func Echo() oodle.Command

Echo echoes back your nick!

func ExecCommands added in v1.5.0

func ExecCommands(sender oodle.Sender) oodle.Trigger

ExecCommands is similar to custom commands but instead of sending fixed message It runs/sends output of configured shell command

func GC added in v1.12.0

func GC(checker oodle.Checker) oodle.Command

func Help

func Help(bot oodle.Bot) oodle.Command

Help gives help info for commands

func List

func List(bot oodle.Bot, sender oodle.Sender) oodle.Command

List lists all the commands

func Memory added in v1.12.0

func Memory(checker oodle.Checker) oodle.Command

func Register

func Register(deps *oodle.Deps) error

Register wires everything up

func Tell

func Tell(irc oodle.IRCClient, db *sql.DB) ([]oodle.Command, oodle.Trigger)

Tell lets users send a msg. to an inactive user

func TitleScraper

func TitleScraper(irc oodle.IRCClient) oodle.Trigger

TitleScraper fetches, scrapes and sends titles whenever it sees urls

func Version

func Version() oodle.Command

Types

type Letter

type Letter struct {
	ID        uint       `db:"id"`
	CreatedAt time.Time  `db:"created_at"`
	UpdatedAt time.Time  `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`
	From      string     `db:"from"`
	To        string     `db:"to"`
	Body      string     `db:"body"`
	When      time.Time  `db:"when"`
}

type MailBox

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

func NewMailBox

func NewMailBox(db *sql.DB) *MailBox

func (*MailBox) BatchDelete added in v1.14.0

func (t *MailBox) BatchDelete(letters []*Letter)

func (*MailBox) Delete

func (t *MailBox) Delete(id uint)

func (*MailBox) Get added in v1.14.0

func (t *MailBox) Get(id uint) (*Letter, error)

func (*MailBox) HasMail

func (t *MailBox) HasMail(to string) bool

func (*MailBox) LettersFrom added in v1.14.0

func (t *MailBox) LettersFrom(from string) []*Letter

func (*MailBox) LettersTo added in v1.14.0

func (t *MailBox) LettersTo(to string) []*Letter

func (*MailBox) Migrate

func (t *MailBox) Migrate()

func (*MailBox) Send

func (t *MailBox) Send(l Letter) error

type Release added in v1.16.0

type Release struct {
	HTMLURL     string    `json:"html_url"`
	ID          int       `json:"id"`
	TagName     string    `json:"tag_name"`
	Draft       bool      `json:"draft"`
	Prerelease  bool      `json:"prerelease"`
	CreatedAt   time.Time `json:"created_at"`
	PublishedAt time.Time `json:"published_at"`
	Assets      []struct {
		URL       string    `json:"url"`
		ID        int       `json:"id"`
		Name      string    `json:"name"`
		State     string    `json:"state"`
		Size      int       `json:"size"`
		CreatedAt time.Time `json:"created_at"`
		UpdatedAt time.Time `json:"updated_at"`
	} `json:"assets"`
}

type RemindIn added in v1.4.0

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

func (*RemindIn) Command added in v1.4.0

func (r *RemindIn) Command() oodle.Command

func (*RemindIn) Watch added in v1.4.0

func (r *RemindIn) Watch()

Watch watches the store and sends out reminder that need to be out

type Reminder added in v1.4.0

type Reminder struct {
	ID        uint       `db:"id"`
	CreatedAt time.Time  `db:"created_at"`
	UpdatedAt time.Time  `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`
	By        string     `db:"by"`
	Msg       string     `db:"msg"`
	At        time.Time  `db:"at"`
}

type ReminderStore added in v1.4.0

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

func NewReminderStore added in v1.4.0

func NewReminderStore(db *sql.DB) *ReminderStore

func (*ReminderStore) Delete added in v1.4.0

func (r *ReminderStore) Delete(id uint)

func (*ReminderStore) Migrate added in v1.4.0

func (r *ReminderStore) Migrate()

func (*ReminderStore) Reminders added in v1.4.0

func (r *ReminderStore) Reminders() []Reminder

func (*ReminderStore) Set added in v1.4.0

func (r *ReminderStore) Set(reminder Reminder) error

type Seen

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

Seen tells you when it last saw someone

func (*Seen) Command added in v1.10.0

func (s *Seen) Command() oodle.Command

func (*Seen) Migrate added in v1.10.0

func (s *Seen) Migrate()

func (*Seen) Trigger added in v1.10.0

func (s *Seen) Trigger() oodle.Trigger

type Updates added in v1.16.0

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

func (*Updates) Loop added in v1.16.0

func (up *Updates) Loop()

func (*Updates) Notify added in v1.16.0

func (up *Updates) Notify()

Jump to

Keyboard shortcuts

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