telegram

package
v0.0.0-...-82869e8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSettings

func GetSettings(c *gin.Context)

GetSettings handler returns telegram settings

func Start

func Start()

Start creates new tg bot instance and listens for new events

func UpdateSettings

func UpdateSettings(c *gin.Context)

UpdateSettings handler updates telegram settings

Types

type Settings

type Settings struct {
	Name  string `json:"name"`
	Token string `json:"token" binding:"required"`
	Users []User `json:"users"`
}

Settings struct

type User

type User struct {
	Username string `json:"username"`
	Chat     int    `json:"chat"`
	Apps     []struct {
		ID    primitive.ObjectID `json:"id"`
		Level string             `json:"level"`
	} `json:"apps"`
}

User struct

Jump to

Keyboard shortcuts

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