Documentation
¶
Index ¶
- Constants
- func DecodeID(tokenStr string) (int64, error)
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst any) error
- func JWTMiddleware(noAuthRoutes []NoAuthRoute, next http.Handler) http.Handler
- func SetupHandler() http.Handler
- func SignID(id int64) (string, error)
- func UserIDFromContext(r *http.Request) (int64, error)
- type CachedFileInfo
- type Claims
- type CreatePackJobHandler
- type CreatePackRequest
- type CreatePackResponse
- type DeletePackResponse
- type DetectedStreamContext
- type EditPackJobHandler
- type EditPackRequest
- type FileStreamRequest
- type GetFileResponse
- type GetPacksResponse
- type NoAuthRoute
- type StickerEmojiUpdate
- type StickerPositionUpdate
- type StickerSetResponse
- type StreamContext
Constants ¶
View Source
const UserIDContextKey = "userID"
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONBody ¶
func JWTMiddleware ¶
func JWTMiddleware(noAuthRoutes []NoAuthRoute, next http.Handler) http.Handler
func SetupHandler ¶
Types ¶
type CachedFileInfo ¶
type CreatePackJobHandler ¶
type CreatePackJobHandler struct {
// contains filtered or unexported fields
}
func NewCreatePackJobHandler ¶
func NewCreatePackJobHandler( cfg *config.Config, req *CreatePackRequest, ) *CreatePackJobHandler
func (*CreatePackJobHandler) GetJobType ¶
func (h *CreatePackJobHandler) GetJobType() string
type CreatePackRequest ¶
type CreatePackResponse ¶
type CreatePackResponse struct {
PackURL string `json:"pack_url"`
}
type DeletePackResponse ¶
type DeletePackResponse struct {
Success bool `json:"success"`
}
type DetectedStreamContext ¶
type DetectedStreamContext struct {
Writer http.ResponseWriter
Data []byte
ContentType string
}
type EditPackJobHandler ¶
type EditPackJobHandler struct {
// contains filtered or unexported fields
}
func NewEditPackJobHandler ¶
func NewEditPackJobHandler( cfg *config.Config, req *EditPackRequest, ) *EditPackJobHandler
func (*EditPackJobHandler) GetJobType ¶
func (h *EditPackJobHandler) GetJobType() string
type EditPackRequest ¶
type EditPackRequest struct {
UserID int64 `json:"-"`
PackName string `json:"-"`
UpdatedTitle *string `json:"updated_title,omitempty"`
UpdatedIsPublic *bool `json:"updated_is_public,omitempty"`
DeletedStickers []string `json:"deleted_stickers"`
AddedStickers []emote.EmoteInput `json:"added_stickers"`
EmojiUpdates []StickerEmojiUpdate `json:"emoji_updates"`
PositionUpdates []StickerPositionUpdate `json:"position_updates"`
}
type FileStreamRequest ¶
type FileStreamRequest struct {
Writer http.ResponseWriter
FileInfo *CachedFileInfo
FileID string
}
type GetFileResponse ¶
type GetPacksResponse ¶
type GetPacksResponse struct {
Packs []telegram.PackPreview `json:"packs"`
Total int `json:"total"`
}
type NoAuthRoute ¶
type StickerEmojiUpdate ¶
type StickerPositionUpdate ¶
type StickerSetResponse ¶
type StickerSetResponse struct {
telegram.StickerSet
IsPublic bool `json:"is_public"`
}
type StreamContext ¶
type StreamContext struct {
Writer http.ResponseWriter
Data []byte
FileID string
FileURL string
}
Click to show internal directories.
Click to hide internal directories.