teldrive/types/main.go
2023-11-05 23:38:18 +05:30

45 lines
905 B
Go

package types
import (
"github.com/go-jose/go-jose/v3/jwt"
"github.com/gotd/td/tg"
)
type AppError struct {
Error error
Code int
}
type Part struct {
Location *tg.InputDocumentFileLocation
Start int64
End int64
}
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"`
Hash string `json:"hash"`
}
type TgSession struct {
Sesssion string `json:"session"`
UserID int64 `json:"userId"`
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"`
Hash string `json:"hash"`
Expires string `json:"expires"`
}