haris

package module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 7 Imported by: 0

README

harisganteng

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func InsertAbout

func InsertAbout(db string, about Aboutsurat) (insertedID interface{})

func InsertKategori

func InsertKategori(db string, kategori Kategorisurat) (insertedID interface{})

func InsertLokasi

func InsertLokasi(db string, lokasi Lokasisurat) (insertedID interface{})

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})

func InsertSurat

func InsertSurat(db string, surat Surat) (insertedID interface{})

func InsertSuratChat

func InsertSuratChat(db *mongo.Database, collect string, Isisurat string, Subject string) (InsertedID interface{})

func InsertSuratData

func InsertSuratData(db *mongo.Database, collect string, Isisurat string, Subject string) (InsertedID interface{})

func InsertUser

func InsertUser(db string, user UserSurat) (insertedID interface{})

func MongoConnect

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

Types

type Aboutsurat

type Aboutsurat struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Isi_satu string             `bson:"isi_satu,omitempty" json:"isi_satu,omitempty"`
	Isi_dua  string             `bson:"isi_dua,omitempty" json:"isi_dua,omitempty"`
	Image    string             `bson:"image,omitempty" json:"image,omitempty"`
}

type Kategorisurat

type Kategorisurat struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	NamaKategori string             `bson:"nama_kategori" json:"nama_kategori"`
	Surat        []Surat            `bson:"surat" json:"surat"`
}

type Lokasisurat

type Lokasisurat struct {
	ID     primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Region string             `bson:"region,omitempty" json:"region,omitempty"`
}

type Returnsurat

type Returnsurat struct {
	Status     string `bson:"status,omitempty" json:"status,omitempty"`
	Message    string `bson:"message,omitempty" json:"message,omitempty"`
	InsertedID string `bson:"insertedid,omitempty" json:"insertedid,omitempty"`
}

type Surat

type Surat struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	Isisurat string             `bson:"isisurat" json:"isisurat"`
	Subject  string             `bson:"subject" json:"subject"`
}

func GetEmailData

func GetEmailData(isisurat string) (data []Surat)

func GetSurat

func GetSurat(surat string) (data []Surat)

func GetoSurato

func GetoSurato(hiya string) (data []Surat)

type UserSurat

type UserSurat struct {
	ID      primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	Nama    string             `bson:"nama" json:"nama"`
	Email   string             `bson:"email" json:"email"`
	Telepon string             `bson:"telepon" json:"telepon"`
}

func GetNamaUser

func GetNamaUser(nama string) (data []UserSurat)

func GetUserData

func GetUserData(telepon string) (data []UserSurat)

Jump to

Keyboard shortcuts

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