alert

package
v0.0.0-...-fa121a4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	XMLName xml.Name `xml:"channel"`
	Item    []Item   `xml:"item"`
}

type Date

type Date struct {
	time.Time
}

func (*Date) UnmarshalXML

func (d *Date) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Item

type Item struct {
	XMLName     xml.Name `xml:"item"`
	PublishDate Date     `xml:"pubDate"`
	Title       string   `xml:"title"`
	Description string   `xml:"description"`
	Link        RssLink  `xml:"link"`
	Details     string   `xml:"-"`
}

type Module

type Module struct {
	api.Module
}

func (*Module) Load

func (m *Module) Load(d *discordgo.Session)

func (*Module) Name

func (*Module) Name() string

type RootXML

type RootXML struct {
	XMLName xml.Name `xml:"rss"`
	Channel Channel  `xml:"channel"`
}
type RssLink struct {
	Link string
	Id   string
}

func (*RssLink) UnmarshalXML

func (d *RssLink) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Site

type Site struct {
	SiteName     string   `gorm:"column:name"`
	RSSUrl       string   `gorm:"column:rss"`
	ElmahUrl     string   `gorm:"column:elmahUrl"`
	AlertChannel []string `gorm:"-"`
	Webhook      string   `gorm:"column:webhook;size:1000;not null;default:''"`
	WebhookId    string   `gorm:"-"`
	WebhookToken string   `gorm:"-"`
	Channels     string
	AlertServer  []string `gorm:"-"`
	Servers      string
	Cookie       string `gorm:"column:cookie_cobaltsession"`
	Domain       string
	MaxErrors    int
	Period       int
	// contains filtered or unexported fields
}

func (*Site) AfterFind

func (s *Site) AfterFind(*gorm.DB) (err error)

Jump to

Keyboard shortcuts

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