apikeymanager

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Init

func Init(config edgegrid.Config)

Init sets the edgegrid Config

Types

type Collection

type Collection struct {
	Id          int      `json:"id,omitempty"`
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	KeyCount    int      `json:"keyCount,omitempty"`
	Dirty       bool     `json:"dirty,omitempty"`
	ContractId  string   `json:"contractId,omitempty"`
	GroupId     int      `json:"groupId,omitempty"`
	GrantedACL  []string `json:"grantedACL,omitempty"`
	DirtyACL    []string `json:"dirtyACL,omitempty"`
	Quota       Quota    `json:"quota,omitempty"`
}

func CollectionAclAllow

func CollectionAclAllow(collectionId int, acl []string) (*Collection, error)

func CollectionAclDeny

func CollectionAclDeny(collectionId int, acl []string) (*Collection, error)

func CollectionSetQuota

func CollectionSetQuota(collectionId int, value int) (*Collection, error)

func CreateCollection

func CreateCollection(options *CreateCollectionOptions) (*Collection, error)

func GetCollection

func GetCollection(collectionId int) (*Collection, error)

type Collections

type Collections []Collection

func ListCollections

func ListCollections() (*Collections, error)

type CreateCollectionOptions

type CreateCollectionOptions struct {
	ContractId  string `json:"contractId,omitempty"`
	GroupId     int    `json:"groupId,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type CreateKey

type CreateKey struct {
	Value        string   `json:"value,omitempty"`
	Label        string   `json:"label,omitempty"`
	Tags         []string `json:"tags,omitempty"`
	CollectionId int      `json:"collectionId,omitempty"`
	Description  string   `json:"description,omitempty"`
	Mode         string   `json:"mode,omitempty"`
}

type ImportKey

type ImportKey struct {
	Name         string `json:"name,omitempty"`
	Content      string `json:"content,omitempty"`
	CollectionId int    `json:"collectionId,omitempty"`
}

type Key

type Key struct {
	Id                  int      `json:"id,omitempty"`
	Value               string   `json:"value,omitempty"`
	Label               string   `json:"label,omitempty"`
	Tags                []string `json:"tags,omitempty"`
	CollectionName      string   `json:"collectionName,omitempty"`
	CollectionId        int      `json:"collectionId,omitempty"`
	Description         string   `json:"description,omitempty"`
	Revoked             bool     `json:"revoked,omitempty"`
	Dirty               bool     `json:"dirty,omitempty"`
	CreatedAt           string   `json:"createdAt,omitempty"`
	RevokedAt           string   `json:"revokedAt,omitempty"`
	TerminationAt       string   `json:"terminationAt,omitempty"`
	QuotaUsage          int      `json:"quotaUsage,omitempty"`
	QuotaUsageTimestamp string   `json:"quotaUsageTimestamp,omitempty"`
	QuotaUpdateState    string   `json:"quotaUpdateState,omitempty"`
}

func CollectionAddKey

func CollectionAddKey(collectionId int, name, value string) (*Key, error)

func RevokeKey

func RevokeKey(key int) (*Key, error)

type Keys

type Keys []int

func CollectionImportKeys

func CollectionImportKeys(collectionId int, filename string) (*Keys, error)

type Quota

type Quota struct {
	Enabled  bool   `json:"enabled,omitempty"`
	Value    int    `json:"value,omitempty"`
	Interval string `json:"interval,omitempty"`
	Headers  struct {
		DenyLimitHeaderShown      bool `json:"denyLimitHeaderShown,omitempty"`
		DenyRemainingHeaderShown  bool `json:"denyRemainingHeaderShown,omitempty"`
		DenyNextHeaderShown       bool `json:"denyNextHeaderShown,omitempty"`
		AllowLimitHeaderShown     bool `json:"allowLimitHeaderShown,omitempty"`
		AllowRemainingHeaderShown bool `json:"allowRemainingHeaderShown,omitempty"`
		AllowResetHeaderShown     bool `json:"allowResetHeaderShown,omitempty"`
	} `json:"headers,omitempty"`
}

type RevokeKeys

type RevokeKeys struct {
	Keys Keys `json:"keys,omitempty"`
}

Jump to

Keyboard shortcuts

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