Documentation ¶
Index ¶
- Constants
- Variables
- func ButtonMessageToMessage(btm atmessage.ButtonsMessage) string
- func ButtonMessageWhatsauth(waclient *whatsmeow.Client, Info *types.MessageInfo, Message *waProto.Message, ...)
- func EventReadSocket(roomId string, PublicKey string, usertables []LoginInfo, db *sql.DB)
- func FilterWhatsauthButton(Info *types.MessageInfo, Message *waProto.Message) (filter bool)
- func GenerateButtonMessage(header string, content string, footer string) (btnmsg atmodel.ButtonsMessage)
- func GenerateButtonMessageCustom(uuid string, header string, content string, footer string, button []string) (btnmsg atmodel.ButtonsMessage)
- func GetHashPasswordfromUsername(username string, usertables []LoginInfo, db *sql.DB) (hashpassword string)
- func GetListUsernamefromPhonenumber(phone_number string, usertables []LoginInfo, db *sql.DB) (usernames []string)
- func GetUserIdfromUsername(username string, usertables []LoginInfo, db *sql.DB) (userid string)
- func GetUsernamefromPhonenumber(phone_number string, usertables []LoginInfo, db *sql.DB) (username string)
- func HandlerWhatsauth(waclient *whatsmeow.Client, Info *types.MessageInfo, Message *waProto.Message, ...)
- func HasKeyword(Info *types.MessageInfo, Message *waProto.Message) (whmsg bool)
- func RunHub()
- func RunModule(waclient *whatsmeow.Client, Info *types.MessageInfo, Message *waProto.Message, ...)
- func RunModuleLegacy(req WhatsauthRequest, PrivateKey string, usertables []LoginInfo, db *sql.DB) atmodel.NotifButton
- func RunSocket(c *websocket.Conn, PublicKey string, usertables []LoginInfo, db *sql.DB) (Id string)
- func RunWithUsernames(req WhatsauthRequest, PrivateKey string, usertables []LoginInfo, db *sql.DB) atmodel.NotifButton
- func SelectedRoles(req WhatsAuthRoles, PrivateKey string, usertables []LoginInfo, db *sql.DB) (notifbtn atmodel.NotifButton)
- func SendMessageTo(ID string, msg string) (res bool)
- func SendStructTo(ID string, strc interface{}) (res bool)
- func UpdatePasswordfromUsername(username string, usertables []LoginInfo, db *sql.DB) (newPassword string)
- type Client
- type LoginInfo
- type Message
- type WhatsAuthRoles
- type Whatsauth
- type WhatsauthMessage
- type WhatsauthRequest
- type WhatsauthStatus
Constants ¶
View Source
const Keyword string = "wh4t5auth0"
Variables ¶
View Source
var Clients = make(map[string]*websocket.Conn) // Note: although large maps with pointer-like types (e.g. strings) as keys are slow, using pointers themselves as keys is acceptable and fast
View Source
var Register = make(chan Client) // Register channel for Client Struct
View Source
var SendMesssage = make(chan Message)
View Source
var Unregister = make(chan string)
Functions ¶
func ButtonMessageToMessage ¶ added in v0.0.90
func ButtonMessageToMessage(btm atmessage.ButtonsMessage) string
func ButtonMessageWhatsauth ¶ added in v0.0.84
func EventReadSocket ¶ added in v0.0.83
func FilterWhatsauthButton ¶ added in v0.0.84
func FilterWhatsauthButton(Info *types.MessageInfo, Message *waProto.Message) (filter bool)
func GenerateButtonMessage ¶ added in v0.0.83
func GenerateButtonMessage(header string, content string, footer string) (btnmsg atmodel.ButtonsMessage)
func GenerateButtonMessageCustom ¶ added in v0.0.83
func GetHashPasswordfromUsername ¶ added in v0.0.9
func GetListUsernamefromPhonenumber ¶ added in v0.0.83
func GetUserIdfromUsername ¶ added in v0.0.9
func GetUsernamefromPhonenumber ¶ added in v0.0.9
func HandlerWhatsauth ¶ added in v0.0.84
func HasKeyword ¶ added in v0.0.84
func HasKeyword(Info *types.MessageInfo, Message *waProto.Message) (whmsg bool)
func RunModuleLegacy ¶ added in v0.0.84
func RunModuleLegacy(req WhatsauthRequest, PrivateKey string, usertables []LoginInfo, db *sql.DB) atmodel.NotifButton
func RunWithUsernames ¶ added in v0.0.83
func RunWithUsernames(req WhatsauthRequest, PrivateKey string, usertables []LoginInfo, db *sql.DB) atmodel.NotifButton
func SelectedRoles ¶ added in v0.0.83
func SelectedRoles( req WhatsAuthRoles, PrivateKey string, usertables []LoginInfo, db *sql.DB, ) (notifbtn atmodel.NotifButton)
func SendMessageTo ¶
func SendStructTo ¶ added in v0.0.5
Types ¶
type Client ¶ added in v0.0.83
type Client struct { Id string Conn *websocket.Conn } // Register Conn socket with ID
type LoginInfo ¶ added in v0.0.7
type LoginInfo struct { Userid string `json:"user_id,omitempty" bson:"user_id,omitempty"` Username string `json:"user_name,omitempty" bson:"user_name,omitempty"` Password string `json:"user_pass,omitempty" bson:"user_pass,omitempty"` Phone string `json:"phone,omitempty" bson:"phone,omitempty"` Login string `json:"login,omitempty" bson:"login,omitempty"` Uuid string `json:"uuid,omitempty" bson:"uuid,omitempty"` }
func GetLoginInfofromPhoneNumber ¶ added in v0.0.9
type WhatsAuthRoles ¶ added in v0.0.83
type WhatsauthMessage ¶ added in v0.0.7
type WhatsauthRequest ¶ added in v0.0.7
type WhatsauthStatus ¶ added in v0.0.7
type WhatsauthStatus struct {
Status string `json:"status,omitempty" bson:"status,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.