-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheaders.go
32 lines (28 loc) · 830 Bytes
/
headers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Package gofileioupload contains tools to upload files to gofile.io.
package gofileioupload
// Client contains details to remember Client / folder ID.
type Client struct {
token string
folderID string
region string
}
// goFileResponse is a structure for the response from gofile.
type goFileResponse[T serverData | FileData] struct {
Status string `json:"status"`
Data T `json:"data"`
}
type serverData struct {
Servers []struct {
Name string `json:"name"`
Zone string `json:"zone"`
} `json:"servers"`
}
type FileData struct {
DownloadPage string `json:"downloadPage"`
Code string `json:"code"`
ParentFolder string `json:"parentFolder"`
GuestToken string `json:"guestToken"`
FileID string `json:"fileId"`
FileName string `json:"fileName"`
Md5 string `json:"md5"`
}