config

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CheckPassword added in v1.1.2

func CheckPassword(hashedPassword string, password string) error

CheckPassword memeriksa apakah password sesuai dengan hashed password Mengembalikan nil jika cocok, atau error jika tidak cocok

func CloseLogger added in v1.1.0

func CloseLogger(logger *logrus.Logger)

Fungsi untuk menutup file log

func ConnectDB

func ConnectDB(config DBConfig) (*gorm.DB, error)

func HashedPassword added in v1.1.2

func HashedPassword(password string) (string, error)

HashedPassword menghasilkan hash dari password yang diberikan

func InitLogger added in v1.1.0

func InitLogger(logFileName string) *logrus.Logger

Fungsi untuk menginisialisasi logger

func LoadEnv added in v1.0.4

func LoadEnv() map[string]string

func Views added in v1.1.2

func Views(viewName string, data fiber.Map) fiber.Handler

func ViewsWithLayout added in v1.1.3

func ViewsWithLayout(viewName string, data fiber.Map, layoutName string) fiber.Handler

Types

type DBConfig

type DBConfig struct {
	DbUser    string
	DbPass    string
	DbName    string
	DbHost    string
	DbPort    string
	DbCharset string
	DbDriver  string
}

Jump to

Keyboard shortcuts

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