peda

package module
v0.0.0-...-061ac8e Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 11 Imported by: 0

README

fancy

fancy

go get -u all
go mod tidy
git tag                                 #check current version
git tag v0.0.28                          #set tag version
git push origin --tags                  #push tag version to repo
go list -m https://github.com/Fancypedia/fancybackend@v0.0.1   #publish to pkg dev, replace ORG/URL with your repo URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmbilSatuFilm

func AmbilSatuFilm(publickeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func AmbilSemuaFilm

func AmbilSemuaFilm(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func Authorization

func Authorization(publickeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CreateAllInput

func CreateAllInput(mongoconn *mongo.Database, collection string, sidangdata FormInputAll) interface{}

func CreateAllform

func CreateAllform(publickeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func CreateFronent

func CreateFronent(mongoconn *mongo.Database, collection string, sidangdata Frontend) interface{}

func DecodeGetName

func DecodeGetName(publickey string, tokenstring string) string

func DecodeGetRole

func DecodeGetRole(publickey string, tokenstring string) string

func DecodeGetUsername

func DecodeGetUsername(publickey string, tokenstring string) string

func DeleteAllform

func DeleteAllform(mconn *mongo.Database, collname string, datafilm FormInputAll) interface{}

func DeleteFrondent

func DeleteFrondent(mongoconn *mongo.Database, collection string, sidangdata Frontend) interface{}

func Encode

func Encode(no_whatsapp, username, role, privatekey string) (string, error)

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GenerateKey

func GenerateKey() (privatekey, publickey string)

func HapusFilm

func HapusFilm(publickeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func HashPassword

func HashPassword(password string) (string, error)

func InsertAllinput

func InsertAllinput(mconn *mongo.Database, collname string, datafilm FormInputAll) interface{}

func InsertUser

func InsertUser(mongoconn *mongo.Database, collection string, userdata User) interface{}

func IsPasswordValid

func IsPasswordValid(mconn *mongo.Database, collname string, userdata User) bool

func Login

func Login(privatekeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func Registrasi

func Registrasi(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func SetConnection

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

func UpdateFilm

func UpdateFilm(publickeykatalogkemanan, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string

func UpdateForm

func UpdateForm(mongoconn *mongo.Database, collection string, filter bson.M, sidangdata FormInputAll) interface{}

func UpdateFrontend

func UpdateFrontend(mongoconn *mongo.Database, collection string, filter bson.M, sidangdata FormInputAll) interface{}

func UsernameExists

func UsernameExists(mongoenvkatalogfilm, dbname string, userdata User) bool

Types

type Akademis

type Akademis struct {
	Nama_dosen        string `json:nama_dosen bson:"nama_dosen"`
	Pendidikan_dosen  string `json:pendidikan_dosen bson:"pendidikan_dosen"`
	Kuriulum_dosen    string `json:kuriulum_dosen bson:"kuriulum_dosen"`
	Penelitian_dosen  string `json:penelitian_dosen bson:"penelitian_dosen"`
	Gelar_dosen       string `json:gelar_dosen bson:"gelar_dosen"`
	Lembaga_dosen     string `json:lembaga_dosen bson:"lembaga_dosen"`
	Kemampuan_dosen   string `json:kemampuan_dosen bson:"kemampuan_dosen"`
	Penghargaan_dosen string `json:penghargaan_dosen bson:"penghargaan_dosen"`
}

type Backend

type Backend struct {
	Npm                int    `json:npm bson:"npm"`
	Nama               string `json:nama bson:"nama"`
	NamaDosen          string `json:namadosen bson:"namadosen"`
	Autentikasitoken   string `json:autentikasitoken bson:"autentikasitoken"`
	Packagesendiri     string `json:packagesendiri bson:"packagesendiri"`
	Endpointgcfjakarta string `json:endpointgcfjakarta bson:"endpointgcfjakarta"`
	Integrasiwamyid    string `json:integrasiwamyid bson:"integrasiwamyid"`
	Status             bool   `json:status bson:"status"`
}

func GetAllBackend

func GetAllBackend(mongoconn *mongo.Database, collection string) []Backend

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"`
	Username string      `json:"username,omitempty" bson:"username,omitempty"`
	Data     interface{} `json:"data,omitempty" bson:"data,omitempty"`
}

type CredentialUser

type CredentialUser struct {
	Status bool `json:"status" bson:"status"`
	Data   struct {
		No_whatsapp string `json:"no_whatsapp" bson:"no_whatsapp"`
		Username    string `json:"username" bson:"username"`
		Role        string `json:"role" bson:"role"`
	} `json:"data" bson:"data"`
	Message string `json:"message,omitempty" bson:"message,omitempty"`
}

type Dosen

type Dosen struct {
	Pendidikan_dosen  string `json:pendidikan_dosen bson:"pendidikan_dosen"`
	Kuriulum_dosen    string `json:kuriulum_dosen bson:"kuriulum_dosen"`
	Penelitian_dosen  string `json:penelitian_dosen bson:"penelitian_dosen"`
	Gelar_dosen       string `json:gelar_dosen bson:"gelar_dosen"`
	Lembaga_dosen     string `json:lembaga_dosen bson:"lembaga_dosen"`
	Kemampuan_dosen   string `json:kemampuan_dosen bson:"kemampuan_dosen"`
	Penghargaan_dosen string `json:penghargaan_dosen bson:"penghargaan_dosen"`
}

type FormInputAll

type FormInputAll struct {
	Nama_dosen  string        `json:nama_dosen bson:"nama_dosen"`
	Nik         string        `json:nik bson:"nik"`
	Dosen       []Dosen       `json:dosen bson:"dosen"`
	Suratall    []SuratKerja  `json:suratkerja bson:"suratkerja"`
	Sertificate []Sertificate `json:sertificate bson:"sertificate"`
	Akademis    []Akademis    `json:akademis bson:"akademis"`
	Status      bool          `json:status bson:"status"`
}

func FindFilm

func FindFilm(mconn *mongo.Database, collname string, datafilm FormInputAll) FormInputAll

func Getall

func Getall(mongoconn *mongo.Database, collection string) FormInputAll

type Frontend

type Frontend struct {
	Npm            int    `json:npm bson:"npm"`
	Nama           string `json:nama bson:"nama"`
	NamaDosen      string `json:namadosen bson:"namadosen"`
	Rilisjs        string `json:rilisjs bson:"rilisjs"`
	Pemanggilanjs  string `json:pemanggilanjs bson:"pemanggilanjs"`
	Kelengkapancss string `json:kelengkapancss bson:"kelengkapancss"`
	CustomDomain   string `json:customdomain bson:"customdomain"`
	Status         bool   `json:status bson:"status"`
}

func FindFrontend

func FindFrontend(mongoconn *mongo.Database, collection string, userdata FormInputAll) Frontend

type Payload

type Payload struct {
	No_whatsapp string    `json:"no_whatsapp"`
	Username    string    `json:"username"`
	Role        string    `json:"role"`
	Exp         time.Time `json:"exp"`
	Iat         time.Time `json:"iat"`
	Nbf         time.Time `json:"nbf"`
}

func Decode

func Decode(publickey, tokenstr string) (payload Payload, err error)

func IsTokenValid

func IsTokenValid(publickey, tokenstr string) (payload Payload, err error)

pengecekantoken

type Pesan

type Pesan struct {
	Status  bool        `json:"status" bson:"status"`
	Message string      `json:"message" bson:"message"`
	Data    interface{} `json:"data,omitempty" bson:"data,omitempty"`
	Token   string      `json:"token,omitempty" bson:"token,omitempty"`
}

type Response

type Response struct {
	Status  bool        `json:"status" bson:"status"`
	Message string      `json:"message" bson:"message"`
	Data    interface{} `json:"data" bson:"data"`
}

func CreateResponse

func CreateResponse(status bool, message string, data interface{}) Response

type Sertificate

type Sertificate struct {
	Judul_sertifikat              string `json:judul_sertifikat bson:"judul_sertifikat"`
	Pemberi_sertifikat            string `json:pemberi_sertifikat bson:"pemberi_sertifikat"`
	Penerima_sertifikat           string `json:penerima_sertifikat bson:"penerima_sertifikat"`
	Tujuan_sertifikat             string `json:tujuan_sertifikat bson:"tujuan_sertifikat"`
	Tanggal_penerbitan_sertifikat string `json:tanggal_penerbitan_sertifikat bson:"tanggal_penerbitan_sertifikat"`
	Cap_sertifikat                string `json:cap_sertifikat bson:"cap_sertifikat"`
	Nomo_sertifikat               string `json:nomo_sertifikat bson:"nomo_sertifikat"`
	Info_sertifikat               string `json:info_sertifikat bson:"info_sertifikat"`
	Logo_sertifikat               string `json:logo_sertifikat bson:"logo_sertifikat"`
}

type SuratKerja

type SuratKerja struct {
	Penawaran_kerja     string `json:penawaran_kerja bson:"penawaran_kerja"`
	Perjanjian_kerja    string `json:perjanjian_kerja bson:"perjanjian_kerja"`
	Pemberhentian_kerja string `json:pemberhentian_kerja bson:"pemberhentian_kerja"`
	Keterangan_kerja    string `json:keterangan_kerja bson:"keterangan_kerja"`
	Kuasa_kerja         string `json:kuasa_kerja bson:"kuasa_kerja"`
}

type User

type User struct {
	Username    string `json:"username" bson:"username"`
	Password    string `json:"password" bson:"password,omitempty"`
	Role        string `json:"role,omitempty" bson:"role,omitempty"`
	Token       string `json:"token,omitempty" bson:"token,omitempty"`
	Private     string `json:"private,omitempty" bson:"private,omitempty"`
	Publick     string `json:"publick,omitempty" bson:"publick,omitempty"`
	No_whatsapp string `json:"no_whatsapp,omitempty" bson:"no_whatsapp,omitempty"`
}

func FindBackend

func FindBackend(mongoconn *mongo.Database, collection string, userdata FormInputAll) User

func FindName

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

func FindNik

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

func FindUser

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

func FindUserByname

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

func FindUserUser

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

func GetAllUser

func GetAllUser(mconn *mongo.Database, collname string) []User

type UserToken

type UserToken struct {
	Username User `json:"username" bson:"username"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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