balbackend

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 7 Imported by: 0

README

balbackend

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func InsertBiaya

func InsertBiaya(db string, biaya Biaya) (insertedID interface{})

func InsertInformasi

func InsertInformasi(db string, informasi Informasi) (insertedID interface{})

func InsertJalurPenerimaan

func InsertJalurPenerimaan(db string, jalurpenerimaan JalurPenerimaan) (insertedID interface{})

func InsertOneDoc

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

func MongoConnect

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

Types

type Biaya

type Biaya struct {
	ID            primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Biayasemester string             `bson:"biayasemester" json:"biayasemester"`
}

func GetDataBiaya

func GetDataBiaya(stats string) (data []Biaya)

type Informasi

type Informasi struct {
	ID      primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	Alur    string             `bson:"alur" json:"alur"`
	Catatan string             `bson:"catatan" json:"catatan"`
}

func GetDataInformasi

func GetDataInformasi(stats string) (data []Informasi)

type JalurPenerimaan

type JalurPenerimaan struct {
	ID            primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	Jalurtanpates string             `bson:"jalurtanpates" json:"jalurtanpates"`
	Jalurtes      string             `bson:"jalurtes" json:"jalurtes"`
	Beasiswa      string             `bson:"Beasiswa" json:"Beasiswa"`
	Status        string             `bson:"status" json:"status"`
}

func GetDataJalurPenerimaan

func GetDataJalurPenerimaan(stats string) (data []JalurPenerimaan)
func InsertAbout(db string, about About) (insertedID interface{}) {
	insertResult, err := MongoConnect(db).Collection("about").InsertOne(context.TODO(), about)
	if err != nil {
		fmt.Printf("InsertAbout: %v\n", err)
	}
	return insertResult.InsertedID
}
func InsertContactus(db string, contacus Contactus) (insertedID interface{}) {
	insertResult, err := MongoConnect(db).Collection("contactus").InsertOne(context.TODO(), contacus)
	if err != nil {
		fmt.Printf("InsertContactus: %v\n", err)
	}
	return insertResult.InsertedID
}

Jump to

Keyboard shortcuts

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