teldrive/types/main.go

45 lines
905 B
Go
Raw Normal View History

2023-08-07 03:32:46 +08:00
package types
2023-08-12 19:21:42 +08:00
import (
"github.com/go-jose/go-jose/v3/jwt"
"github.com/gotd/td/tg"
)
2023-08-07 03:32:46 +08:00
type AppError struct {
Error error
Code int
}
type Part struct {
Location *tg.InputDocumentFileLocation
Start int64
End int64
}
2023-08-12 19:21:42 +08:00
type JWTClaims struct {
jwt.Claims
TgSession string `json:"tgSession"`
Name string `json:"name"`
UserName string `json:"userName"`
Bot bool `json:"bot"`
IsPremium bool `json:"isPremium"`
2023-09-20 03:20:44 +08:00
Hash string `json:"hash"`
2023-08-12 19:21:42 +08:00
}
type TgSession struct {
2023-08-15 03:36:24 +08:00
Sesssion string `json:"session"`
2023-08-22 23:00:14 +08:00
UserID int64 `json:"userId"`
2023-08-12 19:21:42 +08:00
Bot bool `json:"bot"`
UserName string `json:"userName"`
Name string `json:"name"`
IsPremium bool `json:"isPremium"`
}
type Session struct {
Name string `json:"name"`
UserName string `json:"userName"`
IsPremium bool `json:"isPremium"`
2023-09-20 03:20:44 +08:00
Hash string `json:"hash"`
2023-08-12 19:21:42 +08:00
Expires string `json:"expires"`
}