cloudHelper

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapturePicture

func CapturePicture(accessToken, deviceSerial, validateCode string) (string, error)

CapturePicture 调用截图接口的方法

func FetchToQiNiu

func FetchToQiNiu(resURL, imageBucket, accessKey, secretKey, domain string,
) (string, error)

FetchToQiNiu 上传视频截图到七牛云

func GetQvsManager

func GetQvsManager(accessKey, secretKey string) *qvs.Manager

GetQvsManager 开启流

func GetYsAccessToken

func GetYsAccessToken(appKey, appSecret string) (string, error)

GetYsAccessToken 获取 AccessToken 的方法

Types

type CaptureResponse

type CaptureResponse struct {
	Meta struct {
		Code     int     `json:"code"`
		Message  string  `json:"message"`
		MoreInfo *string `json:"moreInfo"`
	} `json:"meta"`
	Data string `json:"data"` // 返回的图片 ID 或相关数据
}

type TokenResponse

type TokenResponse struct {
	Code string `json:"code"` // 状态码
	Msg  string `json:"msg"`  // 消息
	Data struct {
		AccessToken string `json:"accessToken"` // 获取的 AccessToken
		ExpireTime  int64  `json:"expireTime"`  // 令牌过期时间
	} `json:"data"`
}

TokenResponse 定义获取 AccessToken 的返回结构

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳