utils

package
v0.0.0-...-1dcb0a7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateConnectionDB

func CreateConnectionDB(database string)

func CreateMessage

func CreateMessage(threads []models.Thread) string

func InsertThread

func InsertThread(thread models.Thread)

func IsNewThread

func IsNewThread(thread models.Thread) bool

func SendTelegramMessage

func SendTelegramMessage(message string, config Config) bool

Types

type Config

type Config struct {
	DBConnection    string
	Categories      []string
	TelegramApiKey  string
	TelegramChannel string
	Sentry          string
	ProxyURI        string
}

func ReadConfig

func ReadConfig() Config

type Message

type Message struct {
	ChatId string `json:"chat_id"`
	Text   string `json:"text"`
}

Jump to

Keyboard shortcuts

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