database

package
v0.0.0-...-40a75d2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DBType = "mysql"

DBType ent support mysql, sqlite and PostgreSQL but this project will use MySQL

Variables

This section is empty.

Functions

func Close

func Close(ctx context.Context)

Close close all connections

func EncryptPassword

func EncryptPassword(pw string) string

EncryptPassword get hashed password

func GetClient

func GetClient() *ent.Client

GetClient return database client

func Init

func Init(ctx context.Context, c *config.Configs)

Init initialize database

func IsEqualPassword

func IsEqualPassword(encrypted, decrypted string) bool

IsEqualPassword Check if given passwords are equal

Types

This section is empty.

Jump to

Keyboard shortcuts

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