helpers

package
v0.0.0-...-18143ea Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice interface{}, val interface{}) bool

func GetChatID

func GetChatID(update tgbotapi.Update) (int64, error)

func GetConfig

func GetConfig() (config configuration.Config, err error)

func GetDomainRegexp

func GetDomainRegexp(domains []string) (*regexp.Regexp, error)
func GetInstantViewLink(author string, permalink string) string

func GetMessageID

func GetMessageID(update tgbotapi.Update) (int, error)

func GetUserID

func GetUserID(update tgbotapi.Update) (int, error)

func GetVoteMarkup

func GetVoteMarkup(voteID int64) tgbotapi.InlineKeyboardMarkup

func IsVoxPopuli

func IsVoxPopuli(author string) bool

func SendComment

func SendComment(author, permalink, text string, config configuration.Config) error

func Vote

func Vote(vote models.Vote, database *sql.DB, config configuration.Config) (successVotesCount int, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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