db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewPostgresDB

func NewPostgresDB(config *Config) (*gorm.DB, error)

Types

type Config

type Config struct {
	Host     string `env:"HOST, required"`
	Port     string `env:"PORT, default=5432"`
	Username string `env:"USER, required"`
	Password string `env:"PASSWORD, required"`
	Database string `env:"DB, default=folioforge"`
}

type Profile

type Profile struct {
	ID          ulid.ULID `gorm:"primaryKey"`
	ProfileName string    `gorm:"uniqueIndex"`
	FirstName   string
	LastName    string
	Email       string
	Phone       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

Jump to

Keyboard shortcuts

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