mirror of
https://github.com/wisplite/tether.git
synced 2026-05-01 06:22:41 -05:00
25 lines
356 B
Go
25 lines
356 B
Go
package tether
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type AuthCtx struct {
|
|
UserID string
|
|
IsLoggedIn bool
|
|
}
|
|
|
|
type QueryCtx struct {
|
|
DB *gorm.DB
|
|
AuthCtx *AuthCtx
|
|
Params map[string]interface{}
|
|
}
|
|
|
|
type MutationCtx struct {
|
|
DB *gorm.DB
|
|
AuthCtx *AuthCtx
|
|
Params map[string]interface{}
|
|
}
|
|
|
|
type Auth interface {
|
|
GetUserID(token string) (string, error)
|
|
}
|