Documentation ¶
Index ¶
- Constants
- func GenerateClient(index dbTypes.DB_INDEX) (wa.RESULT, interfaces.WClient)
- func GenerateClients(settings interfaces.WSettings)
- type WotoClient
- func (_c *WotoClient) AccountsLength() int
- func (_c *WotoClient) AddGBan(info interfaces.GbanInfo) error
- func (_c *WotoClient) AddHPat(patID string, t int32) (wa.RESULT, []bson.M)
- func (_c *WotoClient) AddPat(patID string, t int32) (wa.RESULT, []bson.M)
- func (_c *WotoClient) AddPat2(patID string, t int32) (wa.RESULT, []bson.M)
- func (_c *WotoClient) AddSudo(id int64, nick string) wa.RESULT
- func (_c *WotoClient) CreateNewAccount() wa.RESULT
- func (_c *WotoClient) CreateNewConfiguration() wa.RESULT
- func (_c *WotoClient) DeleteAccount() wa.RESULT
- func (_c *WotoClient) DeleteCollection(database dbTypes.DATABASE, collection dbTypes.COLLECTION) wa.RESULT
- func (_c *WotoClient) Destroy()
- func (_c *WotoClient) FindAccount(_username, _pass *string) wa.RESULT
- func (_c *WotoClient) GetHPatList() (wa.RESULT, []bson.M)
- func (_c *WotoClient) GetPatList() (wa.RESULT, []bson.M)
- func (_c *WotoClient) GetPatList2() (wa.RESULT, []bson.M)
- func (_c *WotoClient) GetWotoConfiguration() wa.RESULT
- func (_c *WotoClient) PingClientDB(_report bool)
- func (_c *WotoClient) RemGBan(id int64, sudo int64, nick string) wa.RESULT
- func (_c *WotoClient) RemSudo(id int64) wa.RESULT
- func (_c *WotoClient) RemoveHPat(patID string) (wa.RESULT, []bson.M)
- func (_c *WotoClient) RemovePat(patID string) (wa.RESULT, []bson.M)
- func (_c *WotoClient) RemovePat2(patID string) (wa.RESULT, []bson.M)
- func (_c *WotoClient) ResetUsersCollection() wa.RESULT
- func (_c *WotoClient) ResetWotoConfiguration() wa.RESULT
- func (_c *WotoClient) UpdateAccount() wa.RESULT
- func (_c *WotoClient) UpdateAccountOnlineToken() wa.RESULT
Constants ¶
const ( MainDataBase dbTypes.DATABASE = "bgrsx76y6idxwuk" // wConfig PatDataBase dbTypes.DATABASE = "bqvkw7yvsxypyuj" // pat )
databases' name used in the app.
const ( // ConfigurationCollection is for configuration of the bot. ConfigurationCollection dbTypes.COLLECTION = "Configuration" SUDOs_INFO dbTypes.COLLECTION = "SudoInfo" PatListCollection dbTypes.COLLECTION = "Pat" HPatListCollection dbTypes.COLLECTION = "HPat" // UsersCollection is the main user collection :/ UsersCollection dbTypes.COLLECTION = "Users" // SecuredCollection SecuredCollection dbTypes.COLLECTION = "Secured" // PlayerInfoCollection PlayerInfoCollection dbTypes.COLLECTION = "PlayerInfo" // OnlineTokenCollection OnlineTokenCollection dbTypes.COLLECTION = "OnlineTokens" )
const ( RAW_CONFIG_CLIENT dbTypes.DB_INDEX = 1 PAT_CLIENT dbTypes.DB_INDEX = 2 )
Variables ¶
This section is empty.
Functions ¶
func GenerateClient ¶
GenerateClient will generate a new data base client for you, if and only if there is no client defined in the program. before calling this function, create a new settings in the app.
func GenerateClients ¶
func GenerateClients(settings interfaces.WSettings)
GenerateClients will generate all woto clients used in the app.
Types ¶
type WotoClient ¶
type WotoClient struct { HostAddress string // contains filtered or unexported fields }
the WotoClient struct which will act as a client in the program
func (*WotoClient) AccountsLength ¶
func (_c *WotoClient) AccountsLength() int
func (*WotoClient) AddGBan ¶
func (_c *WotoClient) AddGBan(info interfaces.GbanInfo) error
func (*WotoClient) AddHPat ¶
AddPat will add a new hentai pat to the db. it's not our duty to check if the patID already exists or not! pat plugin should check if before call this method!
func (*WotoClient) AddPat ¶
AddPat will add a new pat to the db. it's not our duty to check if the patID already exists or not! pat plugin should check if before call this method!
func (*WotoClient) AddPat2 ¶
AddPat will add a new pat to the db. it's not our duty to check if the patID already exists or not! pat plugin should check if before call this method!
func (*WotoClient) CreateNewAccount ¶
func (_c *WotoClient) CreateNewAccount() wa.RESULT
func (*WotoClient) CreateNewConfiguration ¶
func (_c *WotoClient) CreateNewConfiguration() wa.RESULT
func (*WotoClient) DeleteAccount ¶
func (_c *WotoClient) DeleteAccount() wa.RESULT
func (*WotoClient) DeleteCollection ¶
func (_c *WotoClient) DeleteCollection(database dbTypes.DATABASE, collection dbTypes.COLLECTION) wa.RESULT
DeleteCollection will delete the specified collection.
func (*WotoClient) Destroy ¶
func (_c *WotoClient) Destroy()
func (*WotoClient) FindAccount ¶
func (_c *WotoClient) FindAccount(_username, _pass *string) wa.RESULT
func (*WotoClient) GetHPatList ¶
func (_c *WotoClient) GetHPatList() (wa.RESULT, []bson.M)
GetHPatList will give you the hentai pat list in the db. Even if there is no pat in the db, `[]bson.M` will not be nil, though its length will be zero.
func (*WotoClient) GetPatList ¶
func (_c *WotoClient) GetPatList() (wa.RESULT, []bson.M)
GetHPatList will give you the pat list in the db. Even if there is no pat in the db, `[]bson.M` will not be nil, though its length will be zero.
func (*WotoClient) GetPatList2 ¶
func (_c *WotoClient) GetPatList2() (wa.RESULT, []bson.M)
GetHPatList will give you the pat list in the db. Even if there is no pat in the db, `[]bson.M` will not be nil, though its length will be zero.
func (*WotoClient) GetWotoConfiguration ¶
func (_c *WotoClient) GetWotoConfiguration() wa.RESULT
GetWotoConfiguration will directly give you the configuration from db.
func (*WotoClient) PingClientDB ¶
func (_c *WotoClient) PingClientDB(_report bool)
func (*WotoClient) RemoveHPat ¶
RemoveHPat will remove the hentai pat with specified id. It will return `FAILED` if it encouners any error, will return `SUCCESS` if it successfully deleted the pat and the call to getPatList was successful, and will return `CANCELED` if it found nothing in loop. It's not that it will give you information about existing of a pat! so be carefull about it; the pat MAY EXISTS in the db, but the method may return `CANCELED`.
func (*WotoClient) RemovePat ¶
RemovePat will remove the pat with specified id. It will return `FAILED` if it encouners any error, will return `SUCCESS` if it successfully deleted the pat and the call to getPatList was successful, and will return `CANCELED` if it found nothing in loop. It's not that it will give you information about existing of a pat! so be carefull about it; the pat MAY EXISTS in the db, but the method may return `CANCELED`.
func (*WotoClient) RemovePat2 ¶
RemovePat will remove the pat with specified id. It will return `FAILED` if it encouners any error, will return `SUCCESS` if it successfully deleted the pat and the call to getPatList was successful, and will return `CANCELED` if it found nothing in loop. It's not that it will give you information about existing of a pat! so be carefull about it; the pat MAY EXISTS in the db, but the method may return `CANCELED`.
func (*WotoClient) ResetUsersCollection ¶
func (_c *WotoClient) ResetUsersCollection() wa.RESULT
func (*WotoClient) ResetWotoConfiguration ¶
func (_c *WotoClient) ResetWotoConfiguration() wa.RESULT
func (*WotoClient) UpdateAccount ¶
func (_c *WotoClient) UpdateAccount() wa.RESULT
func (*WotoClient) UpdateAccountOnlineToken ¶
func (_c *WotoClient) UpdateAccountOnlineToken() wa.RESULT