mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
comments for golint
This commit is contained in:
parent
ccfa6d6c3b
commit
b255c3d0fc
@ -4,26 +4,31 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//GetAccountApps TODO list apps attached to account
|
||||||
func GetAccountApps(w http.ResponseWriter, r *http.Request) {
|
func GetAccountApps(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GetAccountAsset TODO list assets hosted by account
|
||||||
func GetAccountAsset(w http.ResponseWriter, r *http.Request) {
|
func GetAccountAsset(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//RemoveAccount TODO remove app attached to account
|
||||||
func RemoveAccountApp(w http.ResponseWriter, r *http.Request) {
|
func RemoveAccountApp(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetAccountExport TODO export account
|
||||||
func SetAccountExport(w http.ResponseWriter, r *http.Request) {
|
func SetAccountExport(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetAccountNode TODO set forwarding
|
||||||
func SetAccountNode(w http.ResponseWriter, r *http.Request) {
|
func SetAccountNode(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
|
@ -11,6 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//AddAccount if available, create account with specified username and password
|
||||||
func AddAccount(w http.ResponseWriter, r *http.Request) {
|
func AddAccount(w http.ResponseWriter, r *http.Request) {
|
||||||
var token *store.AccountToken
|
var token *store.AccountToken
|
||||||
var res error
|
var res error
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//AddAccountApp with access token, attach an app to an account generating agent token
|
||||||
func AddAccountApp(w http.ResponseWriter, r *http.Request) {
|
func AddAccountApp(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, res := AccountLogin(r)
|
account, res := AccountLogin(r)
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//AddAccountAuthentication create an access token to reset account access
|
||||||
func AddAccountAuthentication(w http.ResponseWriter, r *http.Request) {
|
func AddAccountAuthentication(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, err := AccountLogin(r)
|
account, err := AccountLogin(r)
|
||||||
|
Loading…
Reference in New Issue
Block a user