base

package
v3.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2023 License: AGPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoRedirectClient *resty.Client
	RestyClient      *resty.Client
	HttpClient       *http.Client
)
View Source
var DefaultTimeout = time.Second * 30
View Source
var UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"

Functions

func HandleRange added in v3.12.0

func HandleRange(link *model.Link, file io.ReadSeekCloser, header http.Header, size int64)

func InitClient added in v3.17.0

func InitClient()

func NewHttpClient added in v3.17.0

func NewHttpClient() *http.Client

func NewRestyClient

func NewRestyClient() *resty.Client

Types

type Json

type Json map[string]interface{}

type ReqCallback

type ReqCallback func(req *resty.Request)

type TokenResp

type TokenResp struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL