2022-01-17 05:55:25 +00:00
|
|
|
package databag
|
|
|
|
|
2022-01-22 19:40:20 +00:00
|
|
|
const APP_TOKENSIZE = 16
|
2022-01-17 05:55:25 +00:00
|
|
|
const APP_BODYLIMIT = 1048576
|
|
|
|
const APP_VERSION = "0.0.1"
|
2022-01-18 05:48:42 +00:00
|
|
|
const APP_ATTACHEXPIRE = 300
|
2022-03-08 21:31:04 +00:00
|
|
|
const APP_ATTACHSIZE = 4
|
2022-01-18 05:48:42 +00:00
|
|
|
const APP_CREATEEXPIRE = 86400
|
2022-03-08 21:31:04 +00:00
|
|
|
const APP_CREATESIZE = 16
|
2022-03-08 18:18:31 +00:00
|
|
|
const APP_RESETEXPIRE = 86400
|
2022-03-08 21:31:04 +00:00
|
|
|
const APP_RESETSIZE = 16
|
2022-01-21 07:41:08 +00:00
|
|
|
const APP_CONNECTEXPIRE = 30
|
2022-01-19 23:03:06 +00:00
|
|
|
const APP_KEYSIZE = 4096
|
|
|
|
const APP_RSA4096 = "RSA4096"
|
|
|
|
const APP_RSA2048 = "RSA2048"
|
2022-01-20 07:45:53 +00:00
|
|
|
const APP_SIGNPKCS1V15 = "PKCS1v15"
|
|
|
|
const APP_SIGNPSS = "PSS"
|
|
|
|
const APP_MSGAUTHENTICATE = "authenticate"
|
|
|
|
const APP_MSGIDENTITY = "identity"
|
|
|
|
const APP_MSGCONNECT = "connect"
|
|
|
|
const APP_MSGDISCONNECT = "disconnect"
|
2022-01-20 23:19:26 +00:00
|
|
|
const APP_CARDPENDING = "pending"
|
|
|
|
const APP_CARDCONFIRMED = "confirmed"
|
|
|
|
const APP_CARDREQUESTED = "requested"
|
|
|
|
const APP_CARDCONNECTING = "connecting"
|
|
|
|
const APP_CARDCONNECTED = "connected"
|
2022-01-28 21:39:31 +00:00
|
|
|
const APP_NOTIFYPROFILE = "profile"
|
2022-02-08 20:24:42 +00:00
|
|
|
const APP_NOTIFYARTICLE = "article"
|
|
|
|
const APP_NOTIFYCHANNEL = "channel"
|
2022-01-28 21:39:31 +00:00
|
|
|
const APP_NOTIFYVIEW = "view"
|
2022-03-20 21:09:40 +00:00
|
|
|
const APP_TOKENAGENT = "agent"
|
2022-01-23 05:47:39 +00:00
|
|
|
const APP_TOKENCONTACT = "contact"
|
2022-03-08 21:31:04 +00:00
|
|
|
const APP_TOKENATTACH = "attach"
|
|
|
|
const APP_TOKENCREATE = "create"
|
|
|
|
const APP_TOKENRESET = "reset"
|
2022-01-25 05:22:33 +00:00
|
|
|
const APP_NOTIFYBUFFER = 4096
|
2022-02-14 05:36:29 +00:00
|
|
|
const APP_TOPICUNCONFIRMED = "unconfirmed"
|
|
|
|
const APP_TOPICCONFIRMED = "confirmed"
|
2022-02-28 22:59:29 +00:00
|
|
|
const APP_ASSETREADY = "ready"
|
|
|
|
const APP_ASSETWAITING = "waiting"
|
|
|
|
const APP_ASSETPROCESSING = "processing"
|
|
|
|
const APP_ASSETERROR = "error"
|
2022-03-01 08:28:36 +00:00
|
|
|
const APP_TRANSFORMCOMPLETE = "complete"
|
|
|
|
const APP_TRANSFORMINCOMPLETE = "incomplete"
|
2022-03-01 18:35:14 +00:00
|
|
|
const APP_TRANSFORMERROR = "error"
|
2022-03-01 19:20:51 +00:00
|
|
|
const APP_QUEUEAUDIO = "audio"
|
|
|
|
const APP_QUEUEVIDEO = "video"
|
|
|
|
const APP_QUEUEPHOTO = "photo"
|
|
|
|
const APP_QUEUEDEFAULT = ""
|
2022-03-11 07:57:27 +00:00
|
|
|
const APP_DEFAULTPATH = "./asset"
|
2022-01-20 23:19:26 +00:00
|
|
|
|
2022-01-21 00:26:59 +00:00
|
|
|
func AppCardStatus(status string) bool {
|
|
|
|
if status == APP_CARDPENDING {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
if status == APP_CARDCONFIRMED {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
if status == APP_CARDREQUESTED {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
if status == APP_CARDCONNECTING {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
if status == APP_CARDCONNECTED {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
2022-02-19 06:33:13 +00:00
|
|
|
|
|
|
|
func AppTopicStatus(status string) bool {
|
|
|
|
if(status == APP_TOPICCONFIRMED) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
if(status == APP_TOPICUNCONFIRMED) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|