module

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 10 Imported by: 2

README

Module Handling Iteung

Iteung module routing

Usage : declare : WAIface model.IteungWhatsMeowConfig, DBIface model.IteungDBConfig

Modulename,Pesan:=IteungModuleCall(WAIface, DBIface)
if Modulename != ""{
    go CallAndSend(Modulename, Pesan, WAIface)
}

List of Mongo Collection :

  1. Typo : to replace typo word
  2. Module : return module name from keyword

Dev

go get -u all
go mod tidy
git tag                                 #check current version
git tag v0.0.1                          #set tag version
git push origin --tags                  #push tag version to repo
go list -m github.com/aiteung/module@v0.0.1   #publish to pkg dev, replace ORG/URL with your repo URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallAndSend

func CallAndSend(Modulename string, Pesan model.IteungMessage, WAIface model.IteungWhatsMeowConfig) (resp whatsmeow.SendResponse, err error)

func Caller

func Caller(Modulename string, Pesan model.IteungMessage) (reply string)

func GetModuleName

func GetModuleName(im model.IteungMessage, MongoConn *mongo.Database, ModuleCollection string) (modulename string)

func IsIteungCall

func IsIteungCall(im model.IteungMessage) bool

func IteungModuleCall

func IteungModuleCall(WAIface model.IteungWhatsMeowConfig, DBIface model.IteungDBConfig) (Modulename string, Pesan model.IteungMessage)

func NormalizeAndTypoCorrection

func NormalizeAndTypoCorrection(message *string, MongoConn *mongo.Database, TypoCollection string)

func Whatsmeow2Struct

func Whatsmeow2Struct(WAIface model.IteungWhatsMeowConfig) (im model.IteungMessage)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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