sync

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

README

BILLZ SYNC

BILLZ Sync is a small utility that helps to work with local services

Documentation

Index

Constants

View Source
const (
	DateTimeFormat = "2006-01-02 15:04:05"
	DateFormat     = "2006-01-02"

	OfflineFileName = "offline.txt"
	GmtOffset       = 5
	OfflineMaxHours = 24

	HTTPTimeoutInSeconds = 30

	ParameterCannotBeEmpty = "parameter <<%s>> cannot be empty error"

	ContentTypeBinary = "application/octet-stream"
	ContentTypeForm   = "application/x-www-form-urlencoded"
	ContentTypeJSON   = "application/json"
	ContentTypeHTML   = "text/html; charset=utf-8"
	ContentTypeText   = "text/plain; charset=utf-8"
)
View Source
const (
	DefaultTimeZone = "Asia/Tashkent"
)

Variables

View Source
var (
	ValidationErrors = map[string]map[string]string{
		"NO_ITEMS":                {"en": "", "uz": "", "ru": "В чеке нет товаров"},
		"VAT_SUM_INCORRECT":       {"en": "", "uz": "", "ru": "Не корректная общая сумма НДС"},
		"VAT_ITEM_SUM_INCORRECT":  {"en": "", "uz": "", "ru": "Не корректная сумма НДС для товара "},
		"TOTAL_SUM_INCORRECT":     {"en": "", "uz": "", "ru": "Цена товаров и сумма оплат не совпадают"},
		"INCOMLETE_ITEM_DATA":     {"en": "", "uz": "", "ru": "Переданы не все поля в товаре "},
		"NO_INTERNET":             {"en": "", "uz": "", "ru": "Проверьте интернет соединение"},
		"INCORRECT_TIMEZONE":      {"en": "", "uz": "", "ru": "Не корректное время на компьютере"},
		"TOO_LONG_OFFLINE_PERIOD": {"en": "", "uz": "", "ru": "Восстановите подключение к интернету, вы оффлайн более 24 часов"},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment       string // develop, staging, production
	ServiceName       string
	OrderServiceUrl   string
	FinanceServiceUrl string
	PaymeServiceUrl   string

	LogLevel string

	HttpPort string

	OfdUrl string
}

Config ...

func Load

func Load() Config

Load loads environment vars and inflates Config

Jump to

Keyboard shortcuts

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