-
Notifications
You must be signed in to change notification settings - Fork 114
/
api.go
41 lines (32 loc) · 865 Bytes
/
api.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
33
34
35
36
37
38
39
40
41
package gofile
import (
"fmt"
"github.com/Mikubill/transfer/apis"
"github.com/Mikubill/transfer/utils"
"github.com/spf13/cobra"
)
var (
Backend = new(goFile)
)
type goFile struct {
apis.Backend
totalSize int64
userToken string
serverLink string
folderID string
folderName string
// baseBody []byte
// boundary string
// streamWriter *io.PipeWriter
// streamReader *io.PipeReader
// dataCh chan []byte
Config goFileOptions
Commands [][]string
}
func (b *goFile) SetArgs(cmd *cobra.Command) {
cmd.Flags().BoolVarP(&b.Config.singleMode, "single", "s", false, "Upload multi files in a single link")
cmd.Long = fmt.Sprintf("GoFile - https://gofile.io/\n\n" +
utils.Spacer(" Size Limit: -\n") +
utils.Spacer(" Upload Service: multi-server, Europe\n") +
utils.Spacer(" Download Service: multi-server, Europe\n"))
}