edgegrid

package module
v0.0.0-...-9015c8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

Go Akamai-open/edgegrid client

GoDoc

Installation

go get github.com/chonthu/go-edgegrid

Usage

package main

import (
    "log"

    "github.com/chonthu/go-edgegrid"
)

func main() {
    api := edgegrid.NewFromIni(".edgerc")
    resp, err := api.Send("POST", "/ccu/v3/invalidate/url/production", "{ \"objects\" : [ \"http://example.com\" ]}")
    if err != nil {
        log.Println(err)
    }

    log.Panicln(resp)
}

Author

Nithin Meppurathu - Twitter: @meppurathu

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compute256

func Compute256(message string) string

Compute256 encrypts message with hmac sha 256

func ComputeHmac256

func ComputeHmac256(message string, secret string) string

ComputeHmac256 encrypts message with hmac sha 256

Types

type EdgeGrid

type EdgeGrid struct {
	// contains filtered or unexported fields
}

EdgeGrid Api interface to Akamai

func New

func New(host, clientToken, clientSecret, accessToken, maxBody string) *EdgeGrid

New returns a new instance of Edgecast

func NewFromIni

func NewFromIni(iniFile string) *EdgeGrid

NewFromIni returns a new instance of Edgecast

func (*EdgeGrid) Send

func (e *EdgeGrid) Send(method, path, body string) (*http.Response, error)

Send a api request to Akamai

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL