From 4039849464722c1ddadcacd136ae7e2f59835d63 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 13 Jan 2022 13:47:30 +0000 Subject: snix mirror --- apid/const.go | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 apid/const.go (limited to 'apid/const.go') diff --git a/apid/const.go b/apid/const.go new file mode 100644 index 0000000..728be5a --- /dev/null +++ b/apid/const.go @@ -0,0 +1,56 @@ +// Copyright 2021 SNIX LLC sina@snix.ir +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +package apid + +import ( + _ "embed" + "time" +) + +const ( + writeTime = 20 * time.Second + readxTime +) + +const ( + dbMiddleCTX = 15 * time.Second +) + +const ( + errIdIsZero = "err: RegID cannot be equal or less than zero" + errRgISZero = "err: Regex cannot be nothing or empty string" +) + +const ( + maxHXSize = 1 << 14 + MaxBDSise = 8 << 15 +) + +const ( + startAPID = "starting api service at:" + dbugNewRq = "http req:" + ctxIsDone = "ctx Done() request cancelled by user" +) + +const ( + urlListAll = "/api/all/" + addNewREGX = "/api/add/" + deleteREGX = "/api/del/" + rootShoPDF = "/" +) + +const ( + jsonDefault = "" + jsonNEWPRTX = "\x09" +) + +//go:embed api.pdf +var embedPDF []byte -- cgit v1.2.3