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
|
|
|
|
const APP_CREATEEXPIRE = 86400
|
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"
|
|
|
|
const APP_NOTIFYCONTENT = "content"
|
2022-02-03 08:30:43 +00:00
|
|
|
const APP_NOTIFYLABEL = "label"
|
2022-01-28 21:39:31 +00:00
|
|
|
const APP_NOTIFYVIEW = "view"
|
2022-01-23 05:47:39 +00:00
|
|
|
const APP_TOKENAPP = "app"
|
|
|
|
const APP_TOKENCONTACT = "contact"
|
2022-01-25 05:22:33 +00:00
|
|
|
const APP_NOTIFYBUFFER = 4096
|
2022-01-28 07:01:17 +00:00
|
|
|
const APP_ARTICLEUNCONFIRMED = "unconfirmed"
|
|
|
|
const APP_ARTICLECONFIRMED = "confirmed"
|
|
|
|
const APP_ARTICLEINCOMPLETE = "incomplete"
|
|
|
|
const APP_ARTICLEERROR = "error"
|
2022-01-28 21:39:31 +00:00
|
|
|
const APP_ARTICLEBLOCKSIZE = 128
|
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
|
|
|
|
}
|