MCPcopy Create free account
hub / github.com/MG-RAST/Shock / getUserInfo

Function getUserInfo

shock-client/util.go:69–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func getUserInfo() (host string, auth string) {
70 // set from env if exists
71 if os.Getenv("SHOCK_URL") != "" {
72 shock_url = os.Getenv("SHOCK_URL")
73 }
74 if token == "" {
75 token = os.Getenv("TOKEN")
76 }
77 if os.Getenv("BEARER") != "" {
78 bearer = os.Getenv("BEARER")
79 }
80 // test and return
81 if token != "" {
82 auth = bearer + " " + token
83 }
84 host = shock_url
85 return
86}
87
88func buildDownloadUrl(host string, id string) string {
89 query := url.Values{}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected