aboutsummaryrefslogtreecommitdiff
path: root/apid/const.go
diff options
context:
space:
mode:
Diffstat (limited to 'apid/const.go')
-rw-r--r--apid/const.go56
1 files changed, 56 insertions, 0 deletions
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

Snix LLC Git Repository Holder Copyright(C) 2022 All Rights Reserved Email To Snix.IR