interfaces

package
v0.0.0-...-f800b22 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GbanInfo

type GbanInfo interface {
	GetTarget() int64
	GetSudo() SudoInfo
	GetReason() string
	GetMessageID() int // message id in channel.
}

type QString

type QString interface {
	Length() int
	IsEmpty() bool
	GetValue() string
	GetIndexV(_index int) rune
	IsEqual(_strong QString) bool
	Split(...QString) []QString
	SplitStr(...string) []QString
}

type SudoInfo

type SudoInfo interface {
	GetID() int64
	GetNickname() string
	GetDate() time.Time
}

type TgError

type TgError interface {
	SendRandomErrorMessage(*tgbotapi.Message)
}

type WClient

type WClient interface {
	AccountsLength() int
	PingClientDB(_report bool)
	DeleteCollection(database dbTypes.DATABASE, collection dbTypes.COLLECTION) wa.RESULT
	Destroy()
	GetWotoConfiguration() wa.RESULT
	GetPatList() (wa.RESULT, []bson.M)
	GetHPatList() (wa.RESULT, []bson.M)
	ResetWotoConfiguration() wa.RESULT
	ResetUsersCollection() wa.RESULT
	CreateNewConfiguration() wa.RESULT
	CreateNewAccount() wa.RESULT
	AddSudo(id int64, nick string) wa.RESULT
	RemSudo(id int64) wa.RESULT
	AddPat(patID string, t int32) (wa.RESULT, []bson.M)
	AddHPat(patID string, t int32) (wa.RESULT, []bson.M)
	RemovePat(patID string) (wa.RESULT, []bson.M)
	RemoveHPat(patID string) (wa.RESULT, []bson.M)
	FindAccount(_username, _pass *string) wa.RESULT
	DeleteAccount() wa.RESULT
	UpdateAccount() wa.RESULT
	UpdateAccountOnlineToken() wa.RESULT
}

type WMarkDown

type WMarkDown interface {
	Append(md WMarkDown) WMarkDown
	ToString() string
}

type WSettings

type WSettings interface {
	GetObt() string
	GetAPI() *tgbot.BotAPI
	IsGlobal() bool
	GetSudoList() []primitive.M
	IsSudo(id int64) bool
	IsMainSudo(id int64) bool
	GetWClient() WClient
	GetPatClient() WClient
	GetGClient() (*tg.Client, *context.Context)
	SetAPI(_api *tgbot.BotAPI)
	SetSudoList(list []primitive.M)
	SetTObt(_obt string)
	SetMainSudo(id int64)
	AddSudo(id int64, nick string) wa.RESULT
	RemSudo(id int64) wa.RESULT
	SendSudo(str string)
	// set the main w client.
	SetWClient(_client WClient)
	// set the pat db client.
	SetPatClient(client WClient)
	// set the Gclient. a client for do special actions
	// using mtproto.
	// like getting information of a user by its username.
	SetGClient(g *tg.Client, ctx *context.Context)
}

Jump to

Keyboard shortcuts

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