File: service.go

package info (click to toggle)
golang-github-akamai-akamaiopen-edgegrid-golang 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,408 kB
  • sloc: sh: 532; makefile: 3
file content (34 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package configgtm

import (
	"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
	"net/http"
)

var (
	// Config contains the Akamai OPEN Edgegrid API credentials
	// for automatic signing of requests
	Config edgegrid.Config
)

// Init sets the GTM edgegrid Config
func Init(config edgegrid.Config) {

	Config = config
	edgegrid.SetupLogging()

}

// Utility func to print http req
func printHttpRequest(req *http.Request, body bool) {

	edgegrid.PrintHttpRequest(req, body)

}

// Utility func to print http response
func printHttpResponse(res *http.Response, body bool) {

	edgegrid.PrintHttpResponse(res, body)

}