Documentation ¶
Index ¶
- Constants
- func ComparePasswords(hashedPassword string, plainPassword string) bool
- func ConvertDuplicatedError(err error, newErr error) error
- func ConvertRelationError(err error, newErr error) error
- func HashPassword(password string) (string, error)
- func MetricsServerProcess(ctx context.Context, port int, gracefulShutdownTimeSec int) error
- func MigrateMySQLDB(db *gorm.DB, sqlFS fs.FS) error
- func MigratePostgresDB(db *gorm.DB, sqlFS fs.FS) error
- func MigrateSQLiteDB(db *gorm.DB, sqlFS embed.FS) error
- func OpenMySQL(username, password, host string, port int, database string, ...) (*gorm.DB, error)
- func OpenPostgres(username, password, host string, port int, database string, ...) (*gorm.DB, error)
- func OpenSQLite(filePath string, logger *slog.Logger) (*gorm.DB, error)
- func SignalWatchProcess(ctx context.Context) error
- type DialectMySQL
- type DialectPostgres
- type DialectRDBMS
Constants ¶
View Source
const (
LibGatewayContextKey domain.ContextKey = "lib_gateway"
)
View Source
const MYSQL_ER_DUP_ENTRY = 1062
View Source
const MYSQL_ER_NO_REFERENCED_ROW_2 = 1452
View Source
const SQLITE_CONSTRAINT_PRIMARYKEY = 1555
View Source
const SQLITE_CONSTRAINT_UNIQUE = 2067
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
func ConvertDuplicatedError ¶
func ConvertRelationError ¶
func HashPassword ¶
func MetricsServerProcess ¶
func OpenPostgres ¶ added in v0.0.7
func SignalWatchProcess ¶
Types ¶
type DialectMySQL ¶ added in v0.0.7
type DialectMySQL struct { }
func (*DialectMySQL) BoolDefaultValue ¶ added in v0.0.7
func (d *DialectMySQL) BoolDefaultValue() string
func (*DialectMySQL) Name ¶ added in v0.0.7
func (d *DialectMySQL) Name() string
type DialectPostgres ¶ added in v0.0.7
type DialectPostgres struct { }
func (*DialectPostgres) BoolDefaultValue ¶ added in v0.0.7
func (d *DialectPostgres) BoolDefaultValue() string
func (*DialectPostgres) Name ¶ added in v0.0.7
func (d *DialectPostgres) Name() string
type DialectRDBMS ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.