irc

package
v0.0.0-...-f3db812 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Duplicate         = "Duplicate"
	RawImage          = "image"
	RawImageThumbnail = "thumb"
	RawWebm           = "webm"
	RawWebmFrame      = "webm1"
	RawGif            = "gif"
)

Those strings are used in database type fields

View Source
const (
	Image   = "image"
	Link    = "link"
	Youtube = "youtube"
	WebM    = "webm"
	Gif     = "gif"
)

Variables

View Source
var ImageAction *imageAction

ImageAction - Instance of imageAction struct

View Source
var Images = []string{".jpg", ".png", ".jpeg"}

Functions

func GetAcceptInvalidCert

func GetAcceptInvalidCert() bool

func GetAutoReJoin

func GetAutoReJoin() bool

func GetAutoReconnect

func GetAutoReconnect() bool

func GetBotName

func GetBotName() string

func GetCertFile

func GetCertFile() string

func GetChannel

func GetChannel() string

func GetChannelPassword

func GetChannelPassword() string

func GetDataPath

func GetDataPath() string

func GetDbFile

func GetDbFile() string

func GetKeyFile

func GetKeyFile() string

func GetLogFile

func GetLogFile() string

func GetServerAddress

func GetServerAddress() string

func GetServerPassword

func GetServerPassword() string

func GetServerPort

func GetServerPort() int

func GetUseSsl

func GetUseSsl() bool

func GetWebPassword

func GetWebPassword() string

func GetWebPort

func GetWebPort() int

func GetYoutubeApiKey

func GetYoutubeApiKey() string

func InitConf

func InitConf(configFile string)

func InitImageAction

func InitImageAction()

func StartsWith

func StartsWith(a string, list []string) bool

Types

type DBLink struct {
	Key         sql.NullInt64
	Link        sql.NullString
	Sender_id   sql.NullInt64
	Date        time.Time
	Link_type   sql.NullString
	Sender_name sql.NullString
}

type DBRaw

type DBRaw struct {
	Mime_type sql.NullString
	Link_id   sql.NullInt64
	Data_type sql.NullString
}

type DBStatDuplicate

type DBStatDuplicate struct {
	Count     int64
	User_name string
	Sender_id int64
}
type DBStatGroupLink struct {
	Count int64
	Type  string
}

type DBStatGroupUser

type DBStatGroupUser struct {
	Count     int64
	User_name string
	Sender_id int64
}

type DBUser

type DBUser struct {
	Key       sql.NullInt64
	User_name sql.NullString
}

type Handler

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

func NewHandler

func NewHandler(conn *client.Conn, channel string) Handler

func (*Handler) GoogleSearch

func (h *Handler) GoogleSearch(query string)

func (*Handler) ParseYoutube

func (h *Handler) ParseYoutube(url *urlLib.URL) (bool, string)

func (*Handler) Recv

func (h *Handler) Recv(line string, sender string)

func (*Handler) Youtube

func (h *Handler) Youtube(videoId string)

type IrcDatabase

type IrcDatabase struct {
	// contains filtered or unexported fields
}
func (i *IrcDatabase) AddLink(link, linkType, username string) *DBLink

func (*IrcDatabase) AddRaw

func (i *IrcDatabase) AddRaw(dataType string, link *DBLink, mime_type string) int64

func (*IrcDatabase) GetAll

func (i *IrcDatabase) GetAll(limit int, offset int, link_types []string) *[]DBLink

func (*IrcDatabase) GetCount

func (i *IrcDatabase) GetCount(link_types []string) int

func (*IrcDatabase) GetCreateUser

func (i *IrcDatabase) GetCreateUser(userName string) *DBUser

func (*IrcDatabase) GetDatabaseVersion

func (i *IrcDatabase) GetDatabaseVersion() int

func (*IrcDatabase) GetDuplicateStat

func (i *IrcDatabase) GetDuplicateStat() *[]DBStatDuplicate
func (i *IrcDatabase) GetLink(url string) *DBLink

func (*IrcDatabase) GetLinkById

func (i *IrcDatabase) GetLinkById(id int64) *DBLink

func (*IrcDatabase) GetLinkGroupStat

func (i *IrcDatabase) GetLinkGroupStat() *[]DBStatGroupLink

func (*IrcDatabase) GetRaw

func (i *IrcDatabase) GetRaw(linkId int64, rawType string) (*DBRaw, error)

func (*IrcDatabase) GetUserStat

func (i *IrcDatabase) GetUserStat() *[]DBStatGroupUser
func (i *IrcDatabase) GetYoutubeLink(id string) *DBLink

func (*IrcDatabase) LogDuplicate

func (i *IrcDatabase) LogDuplicate(link *DBLink, sender string)

func (*IrcDatabase) Open

func (i *IrcDatabase) Open() *sql.DB
func (i *IrcDatabase) RemoveLink(link *DBLink)

Jump to

Keyboard shortcuts

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