wotoQuery

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFromMap

func RemoveFromMap(ID int)

RemoveFromMap will remove all of the queries with the specified id from the map. the ID should be message id.

func SetInMap

func SetInMap(value WotoQuery) int

Types

type QueryBase

type QueryBase struct {
	Plugin   int    `json:"p"` // the plugin
	Data     int    `json:"d"` // the data (unique data code)
	UniqueId string `json:"u"` // the unique id of source message
}

func GetQuery

func GetQuery(plugin QueryPlugin, dataCode int, unique string) *QueryBase

func ToQueryBase

func ToQueryBase(data string) (base *QueryBase, err error)

func (*QueryBase) Exists

func (q *QueryBase) Exists() bool

func (*QueryBase) GetDataQuery

func (q *QueryBase) GetDataQuery() WotoQuery

func (*QueryBase) GetType

func (q *QueryBase) GetType() QueryPlugin

func (*QueryBase) ToString

func (q *QueryBase) ToString() string

type QueryPlugin

type QueryPlugin uint8
const (
	NoneQueryPlugin QueryPlugin = 0 // None
	UdQueryPlugin   QueryPlugin = 1 // wotoUD plugin
)

type WotoQuery

type WotoQuery interface {
	GetId() int
	GetUniqueId() string
}

Jump to

Keyboard shortcuts

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