db

package
v0.0.0-...-2aec8f2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB_PORT     string
	DB_HOST     string
	DB_USER     string
	DB_PASSWORD string
	DB_NAME     string
)

Functions

func CheckEngine

func CheckEngine()

func GetRefreshToken

func GetRefreshToken(userID string) (refreshToken string, err error)

func HasRefreshToken

func HasRefreshToken(userId string) (has bool)

func Insert

func Insert(userID string, refreshToken string) (err error)

func SetRefreshToken

func SetRefreshToken(userID string, refreshToken string) (err error)

func SyncTables

func SyncTables()

func Update

func Update(userID string, refreshToken string) (err error)

Types

type UserTokens

type UserTokens struct {
	UserID       string `xorm:"pk not null 'user_id'"`
	RefreshToken string `xorm:"not null    'refresh_token'"`
}

func (UserTokens) TableName

func (UserTokens) TableName() string

Jump to

Keyboard shortcuts

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