cobafunc

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 7 Imported by: 0

README

ch 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func InsertOneDoc

func InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})

func Inserttamu

func Inserttamu(nama string, email string, kota string, status string) (InsertedID interface{})

func MongoConnect

func MongoConnect(dbname string) (db *mongo.Database)

Types

type Tamu

type Tamu struct {
	ID     primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
	Nama   string             `bson:"nama" json:"nama"`
	Email  string             `bson:"email" json:"email"`
	Kota   string             `bson:"kota" json:"kota"`
	Status string             `bson:"status" json:"status"`
}

func GetDataKota added in v0.0.6

func GetDataKota(kot string) (data []Tamu)

func GetDataStatus added in v0.0.5

func GetDataStatus(tus string) (data []Tamu)

func GetDatatam added in v0.0.9

func GetDatatam(nam string) (data []Tamu)

Jump to

Keyboard shortcuts

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