Documentation
¶
Overview ¶
Those file operate is so big that I extract them from utils.go
Index ¶
- Variables
- func DetectAndConcatFileUrl(conf *model.Conf, clipboard *model.Clipboard) string
- func DownloadFile(requiredFileName string, client *http.Client, c *model.Conf, ...)
- func ExtractErrorMsg(body []byte) (string, error)
- func GenClipboardReqBody(c string) ([]byte, *model.Clipboard, error)
- func Instant(c *model.Conf)
- func NewUClipboardHttpClient(c *model.Conf) *http.Client
- func ParsePullData(body []byte) (remoteClipboards []model.Clipboard, err error)
- func ParseUploadInfomation(body []byte) (info map[string]interface{}, err error)
- func Run(c *model.Conf)
- func SendPullReq(client *http.Client, c *model.Conf) ([]byte, error)
- func SendPushReq(s string, client *http.Client, c *model.Conf) (*model.Clipboard, error)
- func UploadFile(filePath string, client *http.Client, c *model.Conf, logger *logrus.Entry)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnexpectRespStatus = errors.New("this response status code isn't ok")
Functions ¶
func DetectAndConcatFileUrl ¶ added in v0.4.0
if this clipboard content is a binary file, return the download url
func DownloadFile ¶
func ExtractErrorMsg ¶
func GenClipboardReqBody ¶
return the marshaled request body and the raw clipboard struct
func ParsePullData ¶
func ParseUploadInfomation ¶
func SendPushReq ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.