From b02e7b3382e56e2b472d84c657f9c3fd0468cafe Mon Sep 17 00:00:00 2001 From: Vladislav Polyakov Date: Mon, 4 Apr 2022 09:24:38 +0300 Subject: [PATCH] refactor: move document into specific folder --- bot/api/document.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bot/api/document.go diff --git a/bot/api/document.go b/bot/api/document.go new file mode 100644 index 0000000..f59bbe2 --- /dev/null +++ b/bot/api/document.go @@ -0,0 +1,34 @@ +// Bot API 5.7 + +package api + +// Document is a general file (as opposed to photos, voice messages and audio files). +type Document struct { + // FileID is an identifier for this file, which can be used to download or reuse the file. + FileID string `json:"file_id"` + + // FileUniqueID is a unique identifier for this file, + // which is supposed to be the same over time and for different bots. + // Can't be used to download or reuse the file. + FileUniqueID string `json:"file_unique_id"` + + // Thumb is a document thumbnail as defined by sender. + // + // Optional. + Thumb *PhotoSize `json:"thumb,omitempty"` + + // FileName is an original filename as defined by sender. + // + // Optional. + FileName string `json:"file_name,omitempty"` + + // MimeType is MIME type of the file as defined by sender. + // + // Optional. + MimeType string `json:"mime_type,omitempty"` + + // FileSize in bytes. + // + // Optional. + FileSize int `json:"file_size,omitempty"` +}