utils

package
v0.0.0-...-ad531c1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

@Author: Ciusyan 2023/2/6

@Author: Ciusyan 2023/2/8

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(ctx *gin.Context) string

GetToken 从gin的Ctx种获取Token

func MakeBearer

func MakeBearer(length int) string

MakeBearer 生成Base64的字符串

func UploadFile

func UploadFile(ctx context.Context, file *multipart.FileHeader, ch chan *UploadMsg)

Types

type UploadMsg

type UploadMsg struct {
	// 传递错误
	Err error
	// 传递上传的结果
	UploadResult *store.UploadResult
	// contains filtered or unexported fields
}

UploadMsg 用于传递信息·

func (*UploadMsg) Delete

func (m *UploadMsg) Delete()

Delete 删除上传成功的视频和封面,只有当文件上传成功、但是入库失败时才会调用

Jump to

Keyboard shortcuts

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