billblis

package module
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 10 Imported by: 0

README

billblis_be

backend proyek 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GCFPostHandler

func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func HashPassword

func HashPassword(password string) (string, error)

func InsertUser

func InsertUser(db *mongo.Database, collection string, userdata User) string

func IsPasswordValid

func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool

func SetConnection

func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database

Types

type Credential

type Credential struct {
	Status  bool   `json:"status" bson:"status"`
	Token   string `json:"token,omitempty" bson:"token,omitempty"`
	Message string `json:"message,omitempty" bson:"message,omitempty"`
}

type Pemasukan added in v0.0.2

type Pemasukan struct {
	ID            primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Tanggal_masuk time.Time          `bson:"tanggal_masuk,omitempty" json:"tanggal_masuk,omitempty"`
	Jumlah_masuk  int                `bson:"jumlah_masuk,omitempty" json:"jumlah_masuk,omitempty"`
	ID_sumber     Sumber             `bson:"id_sumber,omitempty" json:"id_sumber,omitempty"`
	Deskripsi     string             `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"`
	ID_user       User               `bson:"id_user,omitempty" json:"id_user,omitempty"`
}

type Pengeluaran added in v0.0.2

type Pengeluaran struct {
	ID             primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Tanggal_keluar time.Time          `bson:"tanggal_keluar,omitempty" json:"tanggal_keluar,omitempty"`
	Jumlah_keluar  int                `bson:"jumlah_keluar,omitempty" json:"jumlah_keluar,omitempty"`
	ID_sumber      Sumber             `bson:"id_sumber,omitempty" json:"id_sumber,omitempty"`
	Deskripsi      string             `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"`
	ID_user        User               `bson:"id_user,omitempty" json:"id_user,omitempty"`
}

type ResetPassword added in v0.0.2

type ResetPassword struct {
	MotherName  User   `bson:"mother,omitempty" json:"mother,omitempty"`
	Password    string `bson:"password,omitempty" json:"password,omitempty"`
	Newpassword string `bson:"newpass,omitempty" json:"newpass,omitempty"`
}

type Sumber added in v0.0.2

type Sumber struct {
	ID          primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Nama_sumber string             `bson:"nama_sumber,omitempty" json:"nama_sumber,omitempty"`
}

type User

type User struct {
	ID         primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Username   string             `json:"username" bson:"username"`
	Email      string             `bson:"email" json:"email"`
	Password   string             `bson:"password" json:"password"`
	MotherName string             `bson:"mothername,omitempty" json:"mothername,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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