cob

package module
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

cob

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DAudio = &Audio{}
View Source
var DNepal = &Nepal{}

Functions

This section is empty.

Types

type Audio added in v1.0.7

type Audio struct{}

func (*Audio) ConvertMggToMp3 added in v1.0.7

func (obj *Audio) ConvertMggToMp3(umPath string, ffmpegPath string, mggPath string, oggPath string, mp3Path string, maxG int)

ConvertMggToMp3 格式化文件名、解密、转换一步到位

func (*Audio) ConvertMggToOgg added in v1.0.7

func (obj *Audio) ConvertMggToOgg(umPath string, mggPath string, oggPath string)

ConvertMggToOgg 通过um将mgg格式解密为ogg格式

func (*Audio) ConvertOggToMp3 added in v1.0.7

func (obj *Audio) ConvertOggToMp3(ffmpegPath string, oggPath string, mp3Path string)

ConvertOggToMp3 通过ffmpeg将ogg转换为mp3格式

func (*Audio) ConvertOggToMp3Async added in v1.0.7

func (obj *Audio) ConvertOggToMp3Async(ffmpegPath string, oggPath string, mp3Path string, maxG int)

ConvertOggToMp3Async 通过ffmpeg将ogg转换为mp3格式,并发模式

func (*Audio) DeleteFilenameBlank added in v1.0.7

func (obj *Audio) DeleteFilenameBlank(root string)

DeleteFilenameBlank 遍历目录,删除文件名中的空格并重命名

type DingTalk added in v1.0.7

type DingTalk struct {
	Token  string // webhook中的token
	Secret string // 加签
}

DingTalk https://open.dingtalk.com/document/robots/customize-robot-security-settings

func NewDingTalk added in v1.0.7

func NewDingTalk(token string, secret string) *DingTalk

func (*DingTalk) SendMsgToDingDing added in v1.0.7

func (obj *DingTalk) SendMsgToDingDing(msg string) error

SendMsgToDingDing 钉钉机器人发送消息

type Nepal added in v1.0.7

type Nepal struct{}

func (*Nepal) GetRandomNum added in v1.0.7

func (obj *Nepal) GetRandomNum(N, M int) (result int)

GetRandomNum 获取N~M之间的随机整数,N<=M

func (*Nepal) GetRandomString added in v1.0.7

func (obj *Nepal) GetRandomString(n int) (result string)

GetRandomString 获取偶数位随机字符串

func (*Nepal) GetRootPath added in v1.0.7

func (obj *Nepal) GetRootPath() (root string)

GetRootPath 获取项目根路径,请将函数复制到自己的项目中使用,不能直接调用!

func (*Nepal) ReadFileToSlice added in v1.0.7

func (obj *Nepal) ReadFileToSlice(filepath string) (lines []string)

ReadFileToSlice 将文件中的所有非空行读入切片

func (*Nepal) StructToSlice added in v1.0.7

func (obj *Nepal) StructToSlice(slice interface{}, addFieldName bool) [][]interface{}

StructToSlice 将任意结构体切片转换为二维切片[][]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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