profile

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 5 Imported by: 0

README

data-profil

backend studi kasus profile

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProfile

func CreateProfile(username string, fullName string, email string, password string, db *mongo.Database, input string) (insertedID interface{})

func DeleteProfile

func DeleteProfile(username string, db *mongo.Database, input string)

func InsertOneDoc

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

func InsertProfile

func InsertProfile(pendidikan string, username string, bio string, checkin string, biodata Profile, db *mongo.Database) (InsertID interface{})

func UpdateProfilePassword

func UpdateProfilePassword(username string, newPassword string, input string, db *mongo.Database)

Types

type ListData

type ListData struct {
	Pendidikan string  `bson:"pendidikan"`
	Bio        string  `bson:"bio"`
	Username   string  `bson:"username"`
	Checkin    string  `bson:"checkin"`
	Biodata    Profile `bson:"biodata"`
}

type ProfilU

type ProfilU struct {
	ID        primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	UserID    primitive.ObjectID `bson:"user_id,omitempty" json:"user_id,omitempty"`
	Full_Name string             `bson:"full_name,omitempty" json:"full_name,omitempty"`
	Email     string             `bson:"email,omitempty" json:"email,omitempty"`
	Gambar    string             `bson:"gambar,omitempty" json:"gambar,omitempty"`
	Bio       string             `bson:"bio,omitempty" json:"bio,omitempty"`
	Alamat    string             `bson:"alamat,omitempty" json:"alamat,omitempty"`
	Pekerjaan string             `bson:"pekerjaan,omitempty" json:"pekerjaan,omitempty"`
}

type Profile

type Profile struct {
	Username string `bson:"username"`
	FullName string `bson:"full_name"`
	Email    string `bson:"email"`
	Password string `bson:"password"`
}

func GetDataProfFromStatus

func GetDataProfFromStatus(status string, db *mongo.Database, input string) (profile Profile)

func GetProfileByUsername

func GetProfileByUsername(username string, db *mongo.Database, input string) (profile Profile)

type TanggalU

type TanggalU struct {
	Tahun  string `bson:"tahun,omitempty" json:"tahun,omitempty"`
	Bulan  string `bson:"bulan,omitempty" json:"bulan,omitempty"`
	Jumlah string `bson:"jumlah,omitempty" json:"jumlah,omitempty"`
}

type UserProfil

type UserProfil struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Username string             `bson:"username,omitempty" json:"username,omitempty"`
	Email    string             `bson:"email,omitempty" json:"email,omitempty"`
	Password string             `bson:"password,omitempty" json:"password,omitempty"`
	Nama     string             `bson:"nama,omitempty" json:"nama,omitempty"`
}

Jump to

Keyboard shortcuts

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