httper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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 CreateConfig

func CreateConfig(data map[string]string, name, t string) error

func DeleteConfigByName

func DeleteConfigByName(name string) error

func Get

func Get(url string, head map[string]string) (response string)

发送GET请求 url:请求地址 response:请求返回的内容

func GetConfigByName

func GetConfigByName(name string) (map[string]string, error)

func Mount

func Mount(mountPoint string, fs string) error

func NewRestyClient

func NewRestyClient() *resty.Client

func OasisGet

func OasisGet(url string) (response string)

发送GET请求 url:请求地址 response:请求返回的内容

func PersonGet

func PersonGet(url string) (response string)

发送GET请求 url:请求地址 response:请求返回的内容

func Post

func Post(url string, data []byte, contentType string, head map[string]string) (content string)

发送POST请求 url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json content:请求放回的内容

func Unmount

func Unmount(mountPoint string) error

func ZTGet

func ZTGet(url string) ([]byte, error)

func ZTPost

func ZTPost(url string, body string) ([]byte, error)

func ZeroTierGet

func ZeroTierGet(url string, head map[string]string) (content string, code int)

发送POST请求 url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json content:请求放回的内容

Types

type MountList

type MountList struct {
	MountPoints []MountPoints `json:"mountPoints"`
}

func GetMountList

func GetMountList() (MountList, error)

type MountPoint

type MountPoint struct {
	MountPoint string `json:"mount_point"`
	Fs         string `json:"fs"`
	Icon       string `json:"icon"`
	Name       string `json:"name"`
}

type MountPoints

type MountPoints struct {
	MountPoint string `json:"MountPoint"`
	Fs         string `json:"Fs"`
	Icon       string `json:"Icon"`
	Name       string `json:"Name"`
}

type MountResult

type MountResult struct {
	Error string `json:"error"`
	Input struct {
		Fs         string `json:"fs"`
		MountPoint string `json:"mountPoint"`
	} `json:"input"`
	Path   string `json:"path"`
	Status int    `json:"status"`
}

type RemotesResult

type RemotesResult struct {
	Remotes []string `json:"remotes"`
}

func GetAllConfigName

func GetAllConfigName() (RemotesResult, error)

Jump to

Keyboard shortcuts

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