utils

package
v0.0.0-...-a6eea34 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveCsvBoom

func RemoveCsvBoom(str string) string

Types

type QueueMsg

type QueueMsg struct {
	Topic   string `json:"topic"`
	Content []byte `json:"content"`
}

type RedisQueueDelay

type RedisQueueDelay struct {
	// contains filtered or unexported fields
}

func NewRedisQueueDelay

func NewRedisQueueDelay(client *redis.Client, interval, number uint64) *RedisQueueDelay

NewRedisQueueDelay 创建一个新的队列 client redis连接, interval 消费端间隔,单位毫秒, number 每次消费数目,结果小于等于此数字

func (*RedisQueueDelay) Consume

func (q *RedisQueueDelay) Consume(topic string, f func(msg QueueMsg) error)

func (*RedisQueueDelay) Produce

func (q *RedisQueueDelay) Produce(msg QueueMsg, t time.Time) error

type XlsFile

type XlsFile struct {
	Path     string
	FileType string
	Binary   []byte
	Charset  string `default:"utf-8"` // "utf-8"
}

func (*XlsFile) Parse

func (x *XlsFile) Parse(index int) (rows [][]string, err error)

func (*XlsFile) ParseCsv

func (x *XlsFile) ParseCsv(index int) ([][]string, error)

func (*XlsFile) ParseXls

func (x *XlsFile) ParseXls(index int) ([][]string, error)

解析xls文件

func (*XlsFile) ParseXlsx

func (x *XlsFile) ParseXlsx(index int) ([][]string, error)

Jump to

Keyboard shortcuts

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