utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

func GetLogLevel

func GetLogLevel(level string) log.Level

func GetLogLevelFromEnv

func GetLogLevelFromEnv() log.Level

Returns a LogLevel type from Environment variable

func GetQueue

func GetQueue(ch *amqp.Channel, queueName string, durable bool) *amqp.Queue

GetQueue : Returns an AMQP Queue

func ListenForCtrlC

func ListenForCtrlC(service string)

ListenForCtrlC quit if Ctrl+C is pressed

func PublishBytesToQueue

func PublishBytesToQueue(ch *amqp.Channel, q *amqp.Queue, bytes []byte)

PublishBytesToQueue : Send bytes to a queue on a channel

Types

type AMQPConfig

type AMQPConfig struct {
	Uri     string // AMQP URI
	Verbose bool   // enable verbose output of message data
}

func GetAMQPConfig

func GetAMQPConfig() *AMQPConfig

type ConvertTask

type ConvertTask struct {
	MediaPath     string
	ConvertedPath string
	DataLen       int
	MediaType     string
	From          string
	PhoneNumberID string
	MessageID     string
	IsGroup       bool
	MessageSender string
	TimeOfRequest string //time.Time
}

ConvertTask

type StickerizationMetric

type StickerizationMetric struct {
	InitialMediaLength int
	FinalMediaLength   int
	MediaType          string
	IsGroupMessage     bool
	MessageSender      string
	TimeOfRequest      string
	Validated          bool
}

StickerizationMetric

Jump to

Keyboard shortcuts

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