sa

package
v0.0.0-...-70f80fa Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisTimeout    = 5 * time.Second
	ListenerTimeout = 11 * time.Second // used to avoid timeout on listener - for-select timeout
)

Variables

View Source
var LogLevel = loadEnv("LOG_LEVEL", "debug")
View Source
var (
	Rdb *redis.Client
)
View Source
var RdbHostPort = loadEnv("RDB_HOST_PORT", "localhost:6379")

Functions

func Init

func Init()

func SetLogLevel

func SetLogLevel(level string) log.Level

Types

type ProductEvent

type ProductEvent struct {
	Operation string `json:"operation"`

	Old struct {
		Active    bool   `json:"active"`
		ProductID int    `json:"product_id"`
		Name      string `json:"name"`
		Quantity  int    `json:"quantity,omitempty"`
		Price     int    `json:"price"`
	} `json:"old"`
	New struct {
		Active    bool   `json:"active"`
		ProductID int    `json:"product_id"`
		Name      string `json:"name"`
		Quantity  int    `json:"quantity,omitempty"`
		Price     int    `json:"price"`
	} `json:"new"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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