module

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 11 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 != ""{
    resp, err := CallAndSend(Modulename, Pesan, WAIface)
    if err != nil {
				fmt.Println("Gagal Kirim Whatsapp Dari ITEUNG V2 Baru")
				fmt.Println(err)
			}
			fmt.Println(resp)
}

Status Message
image

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.20                         #set tag version
git push origin --tags                  #push tag version to repo
go list -m github.com/aiteung/module@v0.0.20   #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, URLApiWa string) (resp atmessage.Response, errormessage string)

func Caller

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

func DocumentSendToGoWAAPI added in v0.0.25

func DocumentSendToGoWAAPI(pesan model.IteungMessage, urltarget string) (response atmessage.Response, errormessage 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 IteungV1 added in v0.0.10

func IteungV1(IteungIPAddress string, apikey string, Pesan model.IteungMessage)

func NormalizeAndTypoCorrection

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

func Run added in v0.0.8

func Run(Pesan model.IteungMessage, DBIface model.IteungDBConfig, URLApiWa string, HostIteungV1 string, apikeyv1 string) (Modulename string)

func SendToGoWAAPI added in v0.0.7

func SendToGoWAAPI(pesan model.GowaNotif, urltarget string) (response atmessage.Response, errormessage string)

func SendToIteungAPI added in v0.0.7

func SendToIteungAPI(pesan model.IteungMessage, urltarget string) (response atmessage.Response, errormessage string)

func SendToIteungV1API added in v0.0.10

func SendToIteungV1API(IteungIPAddress string, pesan atmessage.IteungMessage) (response atmessage.IteungRespon, errormessage 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