loginqr

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 10 Imported by: 0

README

loginqr

go get -u all
go mod tidy
git tag
git tag v0.0.1
git push origin --tags
go list -m github.com/whatsauth/loginqr@v0.0.1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOneDoc

func GetOneDoc[T any](db *mongo.Database, collection string, filter bson.M) (doc T, err error)

func GetUUID

func GetUUID(msg model.IteungMessage, keyword string) string

func PostStructWithToken

func PostStructWithToken[T any](tokenkey string, tokenvalue string, structname interface{}, urltarget string) (result T, err error)

Types

type Profile

type Profile struct {
	Token       string `bson:"token"`
	Phonenumber string `bson:"phonenumber"`
}

func WAAPIToken

func WAAPIToken(phonenumber string, db *mongo.Database) (apitoken Profile, err error)

type Response

type Response struct {
	Response string `json:"response"`
	Info     string `json:"info,omitempty"`
}

func HandlerQRLogin

func HandlerQRLogin(msg model.IteungMessage, WAKeyword string, WAPhoneNumber string, db *mongo.Database, WAAPIQRLogin string) (resp Response, err error)

type WhatsauthRequest

type WhatsauthRequest struct {
	Uuid        string `json:"uuid,omitempty" bson:"uuid,omitempty"`
	Phonenumber string `json:"phonenumber,omitempty" bson:"phonenumber,omitempty"`
	Delay       uint32 `json:"delay,omitempty" bson:"delay,omitempty"`
}

Jump to

Keyboard shortcuts

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