mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
more golint cleanup
This commit is contained in:
parent
1978417748
commit
800b0bce27
@ -47,7 +47,7 @@ func AddChannelTopic(w http.ResponseWriter, r *http.Request) {
|
|||||||
if confirm == "true" {
|
if confirm == "true" {
|
||||||
topic.Status = APPTopicConfirmed
|
topic.Status = APPTopicConfirmed
|
||||||
} else {
|
} else {
|
||||||
topic.Status = AppTopicUnconfirmed
|
topic.Status = APPTopicUnconfirmed
|
||||||
}
|
}
|
||||||
if res := tx.Save(topic).Error; res != nil {
|
if res := tx.Save(topic).Error; res != nil {
|
||||||
return res
|
return res
|
||||||
|
@ -59,7 +59,7 @@ func SetChannelTopicSubject(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if confirm == "false" {
|
if confirm == "false" {
|
||||||
if res := tx.Model(topicSlot.Topic).Update("status", AppTopicUnconfirmed).Error; res != nil {
|
if res := tx.Model(topicSlot.Topic).Update("status", APPTopicUnconfirmed).Error; res != nil {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,52 +1,96 @@
|
|||||||
package databag
|
package databag
|
||||||
|
|
||||||
|
//APPTokenSize config for size of random access token
|
||||||
const APPTokenSize = 16
|
const APPTokenSize = 16
|
||||||
|
//APPBodyLimit config for max size of api body
|
||||||
const APPBodyLimit = 1048576
|
const APPBodyLimit = 1048576
|
||||||
|
//APPVersion config for current version of api
|
||||||
const APPVersion = "0.0.1"
|
const APPVersion = "0.0.1"
|
||||||
const APPAttachExpire = 300
|
//APPCreateExpire config for valid duration of create token
|
||||||
const APPAttachSize = 4
|
|
||||||
const APPCreateExpire = 86400
|
const APPCreateExpire = 86400
|
||||||
|
//APPCreateSize config for size of create token
|
||||||
const APPCreateSize = 16
|
const APPCreateSize = 16
|
||||||
|
//APPResetExpire config for valid duration of reset token
|
||||||
const APPResetExpire = 86400
|
const APPResetExpire = 86400
|
||||||
|
//APPResetSize config for size of reset token
|
||||||
const APPResetSize = 16
|
const APPResetSize = 16
|
||||||
|
//APPConnectExpire config for valid duration of connection message
|
||||||
const APPConnectExpire = 30
|
const APPConnectExpire = 30
|
||||||
|
//APPKeySize config for default key size
|
||||||
const APPKeySize = 4096
|
const APPKeySize = 4096
|
||||||
|
//APPRSA4096 config for rsa 4096 alg name
|
||||||
const APPRSA4096 = "RSA4096"
|
const APPRSA4096 = "RSA4096"
|
||||||
|
//APPRSA2048 config for rsa 2048 alg name
|
||||||
const APPRSA2048 = "RSA2048"
|
const APPRSA2048 = "RSA2048"
|
||||||
|
//APPSignPKCS1V15 config for pkcsv15 alg name
|
||||||
const APPSignPKCS1V15 = "PKCS1v15"
|
const APPSignPKCS1V15 = "PKCS1v15"
|
||||||
|
//APPSignPSS config for pss alg name
|
||||||
const APPSignPSS = "PSS"
|
const APPSignPSS = "PSS"
|
||||||
|
//APPMsgAuthenticate config for authorize message name
|
||||||
const APPMsgAuthenticate = "authenticate"
|
const APPMsgAuthenticate = "authenticate"
|
||||||
|
//APPMsgIdentity config for identity message name
|
||||||
const APPMsgIdentity = "identity"
|
const APPMsgIdentity = "identity"
|
||||||
|
//APPMsgConnect config for connect message name
|
||||||
const APPMsgConnect = "connect"
|
const APPMsgConnect = "connect"
|
||||||
|
//APPMsgDisconnect config for disconnect message name
|
||||||
const APPMsgDisconnect = "disconnect"
|
const APPMsgDisconnect = "disconnect"
|
||||||
|
//APPCardPending config for pending status name
|
||||||
const APPCardPending = "pending"
|
const APPCardPending = "pending"
|
||||||
|
//APPCardConfirmed config for confirmed status name
|
||||||
const APPCardConfirmed = "confirmed"
|
const APPCardConfirmed = "confirmed"
|
||||||
|
//APPCardRequested config for requested status name
|
||||||
const APPCardRequested = "requested"
|
const APPCardRequested = "requested"
|
||||||
|
//APPCardConnecting config for connecting status name
|
||||||
const APPCardConnecting = "connecting"
|
const APPCardConnecting = "connecting"
|
||||||
|
//APPCardConnected config for connected status name
|
||||||
const APPCardConnected = "connected"
|
const APPCardConnected = "connected"
|
||||||
|
//APPNotifyProfile config for notification name for profile
|
||||||
const APPNotifyProfile = "profile"
|
const APPNotifyProfile = "profile"
|
||||||
|
//APPNotifyArticle config for notification name for article
|
||||||
const APPNotifyArticle = "article"
|
const APPNotifyArticle = "article"
|
||||||
|
//APPNotifyChannel config for notification name for channel
|
||||||
const APPNotifyChannel = "channel"
|
const APPNotifyChannel = "channel"
|
||||||
|
//APPNotifyView config for notification name for view
|
||||||
const APPNotifyView = "view"
|
const APPNotifyView = "view"
|
||||||
|
//APPTokenAgent config for query param name for self token
|
||||||
const APPTokenAgent = "agent"
|
const APPTokenAgent = "agent"
|
||||||
|
//APPTokenContact config for query param name for contact token
|
||||||
const APPTokenContact = "contact"
|
const APPTokenContact = "contact"
|
||||||
|
//APPTokenAttach config for query param name for attach token
|
||||||
const APPTokenAttach = "attach"
|
const APPTokenAttach = "attach"
|
||||||
|
//APPTokenCreate config for query param name for create token
|
||||||
const APPTokenCreate = "create"
|
const APPTokenCreate = "create"
|
||||||
|
//APPTokenReset config for query param name for reset token
|
||||||
const APPTokenReset = "reset"
|
const APPTokenReset = "reset"
|
||||||
|
//APPNotifyBuffer config for size of channel reciving notifications
|
||||||
const APPNotifyBuffer = 4096
|
const APPNotifyBuffer = 4096
|
||||||
const AppTopicUnconfirmed = "unconfirmed"
|
//APPTopicUnconfirmed config for status name for unconfirmed
|
||||||
|
const APPTopicUnconfirmed = "unconfirmed"
|
||||||
|
//APPTopicConfirmed config for status name for confirmed
|
||||||
const APPTopicConfirmed = "confirmed"
|
const APPTopicConfirmed = "confirmed"
|
||||||
|
//APPAssetReady config for status name for ready
|
||||||
const APPAssetReady = "ready"
|
const APPAssetReady = "ready"
|
||||||
|
//APPAssetWaiting config for status name for waiting
|
||||||
const APPAssetWaiting = "waiting"
|
const APPAssetWaiting = "waiting"
|
||||||
|
//APPAssetProcessing config for status name for processing
|
||||||
const APPAssetProcessing = "processing"
|
const APPAssetProcessing = "processing"
|
||||||
|
//APPAssetError config for status name for error
|
||||||
const APPAssetError = "error"
|
const APPAssetError = "error"
|
||||||
|
//APPTransformComplete config for status name for completed processing
|
||||||
const APPTransformComplete = "complete"
|
const APPTransformComplete = "complete"
|
||||||
|
//APPTransformIncomplete config for status name for not complete processing
|
||||||
const APPTransformIncomplete = "incomplete"
|
const APPTransformIncomplete = "incomplete"
|
||||||
|
//APPTransformError config for status name for processing error
|
||||||
const APPTransformError = "error"
|
const APPTransformError = "error"
|
||||||
|
//APPQueueAudio config for queue name for audio assets
|
||||||
const APPQueueAudio = "audio"
|
const APPQueueAudio = "audio"
|
||||||
|
//APPQueueVideo config for queue name for video assets
|
||||||
const APPQueueVideo = "video"
|
const APPQueueVideo = "video"
|
||||||
|
//APPQueuePhoto config for queue name for photo assets
|
||||||
const APPQueuePhoto = "photo"
|
const APPQueuePhoto = "photo"
|
||||||
|
//APPQueueDefault config for queue name for other assets
|
||||||
const APPQueueDefault = ""
|
const APPQueueDefault = ""
|
||||||
|
//APPDefaultPath config for default path to store assets
|
||||||
const APPDefaultPath = "./asset"
|
const APPDefaultPath = "./asset"
|
||||||
|
|
||||||
func AppCardStatus(status string) bool {
|
func AppCardStatus(status string) bool {
|
||||||
@ -72,7 +116,7 @@ func AppTopicStatus(status string) bool {
|
|||||||
if status == APPTopicConfirmed {
|
if status == APPTopicConfirmed {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if status == AppTopicUnconfirmed {
|
if status == APPTopicUnconfirmed {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user