akamai

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package akamai provides a gramework.Behind implementation developed for Gramework. This is not an official Akamai-supported implementation. If you having any issues with this package, please consider to contact Gramework support first. Akamai doesn't provide any official support nor guaranties about this package.

Akamai is a trademark of Akamai Technologies, Inc.

Copyright 2017-present Kirill Danshin and Gramework contributors Copyright 2019-present Highload LTD (UK CN: 11893420)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Index

Constants

View Source
const (
	DefaultAkamaiIPHeader = "True-Client-IP"
)

Variables

This section is empty.

Functions

func IPHeader

func IPHeader(name string) func(*Unwrapper)

func ParseCIDRBlocksCSV

func ParseCIDRBlocksCSV(csvDump []byte, usePortFilter, strict bool) (cidrBlocks []*net.IPNet, err error)

Types

type Addr

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

func (*Addr) Network

func (addr *Addr) Network() string

func (*Addr) String

func (addr *Addr) String() string

type Option

type Option func(a *Unwrapper)

func CIDRBlocks

func CIDRBlocks(blocks []*net.IPNet) Option

func DisableCache

func DisableCache() Option

DisableCache sets

type Unwrapper

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

func New

func New(opts ...Option) *Unwrapper

New creates an unwrapper, optimized for Akamai network

func (*Unwrapper) OnAppActivation

func (a *Unwrapper) OnAppActivation(app *gramework.App)

func (*Unwrapper) RemoteAddr

func (a *Unwrapper) RemoteAddr(ctx *gramework.Context) net.Addr

func (*Unwrapper) RemoteIP

func (a *Unwrapper) RemoteIP(ctx *gramework.Context) net.IP

Directories

Path Synopsis
internal
portWhitelist
Package portWhitelist provides a parser for the Akamai's CIDR blocks Port field syntax.
Package portWhitelist provides a parser for the Akamai's CIDR blocks Port field syntax.

Jump to

Keyboard shortcuts

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