github.com/akamai/AkamaiOPEN-edgegrid-golang@v1.2.2/reportsgtm-v1/service.go (about) 1 package reportsgtm 2 3 import ( 4 "net/http" 5 6 "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" 7 ) 8 9 var ( 10 // Config contains the Akamai OPEN Edgegrid API credentials 11 // for automatic signing of requests 12 Config edgegrid.Config 13 ) 14 15 // Init sets the GTM edgegrid Config 16 func Init(config edgegrid.Config) { 17 18 Config = config 19 edgegrid.SetupLogging() 20 21 } 22 23 // Utility func to print http req 24 func printHttpRequest(req *http.Request, body bool) { 25 26 edgegrid.PrintHttpRequest(req, body) 27 28 } 29 30 // Utility func to print http response 31 func printHttpResponse(res *http.Response, body bool) { 32 33 edgegrid.PrintHttpResponse(res, body) 34 35 }