config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: GPL-3.0 Imports: 5 Imported by: 60

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileLogger

func FileLogger(filename string) *zap.Logger

создание log файла и самого логера

Types

type Configuration

type Configuration struct {
	Addr      EndpointType // endpoint address
	ApiKey    string
	SecretKey string
	Password  string
	DebugMode bool
}

func New

func New(endpoint EndpointType, debug bool) Configuration

func NewAuth

func NewAuth(pathToConf string, exNum int, endpoint EndpointType, debug bool) Configuration

получение конфигурации для подключения с ApiKey и SecretKey, необходимых для авторизации

type EndpointType

type EndpointType string

type Operation added in v0.1.1

type Operation struct {
	Op      string      // название оператора, например subscribe, login
	Channel string      // название канала, если такой необходим
	Args    interface{} // тут хранятся аргументы, необходимые для подписки, авторизации и тп
	Hash    uint32      // Хеш по которому ищется определенный канал при подписке
	Text    string      // текст, из которого подучается хеш и который описывает всю операцию (не сичтая самой операции)
}

Jump to

Keyboard shortcuts

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