ec-sdk-go

module
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0

README

Go SDK for EdgeCast CDN

This is the official Go SDK for EdgeCast. It contains services that interact with the EdgeCast APIs.

Dependencies

  • Go 1.16

Installing

$GOPATH

To install the SDK into your $GOPATH:

go get -u github.com/EdgeCast/ec-sdk-go
Go Modules
go get github.com/EdgeCast/ec-sdk-go

Using the SDK

Simply import the SDK and provide the API credentials provided to you. They may be an API Token or OAuth 2.0 Credentials. Examples are listed below for each feature.

Web Application Firewall (WAF)

Our WAF service provides a layer of security between many security threats and your external web infrastructure. WAF increases security by monitoring, detecting, and preventing application layer attacks. It inspects inbound HTTP/HTTPS traffic against reactive and proactive security policies and blocks malicious activity in-band and on a real-time basis.

For more information, please read the official documentation.

To use the WAF service, use the API Token provided to you.

Access Rules

An access rule identifies legitimate traffic and threats by ASN, Cookie, Country, IP Address, Referrer, URL, User agent, HTTP method, Media type, File extension, and Request headers.

import (
	"github.com/EdgeCast/ec-sdk-go/edgecast"
	"github.com/EdgeCast/ec-sdk-go/edgecast/waf"
)
// ...
	wafConfig := waf.NewConfig("MY API TOKEN")
	wafService, err := waf.New(wafConfig)
	rule := waf.AccessRule{
		// ... 
	}
	resp, err := wafService.AddAccessRule(rule)
// ...
}

Resources

CDN Reference Documentation - This is a useful resource for learning about EdgeCast CDN. It is a good starting point before using this SDK.

API Documentation - For developers that want to interact directly with the EdgeCast CDN API, refer to this documentation. It contains all of the available operations as well as their inputs and outputs.

Examples - Examples to get started can be found here.

Submit an Issue - Found a bug? Want to request a feature? Please do so here.

Directories

Path Synopsis
Package edgecast provides APIs for interacting with the EdgeCast CDN.
Package edgecast provides APIs for interacting with the EdgeCast CDN.
client
Package client provides a base client implementation for interacting with EdgeCast CDN APIs.
Package client provides a base client implementation for interacting with EdgeCast CDN APIs.
internal/collections
Package collection provides helper methods for working with aggregate/collection types
Package collection provides helper methods for working with aggregate/collection types
internal/jsonutil
Package jsonutil provides helper methods for working with JSON
Package jsonutil provides helper methods for working with JSON
internal/urlutil
Package urlutil provides helper methods for working with URLs
Package urlutil provides helper methods for working with URLs
waf
Package waf provides an API for managing Web Application Firewall for the EdgeCast CDN.
Package waf provides an API for managing Web Application Firewall for the EdgeCast CDN.
example
customer command
edgecname command
waf/rate_rules command

Jump to

Keyboard shortcuts

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