faisal

package module
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 5 Imported by: 1

README

faisal

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 Keahlian

type Keahlian struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	UserID       primitive.ObjectID `bson:"user_id,omitempty" json:"user_id,omitempty"`
	NamaKeahlian string             `bson:"nama_keahlian,omitempty" json:"nama_keahlian,omitempty"`
	Tingkat      int                `bson:"tingkat,omitempty" json:"tingkat,omitempty"`
}

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 Pendidikan

type Pendidikan struct {
	ID             primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	UserID         primitive.ObjectID `bson:"user_id,omitempty" json:"user_id,omitempty"`
	NamaInstitusi  string             `bson:"nama_institusi,omitempty" json:"nama_institusi,omitempty"`
	Jurusan        string             `bson:"jurusan,omitempty" json:"jurusan,omitempty"`
	TanggalMulai   string             `bson:"tanggal_mulai,omitempty" json:"tanggal_mulai,omitempty"`
	TanggalSelesai string             `bson:"tanggal_selesai,omitempty" json:"tanggal_selesai,omitempty"`
}

type PengalamanKerja

type PengalamanKerja struct {
	ID             primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	UserID         primitive.ObjectID `bson:"user_id,omitempty" json:"user_id,omitempty"`
	NamaPerus      string             `bson:"nama_perusahaan,omitempty" json:"nama_perusahaan,omitempty"`
	Posisi         string             `bson:"posisi,omitempty" json:"posisi,omitempty"`
	TanggalMulai   string             `bson:"tanggal_mulai,omitempty" json:"tanggal_mulai,omitempty"`
	TanggalSelesai string             `bson:"tanggal_selesai,omitempty" json:"tanggal_selesai,omitempty"`
}

type Profil

type Profil struct {
	ID        primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	UserID    primitive.ObjectID `bson:"user_id,omitempty" json:"user_id,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 User

type User struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"_id,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