repository

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWebAPIToken added in v1.3.0

func CreateWebAPIToken(db *gorm.DB, id string, expiresDuration time.Duration) error

expiresDuration為Token的有效時間,無期限expiresDuration傳0

func FindOrCreateBrandErogs added in v1.5.0

func FindOrCreateBrandErogs(db *gorm.DB, brandID int, brandName string) (models.BrandErogs, error)

確保指定的BrandErogs存在,不存在就直接建立

func FindOrCreateGameErogs added in v1.5.0

func FindOrCreateGameErogs(db *gorm.DB, gameID int, gameName string, brandErogsID int) (models.GameErogs, error)

確保指定的GameErogs存在,不存在就直接建立

func FindOrCreateUser added in v1.5.0

func FindOrCreateUser(db *gorm.DB, userID string, userName string) (models.User, error)

確保指定的User存在,不存在就直接建立

func GetAllSeiyaCorrespond added in v1.5.0

func GetAllSeiyaCorrespond(db *gorm.DB) ([]models.SeiyaCorrespond, error)

撈出誠也對應資料

func GetAllZhtwToJp added in v1.5.0

func GetAllZhtwToJp(db *gorm.DB) ([]models.ZhtwToJp, error)

撈出日文漢字以及繁體中文字對應資料

func GetDiscordAllowListByKind

func GetDiscordAllowListByKind(db *gorm.DB, kind string) ([]models.DiscordAllowList, error)

查詢白名單

參數為guild(群組)跟dm(私訊)

func GetUserData added in v1.4.0

func GetUserData(db *gorm.DB, userID string) ([]models.UserGameErogs, error)

取得指定使用著遊玩資料

func GetWebAPIToken added in v1.3.0

func GetWebAPIToken(db *gorm.DB) ([]models.WebAPIToken, error)

取出所有的web api token

func UpsertUserGameErogs added in v1.5.0

func UpsertUserGameErogs(db *gorm.DB, userID string, gameErogsID int, hasPlayed bool, inWish bool, completeDate time.Time) error

建立或更新指定的UserGameErogs資料

Types

This section is empty.

Jump to

Keyboard shortcuts

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