mysql

package
v0.0.0-...-40a74c7 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_RETRY int = 7
)
View Source
const TABLE_ACTION string = `
id BINARY(16) NOT NULL,
name VARCHAR(255) UNIQUE NOT NULL,
command TEXT,
PRIMARY KEY (id)
`
View Source
const TABLE_ARTICLE string = `` /* 272-byte string literal not displayed */
View Source
const TABLE_FEED string = `` /* 270-byte string literal not displayed */
View Source
const TABLE_FILTER string = `` /* 254-byte string literal not displayed */
View Source
const TABLE_SOURCE string = `` /* 166-byte string literal not displayed */
View Source
const TABLE_SOURCE_FILTER_MAP string = `` /* 183-byte string literal not displayed */
View Source
const TABLE_SOURCE_TYPE string = `
id BINARY(16) NOT NULL,
name VARCHAR(255) NOT NULL,
command TEXT,
user_create BOOLEAN NOT NULL DEFAULT 1,
PRIMARY KEY (id)
`

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func NewSession

func NewSession(msn *task.Mission, cfg *config.Database) (*Session, error)

func (*Session) AddAction

func (self *Session) AddAction(name string, cmd string) (*filter.Action, error)

func (*Session) AddArticle

func (self *Session) AddArticle(title string, body string, link string, unixtime int64, raw string, src_id *structs.Id) (*structs.Article, error)

func (*Session) AddFilter

func (self *Session) AddFilter(title string, regex_title bool, body string, regex_body bool, action_id *structs.Id) (*filter.Filter, error)

func (*Session) AddSource

func (self *Session) AddSource(title string, src_type_id *structs.Id, source string) (*structs.Source, error)

func (*Session) AddSourceType

func (self *Session) AddSourceType(name string, command string, is_user_creation bool) (*structs.SourceType, error)

func (*Session) BindFeed

func (self *Session) BindFeed(src_id *structs.Id, article_id *structs.Id) error

func (*Session) BindFilter

func (self *Session) BindFilter(src_id *structs.Id, f_id *structs.Id) error

func (*Session) Close

func (self *Session) Close() error

func (*Session) DeleteAction

func (self *Session) DeleteAction(id *structs.Id) error

func (*Session) DeleteFilter

func (self *Session) DeleteFilter(id *structs.Id) error

func (*Session) DeleteSource

func (self *Session) DeleteSource(id *structs.Id) error

func (*Session) DeleteSourceType

func (self *Session) DeleteSourceType(id *structs.Id) error

func (*Session) FindSource

func (self *Session) FindSource(kw string) ([]*structs.Source, error)

func (*Session) GetAction

func (self *Session) GetAction(id *structs.Id) (*filter.Action, error)

func (*Session) GetActions

func (self *Session) GetActions() ([]*filter.Action, error)

func (*Session) GetFeed

func (self *Session) GetFeed(src_id *structs.Id, limit int64) ([]*structs.Article, error)

func (*Session) GetFilter

func (self *Session) GetFilter(id *structs.Id) (*filter.Filter, error)

func (*Session) GetFilterOnSource

func (self *Session) GetFilterOnSource(src_id *structs.Id) ([]*filter.Filter, error)

func (*Session) GetFilters

func (self *Session) GetFilters() ([]*filter.Filter, error)

func (*Session) GetSource

func (self *Session) GetSource(id *structs.Id) (*structs.Source, error)

func (*Session) GetSourceType

func (self *Session) GetSourceType(id *structs.Id) (*structs.SourceType, error)

func (*Session) GetSourceTypes

func (self *Session) GetSourceTypes() ([]*structs.SourceType, error)

func (*Session) GetSourceWithEnabledFilter

func (self *Session) GetSourceWithEnabledFilter(f_id *structs.Id) ([]*structs.Source, error)

func (*Session) GetSources

func (self *Session) GetSources() ([]*structs.Source, error)

func (*Session) LookupArticles

func (self *Session) LookupArticles(t_kw string, b_kw string, src_ids []*structs.Id, start int64, end int64, limit int64) ([]*structs.Article, error)

func (*Session) RemoveArticle

func (self *Session) RemoveArticle(id *structs.Id) error

func (*Session) RemoveFeedEntry

func (self *Session) RemoveFeedEntry(src_id *structs.Id, article_id *structs.Id) error

func (*Session) UnBindFilter

func (self *Session) UnBindFilter(src_id *structs.Id, f_id *structs.Id) error

func (*Session) UpdateFilterAction

func (self *Session) UpdateFilterAction(id *structs.Id, action_id *structs.Id) (*filter.Filter, error)

Jump to

Keyboard shortcuts

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