Documentation ¶
Overview ¶
Package edgeworkers provides access to the Akamai EdgeWorkers and EdgeKV APIs
Index ¶
- Constants
- Variables
- func IsJSON(str Item) bool
- type ActivateVersion
- type ActivateVersionRequest
- type Activation
- type ActivationNetwork
- type Activations
- type Additional
- type Bundle
- type CancelActivationRequest
- type ClientFunc
- type CloneEdgeWorkerIDRequest
- type Contracts
- type CreateEdgeKVAccessTokenRequest
- type CreateEdgeKVAccessTokenResponse
- type CreateEdgeKVNamespaceRequest
- type CreateEdgeWorkerIDRequest
- type CreateEdgeWorkerVersionRequest
- type CreateSecureTokenRequest
- type CreateSecureTokenResponse
- type Data
- type DataSummary
- type DeactivateVersion
- type DeactivateVersionRequest
- type Deactivation
- type Deactivations
- type DeleteEdgeKVAccessTokenRequest
- type DeleteEdgeKVAccessTokenResponse
- type DeleteEdgeWorkerIDRequest
- type DeleteEdgeWorkerVersionRequest
- type DeleteItemRequest
- type EdgeKVAccessToken
- type EdgeKVAccessTokens
- type EdgeKVInitializationStatus
- type EdgeKVInitialize
- type EdgeKVItems
- type EdgeKVNamespaces
- type EdgeWorkerID
- type EdgeWorkerIDBodyRequest
- type EdgeWorkerIDs
- type EdgeWorkerLimit
- type EdgeWorkerVersion
- type EdgeWorkerVersionRequest
- type EdgeWorkerVersions
- type Edgeworkers
- type Error
- type GetActivationRequest
- type GetDeactivationRequest
- type GetEdgeKVAccessTokenRequest
- type GetEdgeKVAccessTokenResponse
- type GetEdgeKVNamespaceRequest
- type GetEdgeWorkerIDRequest
- type GetEdgeWorkerVersionContentRequest
- type GetEdgeWorkerVersionRequest
- type GetItemRequest
- type GetPermissionGroupRequest
- type GetReportRequest
- type GetReportResponse
- type GetResourceTierRequest
- type GetSummaryReportRequest
- type GetSummaryReportResponse
- type Groups
- type Init
- type InitObject
- type Item
- type ItemNetwork
- type ItemsRequestParams
- type ListActivationsRequest
- type ListActivationsResponse
- type ListContractsResponse
- type ListDeactivationsRequest
- type ListDeactivationsResponse
- type ListEdgeKVAccessTokensRequest
- type ListEdgeKVAccessTokensResponse
- type ListEdgeKVNamespacesRequest
- type ListEdgeKVNamespacesResponse
- type ListEdgeWorkerVersionsRequest
- type ListEdgeWorkerVersionsResponse
- type ListEdgeWorkersIDRequest
- type ListEdgeWorkersIDResponse
- type ListGroupsWithinNamespaceRequest
- type ListItemsRequest
- type ListItemsResponse
- type ListPermissionGroupsResponse
- type ListPropertiesRequest
- type ListPropertiesResponse
- type ListReportsResponse
- type ListResourceTiersRequest
- type ListResourceTiersResponse
- type Mock
- func (m *Mock) ActivateVersion(ctx context.Context, req ActivateVersionRequest) (*Activation, error)
- func (m *Mock) CancelPendingActivation(ctx context.Context, req CancelActivationRequest) (*Activation, error)
- func (m *Mock) CloneEdgeWorkerID(ctx context.Context, req CloneEdgeWorkerIDRequest) (*EdgeWorkerID, error)
- func (m *Mock) CreateEdgeKVAccessToken(ctx context.Context, req CreateEdgeKVAccessTokenRequest) (*CreateEdgeKVAccessTokenResponse, error)
- func (m *Mock) CreateEdgeKVNamespace(ctx context.Context, req CreateEdgeKVNamespaceRequest) (*Namespace, error)
- func (m *Mock) CreateEdgeWorkerID(ctx context.Context, req CreateEdgeWorkerIDRequest) (*EdgeWorkerID, error)
- func (m *Mock) CreateEdgeWorkerVersion(ctx context.Context, req CreateEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error)
- func (m *Mock) CreateSecureToken(ctx context.Context, req CreateSecureTokenRequest) (*CreateSecureTokenResponse, error)
- func (m *Mock) DeactivateVersion(ctx context.Context, req DeactivateVersionRequest) (*Deactivation, error)
- func (m *Mock) DeleteEdgeKVAccessToken(ctx context.Context, req DeleteEdgeKVAccessTokenRequest) (*DeleteEdgeKVAccessTokenResponse, error)
- func (m *Mock) DeleteEdgeWorkerID(ctx context.Context, req DeleteEdgeWorkerIDRequest) error
- func (m *Mock) DeleteEdgeWorkerVersion(ctx context.Context, req DeleteEdgeWorkerVersionRequest) error
- func (m *Mock) DeleteItem(ctx context.Context, req DeleteItemRequest) (*string, error)
- func (m *Mock) GetActivation(ctx context.Context, req GetActivationRequest) (*Activation, error)
- func (m *Mock) GetDeactivation(ctx context.Context, req GetDeactivationRequest) (*Deactivation, error)
- func (m *Mock) GetEdgeKVAccessToken(ctx context.Context, req GetEdgeKVAccessTokenRequest) (*GetEdgeKVAccessTokenResponse, error)
- func (m *Mock) GetEdgeKVInitializationStatus(ctx context.Context) (*EdgeKVInitializationStatus, error)
- func (m *Mock) GetEdgeKVNamespace(ctx context.Context, req GetEdgeKVNamespaceRequest) (*Namespace, error)
- func (m *Mock) GetEdgeWorkerID(ctx context.Context, req GetEdgeWorkerIDRequest) (*EdgeWorkerID, error)
- func (m *Mock) GetEdgeWorkerVersion(ctx context.Context, req GetEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error)
- func (m *Mock) GetEdgeWorkerVersionContent(ctx context.Context, req GetEdgeWorkerVersionContentRequest) (*Bundle, error)
- func (m *Mock) GetItem(ctx context.Context, req GetItemRequest) (*Item, error)
- func (m *Mock) GetPermissionGroup(ctx context.Context, req GetPermissionGroupRequest) (*PermissionGroup, error)
- func (m *Mock) GetReport(ctx context.Context, req GetReportRequest) (*GetReportResponse, error)
- func (m *Mock) GetResourceTier(ctx context.Context, req GetResourceTierRequest) (*ResourceTier, error)
- func (m *Mock) GetSummaryReport(ctx context.Context, req GetSummaryReportRequest) (*GetSummaryReportResponse, error)
- func (m *Mock) InitializeEdgeKV(ctx context.Context) (*EdgeKVInitializationStatus, error)
- func (m *Mock) ListActivations(ctx context.Context, req ListActivationsRequest) (*ListActivationsResponse, error)
- func (m *Mock) ListContracts(ctx context.Context) (*ListContractsResponse, error)
- func (m *Mock) ListDeactivations(ctx context.Context, req ListDeactivationsRequest) (*ListDeactivationsResponse, error)
- func (m *Mock) ListEdgeKVAccessTokens(ctx context.Context, req ListEdgeKVAccessTokensRequest) (*ListEdgeKVAccessTokensResponse, error)
- func (m *Mock) ListEdgeKVNamespaces(ctx context.Context, req ListEdgeKVNamespacesRequest) (*ListEdgeKVNamespacesResponse, error)
- func (m *Mock) ListEdgeWorkerVersions(ctx context.Context, req ListEdgeWorkerVersionsRequest) (*ListEdgeWorkerVersionsResponse, error)
- func (m *Mock) ListEdgeWorkersID(ctx context.Context, req ListEdgeWorkersIDRequest) (*ListEdgeWorkersIDResponse, error)
- func (m *Mock) ListGroupsWithinNamespace(ctx context.Context, req ListGroupsWithinNamespaceRequest) ([]string, error)
- func (m *Mock) ListItems(ctx context.Context, req ListItemsRequest) (*ListItemsResponse, error)
- func (m *Mock) ListPermissionGroups(ctx context.Context) (*ListPermissionGroupsResponse, error)
- func (m *Mock) ListProperties(ctx context.Context, req ListPropertiesRequest) (*ListPropertiesResponse, error)
- func (m *Mock) ListReports(ctx context.Context) (*ListReportsResponse, error)
- func (m *Mock) ListResourceTiers(ctx context.Context, req ListResourceTiersRequest) (*ListResourceTiersResponse, error)
- func (m *Mock) UpdateEdgeKVNamespace(ctx context.Context, req UpdateEdgeKVNamespaceRequest) (*Namespace, error)
- func (m *Mock) UpdateEdgeWorkerID(ctx context.Context, req UpdateEdgeWorkerIDRequest) (*EdgeWorkerID, error)
- func (m *Mock) UpsertItem(ctx context.Context, req UpsertItemRequest) (*string, error)
- func (m *Mock) ValidateBundle(ctx context.Context, req ValidateBundleRequest) (*ValidateBundleResponse, error)
- type Namespace
- type NamespaceNetwork
- type NamespacePermissions
- type OnClientRequest
- type OnClientResponse
- type OnOriginRequest
- type OnOriginResponse
- type OnRequestAndResponse
- type Option
- type Permission
- type PermissionGroup
- type PermissionGroups
- type Permissions
- type Properties
- type Property
- type ReportData
- type ReportResponse
- type Reports
- type ResourceTier
- type ResourceTiers
- type ResponseProvider
- type SecureTokens
- type Summary
- type Total
- type UpdateEdgeKVNamespaceRequest
- type UpdateEdgeWorkerIDRequest
- type UpdateNamespace
- type UpsertItemRequest
- type ValidateBundleRequest
- type ValidateBundleResponse
- type ValidationIssue
- type Validations
Constants ¶
const ( StatusSuccess = "success" StatusGenericError = "genericError" StatusUnknownEdgeWorkerID = "unknownEdgeWorkerId" StatusUnimplementedEventHandler = "unimplementedEventHandler" StatusRuntimeError = "runtimeError" StatusExecutionError = "executionError" StatusTimeoutError = "timeoutError" StatusResourceLimitHit = "resourceLimitHit" StatusCPUTimeoutError = "cpuTimeoutError" StatusWallTimeoutError = "wallTimeoutError" StatusInitCPUTimeoutError = "initCpuTimeoutError" StatusInitWallTimeoutError = "initWallTimeoutError" )
These constants represent all the valid report statuses
const ( EventHandlerOnClientRequest = "onClientRequest" EventHandlerOnOriginRequest = "onOriginRequest" EventHandlerOnOriginResponse = "onOriginResponse" EventHandlerOnClientResponse = "onClientResponse" EventHandlerResponseProvider = "responseProvider" )
These constants represent all the valid report event handlers
Variables ¶
var ( // ErrListActivations is returned when ListActivations fails ErrListActivations = errors.New("list activations") // ErrGetActivation is returned when GetActivation fails ErrGetActivation = errors.New("get activation") // ErrActivateVersion is returned when ActivateVersion fails ErrActivateVersion = errors.New("activate version") // ErrCancelActivation is returned when CancelPendingActivation fails ErrCancelActivation = errors.New("cancel activation") )
var ( // ErrListDeactivations is returned when ListDeactivations fails ErrListDeactivations = errors.New("list deactivations") // ErrDeactivateVersion is returned when DeactivateVersion fails ErrDeactivateVersion = errors.New("deactivate version") // ErrGetDeactivation is returned when GetDeactivation fails ErrGetDeactivation = errors.New("get deactivation") )
var ( // ErrCreateEdgeKVAccessToken is returned in case an error occurs on CreateEdgeKVAccessToken operation ErrCreateEdgeKVAccessToken = errors.New("create an EdgeKV access token") // ErrGetEdgeKVAccessToken is returned in case an error occurs on GetEdgeKVAccessToken operation ErrGetEdgeKVAccessToken = errors.New("get an EdgeKV access token") // ErrListEdgeKVAccessToken is returned in case an error occurs on ListEdgeKVAccessToken operation ErrListEdgeKVAccessToken = errors.New("list EdgeKV access tokens") // ErrDeleteEdgeKVAccessToken is returned in case an error occurs on DeleteEdgeKVAccessToken operation ErrDeleteEdgeKVAccessToken = errors.New("delete an EdgeKV access token") )
var ( // ErrInitializeEdgeKV is returned in case an error occurs on InitializeEdgeKV operation ErrInitializeEdgeKV = errors.New("initialize EdgeKV") // ErrGetEdgeKVInitialize is returned in case an error occurs on GetEdgeKVInitializeStatus operation ErrGetEdgeKVInitialize = errors.New("get EdgeKV initialization status") )
var ( // ErrListItems is returned in case an error occurs on ListItems operation ErrListItems = errors.New("list items") // ErrGetItem is returned in case an error occurs on GetItem operation ErrGetItem = errors.New("get item") // ErrUpsertItem is returned in case an error occurs on UpsertItem operation ErrUpsertItem = errors.New("create or update item") // ErrDeleteItem is returned in case an error occurs on DeleteItem operation ErrDeleteItem = errors.New("delete item") )
var ( // ErrListEdgeKVNamespace is returned when ListEdgeKVNamespaces fails ErrListEdgeKVNamespace = errors.New("list EdgeKV namespaces") // ErrGetEdgeKVNamespace is returned when GetEdgeKVNamespace fails ErrGetEdgeKVNamespace = errors.New("get an EdgeKV namespace") // ErrCreateEdgeKVNamespace is returned when CreateEdgeKVNamespace fails ErrCreateEdgeKVNamespace = errors.New("create an EdgeKV namespace") // ErrUpdateEdgeKVNamespace is returned when UpdateEdgeKVNamespace fails ErrUpdateEdgeKVNamespace = errors.New("update an EdgeKV namespace") )
var ( // ErrGetEdgeWorkerID is returned in case an error occurs on GetEdgeWorkerID operation ErrGetEdgeWorkerID = errors.New("get an EdgeWorker ID") // ErrListEdgeWorkersID is returned in case an error occurs on ListEdgeWorkersID operation ErrListEdgeWorkersID = errors.New("list EdgeWorkers IDs") // ErrCreateEdgeWorkerID is returned in case an error occurs on CreateEdgeWorkerID operation ErrCreateEdgeWorkerID = errors.New("create an EdgeWorker ID") // ErrUpdateEdgeWorkerID is returned in case an error occurs on UpdateEdgeWorkerID operation ErrUpdateEdgeWorkerID = errors.New("update an EdgeWorker ID") // ErrCloneEdgeWorkerID is returned in case an error occurs on CloneEdgeWroker operation ErrCloneEdgeWorkerID = errors.New("clone an EdgeWorker ID") // ErrDeleteEdgeWorkerID is returned in case an error occurs on DeleteEdgeWorkerID operation ErrDeleteEdgeWorkerID = errors.New("delete an EdgeWorker ID") )
var ( // ErrGetEdgeWorkerVersion is returned in case an error occurs on GetEdgeWorkerVersion operation ErrGetEdgeWorkerVersion = errors.New("get an EdgeWorker Version") // ErrListEdgeWorkerVersions is returned in case an error occurs on ListEdgeWorkerVersions operation ErrListEdgeWorkerVersions = errors.New("list EdgeWorkers Versions") // ErrGetEdgeWorkerVersionContent is returned in case an error occurs on GetEdgeWorkerVersionContent operation ErrGetEdgeWorkerVersionContent = errors.New("get an EdgeWorker Version Content Bundle") // ErrCreateEdgeWorkerVersion is returned in case an error occurs on CreateEdgeWorkerVersion operation ErrCreateEdgeWorkerVersion = errors.New("create an EdgeWorker Version") // ErrDeleteEdgeWorkerVersion is returned in case an error occurs on DeleteEdgeWorkerVersion operation ErrDeleteEdgeWorkerVersion = errors.New("delete an EdgeWorker Version") )
var ( // ErrNotFound is returned when edgeKV resource does not exist ErrNotFound = errors.New("specified edgeKV resource does not exist") // ErrVersionBeingDeactivated is returned when edgeworkers version is currently being deactivated ErrVersionBeingDeactivated = errors.New("version is being deactivated") // ErrVersionAlreadyDeactivated is returned when edgeworkers version is already deactivated ErrVersionAlreadyDeactivated = errors.New("version is already deactivated") )
var ( // ErrGetPermissionGroup is returned in case an error occurs on GetPermissionGroup operation ErrGetPermissionGroup = errors.New("get a permission group") // ErrListPermissionGroups is returned in case an error occurs on ListPermissionGroups operation ErrListPermissionGroups = errors.New("list permission groups") )
var ( // ErrGetSummaryReport is returned in case an error occurs on GetSummaryReport operation ErrGetSummaryReport = errors.New("get summary overview for EdgeWorker reports") // ErrGetReport is returned in case an error occurs on GetReport operation ErrGetReport = errors.New("get an EdgeWorker report") // ErrListReports is returned in case an error occurs on ListReports operation ErrListReports = errors.New("get EdgeWorker reports") )
var ( // ErrListResourceTiers is returned in case an error occurs on ListResourceTiers operation ErrListResourceTiers = errors.New("list resource tiers") // ErrGetResourceTier is returned in case an error occurs on GetResourceTier operation ErrGetResourceTier = errors.New("get a resource tier") )
var ( // ErrCreateSecureToken is returned in case an error occurs on CreateSecureToken operation ErrCreateSecureToken = errors.New("create secure token") )
var ( // ErrListContracts is returned in case an error occurs on ListContracts operation ErrListContracts = errors.New("list contracts") )
var ErrListGroupsWithinNamespace = errors.New("list groups within namespace")
ErrListGroupsWithinNamespace is returned in case an error occurs on ListGroupsWithinNamespace operation
var ( // ErrListProperties is returned in case an error occurs on ListProperties operation ErrListProperties = errors.New("list properties") )
var ( // ErrStructValidation is returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
var ( // ErrValidateBundle is returned in case an error occurs on ValidateBundle operation ErrValidateBundle = errors.New("validate a bundle") )
Functions ¶
Types ¶
type ActivateVersion ¶
type ActivateVersion struct { Network ActivationNetwork `json:"network"` Version string `json:"version"` Note string `json:"note,omitempty"` }
ActivateVersion represents the request body used to activate a version
func (ActivateVersion) Validate ¶
func (r ActivateVersion) Validate() error
Validate validates ActivateVersion
type ActivateVersionRequest ¶
type ActivateVersionRequest struct { EdgeWorkerID int ActivateVersion }
ActivateVersionRequest contains path parameters and request body used to activate an edge worker
func (ActivateVersionRequest) Validate ¶
func (r ActivateVersionRequest) Validate() error
Validate validates ActivateVersionRequest
type Activation ¶
type Activation struct { AccountID string `json:"accountId"` ActivationID int `json:"activationId"` CreatedBy string `json:"createdBy"` CreatedTime string `json:"createdTime"` EdgeWorkerID int `json:"edgeWorkerId"` LastModifiedTime string `json:"lastModifiedTime"` Network string `json:"network"` Status string `json:"status"` Version string `json:"version"` Note string `json:"note"` }
Activation represents an activation object
type ActivationNetwork ¶
type ActivationNetwork string
ActivationNetwork represents available activation network types
const ( // ActivationNetworkStaging is the staging network ActivationNetworkStaging ActivationNetwork = "STAGING" // ActivationNetworkProduction is the production network ActivationNetworkProduction ActivationNetwork = "PRODUCTION" )
type Activations ¶
type Activations interface { // ListActivations lists all activations for an EdgeWorker // // See: https://techdocs.akamai.com/edgeworkers/reference/get-activations-1 ListActivations(context.Context, ListActivationsRequest) (*ListActivationsResponse, error) // GetActivation fetches an EdgeWorker activation by id // // See: https://techdocs.akamai.com/edgeworkers/reference/get-activation-1 GetActivation(context.Context, GetActivationRequest) (*Activation, error) // ActivateVersion activates an EdgeWorker version on a given network // // See: https://techdocs.akamai.com/edgeworkers/reference/post-activations-1 ActivateVersion(context.Context, ActivateVersionRequest) (*Activation, error) // CancelPendingActivation cancels pending activation with a given id // // See: https://techdocs.akamai.com/edgeworkers/reference/cancel-activation CancelPendingActivation(context.Context, CancelActivationRequest) (*Activation, error) }
Activations is an edgeworkers activations API interface
type Additional ¶
type Additional struct {
RequestID string `json:"requestId,omitempty"`
}
Additional holds request_id for edgekv errors
type CancelActivationRequest ¶
CancelActivationRequest contains path parameters used to cancel edge worker activation
func (CancelActivationRequest) Validate ¶
func (r CancelActivationRequest) Validate() error
Validate validates CancelActivationRequest
type ClientFunc ¶
type ClientFunc func(sess session.Session, opts ...Option) Edgeworkers
ClientFunc is a Edgeworkers client new method, this can be used for mocking
type CloneEdgeWorkerIDRequest ¶
type CloneEdgeWorkerIDRequest struct { EdgeWorkerIDBodyRequest EdgeWorkerID int }
CloneEdgeWorkerIDRequest contains body and path parameters used to clone EdgeWorkerID
func (CloneEdgeWorkerIDRequest) Validate ¶
func (c CloneEdgeWorkerIDRequest) Validate() error
Validate validates CloneEdgeWorkerIDRequest
type Contracts ¶
type Contracts interface { // ListContracts lists contract IDs that can be used to list resource tiers // // See: https://techdocs.akamai.com/edgeworkers/reference/get-contracts-1 ListContracts(context.Context) (*ListContractsResponse, error) }
Contracts is an edgeworkers contracts API interface
type CreateEdgeKVAccessTokenRequest ¶
type CreateEdgeKVAccessTokenRequest struct { // Whether to allow this token access to the Akamai production network AllowOnProduction bool `json:"allowOnProduction"` // Whether to allow this token access to the Akamai staging network AllowOnStaging bool `json:"allowOnStaging"` // Desired token expiry date in ISO format. Expiry can be up to 6 months from creation. Expiry string `json:"expiry"` // Friendly name of the token. Used when retrieving tokens by name. Name string `json:"name"` // A list of namespace identifiers the token should have access to, plus the associated read, write, delete permissions NamespacePermissions NamespacePermissions `json:"namespacePermissions"` }
CreateEdgeKVAccessTokenRequest contains parameters used to create EdgeKV access token
func (CreateEdgeKVAccessTokenRequest) Validate ¶
func (c CreateEdgeKVAccessTokenRequest) Validate() error
Validate validates CreateEdgeKVAccessTokenRequest
type CreateEdgeKVAccessTokenResponse ¶
type CreateEdgeKVAccessTokenResponse struct { // The expiry date Expiry string `json:"expiry"` // The name assigned to the access token. You can't modify an access token name. Name string `json:"name"` // Internally generated unique identifier for the access token UUID string `json:"uuid"` // The access token details Value string `json:"value"` }
CreateEdgeKVAccessTokenResponse contains response from EdgeKV access token creation
type CreateEdgeKVNamespaceRequest ¶
type CreateEdgeKVNamespaceRequest struct { Network NamespaceNetwork Namespace }
CreateEdgeKVNamespaceRequest contains path parameter and request body used to create a namespace
func (CreateEdgeKVNamespaceRequest) Validate ¶
func (r CreateEdgeKVNamespaceRequest) Validate() error
Validate validates CreateEdgeKVNamespaceRequest
type CreateEdgeWorkerIDRequest ¶
type CreateEdgeWorkerIDRequest struct { Name string `json:"name"` GroupID int `json:"groupId"` ResourceTierID int `json:"resourceTierId"` }
CreateEdgeWorkerIDRequest contains body parameters used to create EdgeWorkerID
func (CreateEdgeWorkerIDRequest) Validate ¶
func (c CreateEdgeWorkerIDRequest) Validate() error
Validate validates CreateEdgeWorkerIDRequest
type CreateEdgeWorkerVersionRequest ¶
CreateEdgeWorkerVersionRequest contains parameters used to create EdgeWorkerVersion
func (CreateEdgeWorkerVersionRequest) Validate ¶
func (g CreateEdgeWorkerVersionRequest) Validate() error
Validate validates CreateEdgeWorkerVersionRequest
type CreateSecureTokenRequest ¶
type CreateSecureTokenRequest struct { ACL string `json:"acl,omitempty"` Expiry int `json:"expiry,omitempty"` Hostname string `json:"hostname,omitempty"` Network ActivationNetwork `json:"network,omitempty"` PropertyID string `json:"propertyId,omitempty"` URL string `json:"url,omitempty"` }
CreateSecureTokenRequest represents parameters for CreateSecureToken
func (CreateSecureTokenRequest) Validate ¶
func (c CreateSecureTokenRequest) Validate() error
Validate validates CreateSecureTokenRequest
type CreateSecureTokenResponse ¶
type CreateSecureTokenResponse struct {
AkamaiEWTrace string `json:"akamaiEwTrace"`
}
CreateSecureTokenResponse contains response from CreateSecureToken
type Data ¶
type Data struct { OnClientRequest *OnClientRequest `json:"onClientRequest"` OnOriginRequest *OnOriginRequest `json:"onOriginRequest"` OnOriginResponse *OnOriginResponse `json:"onOriginResponse"` OnClientResponse *OnClientResponse `json:"onClientResponse"` ResponseProvider *ResponseProvider `json:"responseProvider"` Init *Init `json:"init"` }
Data represents data object
type DataSummary ¶
type DataSummary struct { Memory *Summary `json:"memory"` Successes *Total `json:"successes"` InitDuration *Summary `json:"initDuration"` ExecDuration *Summary `json:"execDuration"` Errors *Total `json:"errors"` Invocations *Total `json:"invocations"` }
DataSummary represents reports summary overview data for EdgeWorker
type DeactivateVersion ¶
type DeactivateVersion struct { Network ActivationNetwork `json:"network"` Note string `json:"note,omitempty"` Version string `json:"version"` }
DeactivateVersion represents the request body used to deactivate a version
func (*DeactivateVersion) Validate ¶
func (r *DeactivateVersion) Validate() error
Validate validates DeactivateVersion
type DeactivateVersionRequest ¶
type DeactivateVersionRequest struct { EdgeWorkerID int DeactivateVersion }
DeactivateVersionRequest describes the request parameters for DeactivateVersion
func (*DeactivateVersionRequest) Validate ¶
func (r *DeactivateVersionRequest) Validate() error
Validate validates DeactivateVersionRequest
type Deactivation ¶
type Deactivation struct { EdgeWorkerID int `json:"edgeWorkerId"` Version string `json:"version"` DeactivationID int `json:"deactivationId"` AccountID string `json:"accountId"` Status string `json:"status"` Network ActivationNetwork `json:"network"` Note string `json:"note,omitempty"` CreatedBy string `json:"createdBy"` CreatedTime string `json:"createdTime"` LastModifiedTime string `json:"lastModifiedTime"` }
Deactivation is the response returned by GetDeactivation, DeactivateVersion and ListDeactivation
type Deactivations ¶
type Deactivations interface { // ListDeactivations lists all deactivations for a given EdgeWorker ID // // See: https://techdocs.akamai.com/edgeworkers/reference/get-deactivations-1 ListDeactivations(context.Context, ListDeactivationsRequest) (*ListDeactivationsResponse, error) // GetDeactivation gets details for a specific deactivation // // See: https://techdocs.akamai.com/edgeworkers/reference/get-deactivation-1 GetDeactivation(context.Context, GetDeactivationRequest) (*Deactivation, error) // DeactivateVersion deactivates an existing EdgeWorker version on the akamai network // // See: https://techdocs.akamai.com/edgeworkers/reference/post-deactivations-1 DeactivateVersion(context.Context, DeactivateVersionRequest) (*Deactivation, error) }
Deactivations is an EdgeWorkers deactivations API interface
type DeleteEdgeKVAccessTokenRequest ¶
type DeleteEdgeKVAccessTokenRequest struct {
TokenName string
}
DeleteEdgeKVAccessTokenRequest contains name of the EdgeKV access token to remove
func (DeleteEdgeKVAccessTokenRequest) Validate ¶
func (d DeleteEdgeKVAccessTokenRequest) Validate() error
Validate validates DeleteEdgeKVAccessTokenRequest
type DeleteEdgeKVAccessTokenResponse ¶
DeleteEdgeKVAccessTokenResponse contains response after removal of EdgeKV access token
type DeleteEdgeWorkerIDRequest ¶
type DeleteEdgeWorkerIDRequest struct {
EdgeWorkerID int
}
DeleteEdgeWorkerIDRequest contains parameters used to delete an EdgeWorkerID
func (DeleteEdgeWorkerIDRequest) Validate ¶
func (d DeleteEdgeWorkerIDRequest) Validate() error
Validate validates DeleteEdgeWorkerIDRequest
type DeleteEdgeWorkerVersionRequest ¶
type DeleteEdgeWorkerVersionRequest EdgeWorkerVersionRequest
DeleteEdgeWorkerVersionRequest contains parameters used to delete an EdgeWorkerVersion
func (DeleteEdgeWorkerVersionRequest) Validate ¶
func (g DeleteEdgeWorkerVersionRequest) Validate() error
Validate validates DeleteEdgeWorkerVersionRequest
type DeleteItemRequest ¶
type DeleteItemRequest struct { ItemID string ItemsRequestParams }
DeleteItemRequest represents the request params used to delete an item
func (DeleteItemRequest) Validate ¶
func (r DeleteItemRequest) Validate() error
Validate validates DeleteItemRequest
type EdgeKVAccessToken ¶
type EdgeKVAccessToken struct { // The expiry date Expiry string `json:"expiry"` // The name assigned to the access token. You can't modify an access token name. Name string `json:"name"` // Internally generated unique identifier for the access token UUID string `json:"uuid"` }
EdgeKVAccessToken contains response from EdgeKV access token creation
type EdgeKVAccessTokens ¶
type EdgeKVAccessTokens interface { // CreateEdgeKVAccessToken generates EdgeKV specific access token // // See: https://techdocs.akamai.com/edgekv/reference/post-tokens CreateEdgeKVAccessToken(context.Context, CreateEdgeKVAccessTokenRequest) (*CreateEdgeKVAccessTokenResponse, error) // GetEdgeKVAccessToken retrieves an EdgeKV access token // // See: https://techdocs.akamai.com/edgekv/reference/get-token GetEdgeKVAccessToken(context.Context, GetEdgeKVAccessTokenRequest) (*GetEdgeKVAccessTokenResponse, error) // ListEdgeKVAccessTokens lists EdgeKV access tokens // // See: https://techdocs.akamai.com/edgekv/reference/get-tokens ListEdgeKVAccessTokens(context.Context, ListEdgeKVAccessTokensRequest) (*ListEdgeKVAccessTokensResponse, error) // DeleteEdgeKVAccessToken revokes an EdgeKV access token // // See: https://techdocs.akamai.com/edgekv/reference/delete-token DeleteEdgeKVAccessToken(context.Context, DeleteEdgeKVAccessTokenRequest) (*DeleteEdgeKVAccessTokenResponse, error) }
EdgeKVAccessTokens is EdgeKV access token API interface
type EdgeKVInitializationStatus ¶
type EdgeKVInitializationStatus struct { AccountStatus string `json:"accountStatus"` CPCode string `json:"cpcode"` ProductionStatus string `json:"productionStatus"` StagingStatus string `json:"stagingStatus"` }
EdgeKVInitializationStatus represents a response object returned by InitializeEdgeKV and GetEdgeKVInitializeStatus
type EdgeKVInitialize ¶
type EdgeKVInitialize interface { // InitializeEdgeKV Initialize the EdgeKV database // // See: https://techdocs.akamai.com/edgekv/reference/put-initialize InitializeEdgeKV(ctx context.Context) (*EdgeKVInitializationStatus, error) // GetEdgeKVInitializationStatus is used to check on the current initialization status // // See: https://techdocs.akamai.com/edgekv/reference/get-initialize GetEdgeKVInitializationStatus(ctx context.Context) (*EdgeKVInitializationStatus, error) }
EdgeKVInitialize is EdgeKV Initialize API interface
type EdgeKVItems ¶
type EdgeKVItems interface { // ListItems lists items in EdgeKV group // // See: https://techdocs.akamai.com/edgekv/reference/get-group-1 ListItems(context.Context, ListItemsRequest) (*ListItemsResponse, error) // GetItem reads an item from EdgeKV group // // See: https://techdocs.akamai.com/edgekv/reference/get-item GetItem(context.Context, GetItemRequest) (*Item, error) // UpsertItem creates or updates an item in EdgeKV group // // See: https://techdocs.akamai.com/edgekv/reference/put-item UpsertItem(context.Context, UpsertItemRequest) (*string, error) // DeleteItem deletes an item from EdgeKV group // // See: https://techdocs.akamai.com/edgekv/reference/delete-item DeleteItem(context.Context, DeleteItemRequest) (*string, error) }
EdgeKVItems is EdgeKV Item API interface
type EdgeKVNamespaces ¶
type EdgeKVNamespaces interface { // ListEdgeKVNamespaces lists all namespaces in the given network // // See: https://techdocs.akamai.com/edgekv/reference/get-namespaces ListEdgeKVNamespaces(context.Context, ListEdgeKVNamespacesRequest) (*ListEdgeKVNamespacesResponse, error) // GetEdgeKVNamespace fetches a namespace by name // // See: https://techdocs.akamai.com/edgekv/reference/get-namespace GetEdgeKVNamespace(context.Context, GetEdgeKVNamespaceRequest) (*Namespace, error) // CreateEdgeKVNamespace creates a namespace on the given network // // See: https://techdocs.akamai.com/edgekv/reference/post-namespace CreateEdgeKVNamespace(context.Context, CreateEdgeKVNamespaceRequest) (*Namespace, error) // UpdateEdgeKVNamespace updates a namespace // // See: https://techdocs.akamai.com/edgekv/reference/put-namespace UpdateEdgeKVNamespace(context.Context, UpdateEdgeKVNamespaceRequest) (*Namespace, error) }
EdgeKVNamespaces is an EdgeKV namespaces API interface
type EdgeWorkerID ¶
type EdgeWorkerID struct { EdgeWorkerID int `json:"edgeWorkerId"` Name string `json:"name"` AccountID string `json:"accountId"` GroupID int64 `json:"groupId"` ResourceTierID int `json:"resourceTierId"` SourceEdgeWorkerID int `json:"sourceEdgeWorkerId,omitempty"` CreatedBy string `json:"createdBy"` CreatedTime string `json:"createdTime"` LastModifiedBy string `json:"lastModifiedBy"` LastModifiedTime string `json:"lastModifiedTime"` }
EdgeWorkerID represents an EdgeWorkerID object
type EdgeWorkerIDBodyRequest ¶
type EdgeWorkerIDBodyRequest struct { Name string `json:"name"` GroupID int `json:"groupId"` ResourceTierID int `json:"resourceTierId"` }
EdgeWorkerIDBodyRequest contains body parameters used to update or clone EdgeWorkerID
type EdgeWorkerIDs ¶
type EdgeWorkerIDs interface { // GetEdgeWorkerID gets details for a specific EdgeWorkerID // // See: https://techdocs.akamai.com/edgeworkers/reference/get-id GetEdgeWorkerID(context.Context, GetEdgeWorkerIDRequest) (*EdgeWorkerID, error) // ListEdgeWorkersID lists EdgeWorkerIDs in the identified group // // See: https://techdocs.akamai.com/edgeworkers/reference/get-ids ListEdgeWorkersID(context.Context, ListEdgeWorkersIDRequest) (*ListEdgeWorkersIDResponse, error) // CreateEdgeWorkerID creates a new EdgeWorkerID // // See: https://techdocs.akamai.com/edgeworkers/reference/post-ids CreateEdgeWorkerID(context.Context, CreateEdgeWorkerIDRequest) (*EdgeWorkerID, error) // UpdateEdgeWorkerID updates an EdgeWorkerID // // See: https://techdocs.akamai.com/edgeworkers/reference/put-id UpdateEdgeWorkerID(context.Context, UpdateEdgeWorkerIDRequest) (*EdgeWorkerID, error) // CloneEdgeWorkerID clones an EdgeWorkerID to change the resource tier // // See: https://techdocs.akamai.com/edgeworkers/reference/post-id-clone CloneEdgeWorkerID(context.Context, CloneEdgeWorkerIDRequest) (*EdgeWorkerID, error) // DeleteEdgeWorkerID deletes an EdgeWorkerID // // See: https://techdocs.akamai.com/edgeworkers/reference/delete-id DeleteEdgeWorkerID(context.Context, DeleteEdgeWorkerIDRequest) error }
EdgeWorkerIDs is EdgeWorker ID API interface
type EdgeWorkerLimit ¶
type EdgeWorkerLimit struct { LimitName string `json:"limitName"` LimitValue int64 `json:"limitValue"` LimitUnit string `json:"limitUnit"` }
EdgeWorkerLimit represents a single edgeworker limit object
type EdgeWorkerVersion ¶
type EdgeWorkerVersion struct { EdgeWorkerID int `json:"edgeWorkerId"` Version string `json:"version"` AccountID string `json:"accountId"` Checksum string `json:"checksum"` SequenceNumber int `json:"sequenceNumber"` CreatedBy string `json:"createdBy"` CreatedTime string `json:"createdTime"` }
EdgeWorkerVersion represents an EdgeWorkerVersion object
type EdgeWorkerVersionRequest ¶
EdgeWorkerVersionRequest contains request parameters used by GetEdgeWorkerVersion, GetEdgeWorkerVersionContent and DeleteEdgeWorkerVersion
type EdgeWorkerVersions ¶
type EdgeWorkerVersions interface { // GetEdgeWorkerVersion gets details for a specific EdgeWorkerVersion // // See: https://techdocs.akamai.com/edgeworkers/reference/get-version GetEdgeWorkerVersion(context.Context, GetEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error) // ListEdgeWorkerVersions lists EdgeWorkerVersions in the identified group // // See: https://techdocs.akamai.com/edgeworkers/reference/get-versions ListEdgeWorkerVersions(context.Context, ListEdgeWorkerVersionsRequest) (*ListEdgeWorkerVersionsResponse, error) // GetEdgeWorkerVersionContent gets content bundle for a specific EdgeWorkerVersion // // See: https://techdocs.akamai.com/edgeworkers/reference/get-version-content GetEdgeWorkerVersionContent(context.Context, GetEdgeWorkerVersionContentRequest) (*Bundle, error) // CreateEdgeWorkerVersion creates a new EdgeWorkerVersion // // See: https://techdocs.akamai.com/edgeworkers/reference/post-versions CreateEdgeWorkerVersion(context.Context, CreateEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error) // DeleteEdgeWorkerVersion deletes an EdgeWorkerVersion // // See: https://techdocs.akamai.com/edgeworkers/reference/delete-version DeleteEdgeWorkerVersion(context.Context, DeleteEdgeWorkerVersionRequest) error }
EdgeWorkerVersions is EdgeWorker Version API interface
type Edgeworkers ¶
type Edgeworkers interface { Activations Contracts Deactivations EdgeKVAccessTokens EdgeKVInitialize EdgeKVItems EdgeKVNamespaces EdgeWorkerIDs EdgeWorkerVersions Groups PermissionGroups Properties Reports ResourceTiers SecureTokens Validations }
Edgeworkers is the api interface for EdgeWorkers and EdgeKV
type Error ¶
type Error struct { Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Instance string `json:"instance,omitempty"` Status int `json:"status,omitempty"` ErrorCode string `json:"errorCode,omitempty"` Method string `json:"method,omitempty"` ServerIP string `json:"serverIp,omitempty"` ClientIP string `json:"clientIp,omitempty"` RequestID string `json:"requestId,omitempty"` RequestTime string `json:"requestTime,omitempty"` AuthzRealm string `json:"authzRealm,omitempty"` AdditionalDetail Additional `json:"additionalDetail,omitempty"` }
Error is an edgeworkers error implementation For details on possible error types, refer to: https://techdocs.akamai.com/edgeworkers/reference/api-errors
type GetActivationRequest ¶
GetActivationRequest contains path parameters used to fetch edge worker activation
func (GetActivationRequest) Validate ¶
func (r GetActivationRequest) Validate() error
Validate validates GetActivationRequest
type GetDeactivationRequest ¶
GetDeactivationRequest describes the request parameters for GetDeactivation
func (*GetDeactivationRequest) Validate ¶
func (r *GetDeactivationRequest) Validate() error
Validate validates GetDeactivationRequest
type GetEdgeKVAccessTokenRequest ¶
type GetEdgeKVAccessTokenRequest struct {
TokenName string
}
GetEdgeKVAccessTokenRequest represents an TokenName object
func (GetEdgeKVAccessTokenRequest) Validate ¶
func (g GetEdgeKVAccessTokenRequest) Validate() error
Validate validates GetEdgeKVAccessTokenRequest
type GetEdgeKVAccessTokenResponse ¶
type GetEdgeKVAccessTokenResponse CreateEdgeKVAccessTokenResponse
GetEdgeKVAccessTokenResponse contains response from EdgeKV access token retrieval
type GetEdgeKVNamespaceRequest ¶
type GetEdgeKVNamespaceRequest struct { Network NamespaceNetwork Name string }
GetEdgeKVNamespaceRequest contains path parameters used to feth a namespace
func (GetEdgeKVNamespaceRequest) Validate ¶
func (r GetEdgeKVNamespaceRequest) Validate() error
Validate validates GetEdgeKVNamespaceRequest
type GetEdgeWorkerIDRequest ¶
type GetEdgeWorkerIDRequest struct {
EdgeWorkerID int
}
GetEdgeWorkerIDRequest contains parameters used to get an EdgeWorkerID
func (GetEdgeWorkerIDRequest) Validate ¶
func (g GetEdgeWorkerIDRequest) Validate() error
Validate validates GetEdgeWorkerIDRequest
type GetEdgeWorkerVersionContentRequest ¶
type GetEdgeWorkerVersionContentRequest EdgeWorkerVersionRequest
GetEdgeWorkerVersionContentRequest contains parameters used to get content bundle of an EdgeWorkerVersion
func (GetEdgeWorkerVersionContentRequest) Validate ¶
func (g GetEdgeWorkerVersionContentRequest) Validate() error
Validate validates GetEdgeWorkerVersionContentRequest
type GetEdgeWorkerVersionRequest ¶
type GetEdgeWorkerVersionRequest EdgeWorkerVersionRequest
GetEdgeWorkerVersionRequest contains parameters used to get an EdgeWorkerVersion
func (GetEdgeWorkerVersionRequest) Validate ¶
func (g GetEdgeWorkerVersionRequest) Validate() error
Validate validates GetEdgeWorkerVersionRequest
type GetItemRequest ¶
type GetItemRequest struct { ItemID string ItemsRequestParams }
GetItemRequest represents the request params used to get a single item
func (GetItemRequest) Validate ¶
func (r GetItemRequest) Validate() error
Validate validates GetItemRequest
type GetPermissionGroupRequest ¶
type GetPermissionGroupRequest struct {
GroupID string
}
GetPermissionGroupRequest contains parameters used to get a permission group
func (GetPermissionGroupRequest) Validate ¶
func (g GetPermissionGroupRequest) Validate() error
Validate validates GetPermissionGroupRequest
type GetReportRequest ¶
type GetReportRequest struct { ReportID int Start string // If end date is not provided, then API will assign current date by default End string EdgeWorker string Status *string EventHandler *string }
GetReportRequest contains parameters used to get an EdgeWorker report
func (GetReportRequest) Validate ¶
func (r GetReportRequest) Validate() error
Validate validates GetReportRequest
type GetReportResponse ¶
type GetReportResponse struct { ReportID int `json:"reportId"` Name string `json:"name"` Description string `json:"description"` Start string `json:"start"` End string `json:"end"` Data []ReportData `json:"data"` }
GetReportResponse represents a response object returned by GetReport
type GetResourceTierRequest ¶
type GetResourceTierRequest struct {
EdgeWorkerID int
}
GetResourceTierRequest contains parameters used to get a resource tier
func (GetResourceTierRequest) Validate ¶
func (r GetResourceTierRequest) Validate() error
Validate validates GetResourceTierRequest
type GetSummaryReportRequest ¶
type GetSummaryReportRequest struct { Start string // If end date is not provided, then API will assign current date by default End string EdgeWorker string Status *string EventHandler *string }
GetSummaryReportRequest contains parameters used to get summary overview for EdgeWorker reports
func (GetSummaryReportRequest) Validate ¶
func (r GetSummaryReportRequest) Validate() error
Validate validates GetSummaryReportRequest
type GetSummaryReportResponse ¶
type GetSummaryReportResponse struct { ReportID int `json:"reportId"` Name string `json:"name"` Description string `json:"description"` Start string `json:"start"` End string `json:"end"` Data DataSummary `json:"data"` }
GetSummaryReportResponse represents a response object returned by GetSummaryReport
type Groups ¶
type Groups interface { // ListGroupsWithinNamespace lists group identifiers created when writing items to a namespace // // See: https://techdocs.akamai.com/edgekv/reference/get-groups ListGroupsWithinNamespace(context.Context, ListGroupsWithinNamespaceRequest) ([]string, error) }
Groups is EdgeKV groups within a namespace API interface
type InitObject ¶
type InitObject struct { StartDateTime string `json:"startDateTime"` EdgeWorkerVersion string `json:"edgeWorkerVersion"` InitDuration Summary `json:"initDuration"` Invocations int `json:"invocations"` }
InitObject represents object structure for Init field
type ItemNetwork ¶
type ItemNetwork string
ItemNetwork represents available item network types
const ( // ItemStagingNetwork is the staging network ItemStagingNetwork ItemNetwork = "staging" // ItemProductionNetwork is the staging network ItemProductionNetwork ItemNetwork = "production" )
type ItemsRequestParams ¶
type ItemsRequestParams struct { Network ItemNetwork NamespaceID string GroupID string }
ItemsRequestParams represents the params used to list items
func (ItemsRequestParams) Validate ¶
func (r ItemsRequestParams) Validate() error
Validate validates ItemsRequestParams
type ListActivationsRequest ¶
ListActivationsRequest contains parameters used to list activations
func (ListActivationsRequest) Validate ¶
func (r ListActivationsRequest) Validate() error
Validate validates ListActivationsRequest
type ListActivationsResponse ¶
type ListActivationsResponse struct {
Activations []Activation `json:"activations"`
}
ListActivationsResponse represents a response object returned when listing activations
type ListContractsResponse ¶
type ListContractsResponse struct {
ContractIDs []string `json:"contractIds"`
}
ListContractsResponse represents a response object returned by ListContracts
type ListDeactivationsRequest ¶
ListDeactivationsRequest describes the parameters for the list deactivations request
func (*ListDeactivationsRequest) Validate ¶
func (r *ListDeactivationsRequest) Validate() error
Validate validates ListDeactivationsRequest
type ListDeactivationsResponse ¶
type ListDeactivationsResponse struct {
Deactivations []Deactivation `json:"deactivations"`
}
ListDeactivationsResponse describes the list deactivations response
type ListEdgeKVAccessTokensRequest ¶
type ListEdgeKVAccessTokensRequest struct {
IncludeExpired bool
}
ListEdgeKVAccessTokensRequest contains request parameters for ListEdgeKVAccessTokens
type ListEdgeKVAccessTokensResponse ¶
type ListEdgeKVAccessTokensResponse struct {
Tokens []EdgeKVAccessToken `json:"tokens"`
}
ListEdgeKVAccessTokensResponse contains list of EdgeKV access tokens
type ListEdgeKVNamespacesRequest ¶
type ListEdgeKVNamespacesRequest struct { Network NamespaceNetwork Details bool }
ListEdgeKVNamespacesRequest contains path parameters used to list namespaces
func (ListEdgeKVNamespacesRequest) Validate ¶
func (r ListEdgeKVNamespacesRequest) Validate() error
Validate validates ListEdgeKVNamespacesRequest
type ListEdgeKVNamespacesResponse ¶
type ListEdgeKVNamespacesResponse struct {
Namespaces []Namespace `json:"namespaces"`
}
ListEdgeKVNamespacesResponse represents a response object returned when listing namespaces
type ListEdgeWorkerVersionsRequest ¶
type ListEdgeWorkerVersionsRequest struct {
EdgeWorkerID int
}
ListEdgeWorkerVersionsRequest contains query parameters used to list EdgeWorkerVersions
func (ListEdgeWorkerVersionsRequest) Validate ¶
func (g ListEdgeWorkerVersionsRequest) Validate() error
Validate validates ListEdgeWorkerVersionsRequest
type ListEdgeWorkerVersionsResponse ¶
type ListEdgeWorkerVersionsResponse struct {
EdgeWorkerVersions []EdgeWorkerVersion `json:"versions"`
}
ListEdgeWorkerVersionsResponse represents a response object returned by ListEdgeWorkerVersions
type ListEdgeWorkersIDRequest ¶
ListEdgeWorkersIDRequest contains query parameters used to list EdgeWorkerIDs
type ListEdgeWorkersIDResponse ¶
type ListEdgeWorkersIDResponse struct {
EdgeWorkers []EdgeWorkerID `json:"edgeWorkerIds"`
}
ListEdgeWorkersIDResponse represents a response object returned by ListEdgeWorkersID
type ListGroupsWithinNamespaceRequest ¶
type ListGroupsWithinNamespaceRequest struct { Network NamespaceNetwork NamespaceID string }
ListGroupsWithinNamespaceRequest contains parameters used to get groups within a namespace
func (ListGroupsWithinNamespaceRequest) Validate ¶
func (g ListGroupsWithinNamespaceRequest) Validate() error
Validate validates ListGroupsWithinNamespaceRequest
type ListItemsRequest ¶
type ListItemsRequest struct {
ItemsRequestParams
}
ListItemsRequest represents the request params used to list items
func (ListItemsRequest) Validate ¶
func (r ListItemsRequest) Validate() error
Validate validates ListItemsRequest
type ListItemsResponse ¶
type ListItemsResponse []string
ListItemsResponse represents the response from list items
type ListPermissionGroupsResponse ¶
type ListPermissionGroupsResponse struct {
PermissionGroups []PermissionGroup `json:"groups"`
}
ListPermissionGroupsResponse represents a response object returned by ListPermissionGroups
type ListPropertiesRequest ¶
ListPropertiesRequest contains parameters used to list properties
func (ListPropertiesRequest) Validate ¶
func (r ListPropertiesRequest) Validate() error
Validate validates ListPropertiesRequest
type ListPropertiesResponse ¶
type ListPropertiesResponse struct { Properties []Property `json:"properties"` LimitedAccessToProperties bool `json:"limitedAccessToProperties"` }
ListPropertiesResponse represents a response object returned by ListPropertiesRequest
type ListReportsResponse ¶
type ListReportsResponse struct {
Reports []ReportResponse `json:"reports"`
}
ListReportsResponse represents list of report types
type ListResourceTiersRequest ¶
type ListResourceTiersRequest struct {
ContractID string
}
ListResourceTiersRequest contains parameters used to list resource tiers
func (ListResourceTiersRequest) Validate ¶
func (r ListResourceTiersRequest) Validate() error
Validate validates ListResourceTiersRequest
type ListResourceTiersResponse ¶
type ListResourceTiersResponse struct {
ResourceTiers []ResourceTier `json:"resourceTiers"`
}
ListResourceTiersResponse represents a response object returned by ListResourceTiers
type Mock ¶
func (*Mock) ActivateVersion ¶
func (m *Mock) ActivateVersion(ctx context.Context, req ActivateVersionRequest) (*Activation, error)
func (*Mock) CancelPendingActivation ¶
func (m *Mock) CancelPendingActivation(ctx context.Context, req CancelActivationRequest) (*Activation, error)
func (*Mock) CloneEdgeWorkerID ¶
func (m *Mock) CloneEdgeWorkerID(ctx context.Context, req CloneEdgeWorkerIDRequest) (*EdgeWorkerID, error)
func (*Mock) CreateEdgeKVAccessToken ¶
func (m *Mock) CreateEdgeKVAccessToken(ctx context.Context, req CreateEdgeKVAccessTokenRequest) (*CreateEdgeKVAccessTokenResponse, error)
func (*Mock) CreateEdgeKVNamespace ¶
func (*Mock) CreateEdgeWorkerID ¶
func (m *Mock) CreateEdgeWorkerID(ctx context.Context, req CreateEdgeWorkerIDRequest) (*EdgeWorkerID, error)
func (*Mock) CreateEdgeWorkerVersion ¶
func (m *Mock) CreateEdgeWorkerVersion(ctx context.Context, req CreateEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error)
func (*Mock) CreateSecureToken ¶
func (m *Mock) CreateSecureToken(ctx context.Context, req CreateSecureTokenRequest) (*CreateSecureTokenResponse, error)
func (*Mock) DeactivateVersion ¶
func (m *Mock) DeactivateVersion(ctx context.Context, req DeactivateVersionRequest) (*Deactivation, error)
func (*Mock) DeleteEdgeKVAccessToken ¶
func (m *Mock) DeleteEdgeKVAccessToken(ctx context.Context, req DeleteEdgeKVAccessTokenRequest) (*DeleteEdgeKVAccessTokenResponse, error)
func (*Mock) DeleteEdgeWorkerID ¶
func (m *Mock) DeleteEdgeWorkerID(ctx context.Context, req DeleteEdgeWorkerIDRequest) error
func (*Mock) DeleteEdgeWorkerVersion ¶
func (m *Mock) DeleteEdgeWorkerVersion(ctx context.Context, req DeleteEdgeWorkerVersionRequest) error
func (*Mock) DeleteItem ¶
func (*Mock) GetActivation ¶
func (m *Mock) GetActivation(ctx context.Context, req GetActivationRequest) (*Activation, error)
func (*Mock) GetDeactivation ¶
func (m *Mock) GetDeactivation(ctx context.Context, req GetDeactivationRequest) (*Deactivation, error)
func (*Mock) GetEdgeKVAccessToken ¶
func (m *Mock) GetEdgeKVAccessToken(ctx context.Context, req GetEdgeKVAccessTokenRequest) (*GetEdgeKVAccessTokenResponse, error)
func (*Mock) GetEdgeKVInitializationStatus ¶
func (m *Mock) GetEdgeKVInitializationStatus(ctx context.Context) (*EdgeKVInitializationStatus, error)
func (*Mock) GetEdgeKVNamespace ¶
func (*Mock) GetEdgeWorkerID ¶
func (m *Mock) GetEdgeWorkerID(ctx context.Context, req GetEdgeWorkerIDRequest) (*EdgeWorkerID, error)
func (*Mock) GetEdgeWorkerVersion ¶
func (m *Mock) GetEdgeWorkerVersion(ctx context.Context, req GetEdgeWorkerVersionRequest) (*EdgeWorkerVersion, error)
func (*Mock) GetEdgeWorkerVersionContent ¶
func (*Mock) GetPermissionGroup ¶
func (m *Mock) GetPermissionGroup(ctx context.Context, req GetPermissionGroupRequest) (*PermissionGroup, error)
func (*Mock) GetReport ¶
func (m *Mock) GetReport(ctx context.Context, req GetReportRequest) (*GetReportResponse, error)
func (*Mock) GetResourceTier ¶
func (m *Mock) GetResourceTier(ctx context.Context, req GetResourceTierRequest) (*ResourceTier, error)
func (*Mock) GetSummaryReport ¶
func (m *Mock) GetSummaryReport(ctx context.Context, req GetSummaryReportRequest) (*GetSummaryReportResponse, error)
func (*Mock) InitializeEdgeKV ¶
func (m *Mock) InitializeEdgeKV(ctx context.Context) (*EdgeKVInitializationStatus, error)
func (*Mock) ListActivations ¶
func (m *Mock) ListActivations(ctx context.Context, req ListActivationsRequest) (*ListActivationsResponse, error)
func (*Mock) ListContracts ¶
func (m *Mock) ListContracts(ctx context.Context) (*ListContractsResponse, error)
func (*Mock) ListDeactivations ¶
func (m *Mock) ListDeactivations(ctx context.Context, req ListDeactivationsRequest) (*ListDeactivationsResponse, error)
func (*Mock) ListEdgeKVAccessTokens ¶
func (m *Mock) ListEdgeKVAccessTokens(ctx context.Context, req ListEdgeKVAccessTokensRequest) (*ListEdgeKVAccessTokensResponse, error)
func (*Mock) ListEdgeKVNamespaces ¶
func (m *Mock) ListEdgeKVNamespaces(ctx context.Context, req ListEdgeKVNamespacesRequest) (*ListEdgeKVNamespacesResponse, error)
func (*Mock) ListEdgeWorkerVersions ¶
func (m *Mock) ListEdgeWorkerVersions(ctx context.Context, req ListEdgeWorkerVersionsRequest) (*ListEdgeWorkerVersionsResponse, error)
func (*Mock) ListEdgeWorkersID ¶
func (m *Mock) ListEdgeWorkersID(ctx context.Context, req ListEdgeWorkersIDRequest) (*ListEdgeWorkersIDResponse, error)
func (*Mock) ListGroupsWithinNamespace ¶
func (*Mock) ListItems ¶
func (m *Mock) ListItems(ctx context.Context, req ListItemsRequest) (*ListItemsResponse, error)
func (*Mock) ListPermissionGroups ¶
func (m *Mock) ListPermissionGroups(ctx context.Context) (*ListPermissionGroupsResponse, error)
func (*Mock) ListProperties ¶
func (m *Mock) ListProperties(ctx context.Context, req ListPropertiesRequest) (*ListPropertiesResponse, error)
func (*Mock) ListReports ¶
func (m *Mock) ListReports(ctx context.Context) (*ListReportsResponse, error)
func (*Mock) ListResourceTiers ¶
func (m *Mock) ListResourceTiers(ctx context.Context, req ListResourceTiersRequest) (*ListResourceTiersResponse, error)
func (*Mock) UpdateEdgeKVNamespace ¶
func (*Mock) UpdateEdgeWorkerID ¶
func (m *Mock) UpdateEdgeWorkerID(ctx context.Context, req UpdateEdgeWorkerIDRequest) (*EdgeWorkerID, error)
func (*Mock) UpsertItem ¶
func (*Mock) ValidateBundle ¶
func (m *Mock) ValidateBundle(ctx context.Context, req ValidateBundleRequest) (*ValidateBundleResponse, error)
type Namespace ¶
type Namespace struct { Name string `json:"namespace"` GeoLocation string `json:"geoLocation,omitempty"` Retention *int `json:"retentionInSeconds,omitempty"` GroupID *int `json:"groupId,omitempty"` }
Namespace represents a namespace object and a request body used to create a namespace
type NamespaceNetwork ¶
type NamespaceNetwork string
NamespaceNetwork represents available namespace network types
const ( // NamespaceStagingNetwork is the staging network NamespaceStagingNetwork NamespaceNetwork = "staging" // NamespaceProductionNetwork is the production network NamespaceProductionNetwork NamespaceNetwork = "production" )
type NamespacePermissions ¶
type NamespacePermissions map[string][]Permission
NamespacePermissions represents mapping between namespaces and permissions
type OnClientRequest ¶
type OnClientRequest []OnRequestAndResponse
OnClientRequest represents OnClientRequest list
type OnClientResponse ¶
type OnClientResponse []OnRequestAndResponse
OnClientResponse represents OnClientResponse list
type OnOriginRequest ¶
type OnOriginRequest []OnRequestAndResponse
OnOriginRequest represents OnOriginRequest list
type OnOriginResponse ¶
type OnOriginResponse []OnRequestAndResponse
OnOriginResponse represents OnOriginResponse list
type OnRequestAndResponse ¶
type OnRequestAndResponse struct { Status *string `json:"status"` StartDateTime string `json:"startDateTime"` EdgeWorkerVersion string `json:"edgeWorkerVersion"` ExecDuration *Summary `json:"execDuration"` Invocations int `json:"invocations"` Memory *Summary `json:"memory"` }
OnRequestAndResponse represents object structure for OnClientRequest, OnOriginRequest, OnOriginResponse, OnClientResponse, ResponseProvider fields
type Permission ¶
type Permission string
Permission has possible values: `r` for read access, `w` for write access, `d` for delete access
const ( // PermissionRead represents read permission PermissionRead Permission = "r" // PermissionWrite represents write permission PermissionWrite Permission = "w" // PermissionDelete represents delete permission PermissionDelete Permission = "d" )
type PermissionGroup ¶
type PermissionGroup struct { ID int64 `json:"groupId"` Name string `json:"groupName"` Capabilities []string `json:"capabilities"` }
PermissionGroup represents a single permission group object
type PermissionGroups ¶
type PermissionGroups interface { // GetPermissionGroup gets details on the capabilities enabled within a specified group // // See: https://techdocs.akamai.com/edgeworkers/reference/get-group GetPermissionGroup(context.Context, GetPermissionGroupRequest) (*PermissionGroup, error) // ListPermissionGroups lists groups and the associated permission capabilities // // See: https://techdocs.akamai.com/edgeworkers/reference/get-groups ListPermissionGroups(context.Context) (*ListPermissionGroupsResponse, error) }
PermissionGroups is an edgeworkers permission groups API interface
type Permissions ¶
type Permissions []Permission
Permissions represents set of permissions for namespace
type Properties ¶
type Properties interface { // ListProperties lists all properties for a given edgeworker ID // // See: https://techdocs.akamai.com/edgeworkers/reference/get-properties ListProperties(context.Context, ListPropertiesRequest) (*ListPropertiesResponse, error) }
Properties is an edgeworkers properties API interface
type Property ¶
type Property struct { ID int64 `json:"propertyId"` Name string `json:"propertyName"` StagingVersion int `json:"stagingVersion"` ProductionVersion int `json:"productionVersion"` LatestVersion int `json:"latestVersion"` }
Property represents a single property object
type ReportData ¶
ReportData represents report data
type ReportResponse ¶
type ReportResponse struct { ReportID int `json:"reportId"` Name string `json:"name"` Description string `json:"description"` }
ReportResponse represents report type object
type Reports ¶
type Reports interface { // GetSummaryReport gets summary overview for EdgeWorker reports. Report id is 1 // // See: https://techdocs.akamai.com/edgeworkers/reference/get-report GetSummaryReport(context.Context, GetSummaryReportRequest) (*GetSummaryReportResponse, error) // GetReport gets details for an EdgeWorker // // See: https://techdocs.akamai.com/edgeworkers/reference/get-report GetReport(context.Context, GetReportRequest) (*GetReportResponse, error) // ListReports lists EdgeWorker reports // // See: https://techdocs.akamai.com/edgeworkers/reference/get-reports ListReports(context.Context) (*ListReportsResponse, error) }
Reports is an edgeworkers reports API interface
type ResourceTier ¶
type ResourceTier struct { ID int `json:"resourceTierId"` Name string `json:"resourceTierName"` EdgeWorkerLimits []EdgeWorkerLimit `json:"edgeWorkerLimits"` }
ResourceTier represents a single resource tier object
type ResourceTiers ¶
type ResourceTiers interface { // ListResourceTiers lists all resource tiers for a given contract // // See: https://techdocs.akamai.com/edgeworkers/reference/get-resource-tiers ListResourceTiers(context.Context, ListResourceTiersRequest) (*ListResourceTiersResponse, error) // GetResourceTier returns resource tier for a given edgeworker ID // // See: https://techdocs.akamai.com/edgeworkers/reference/get-id-resource-tier GetResourceTier(context.Context, GetResourceTierRequest) (*ResourceTier, error) }
ResourceTiers is an edgeworkers resource tiers API interface
type ResponseProvider ¶
type ResponseProvider []OnRequestAndResponse
ResponseProvider represents ResponseProvider list
type SecureTokens ¶
type SecureTokens interface { // CreateSecureToken creates a new secure token // // See: https://techdocs.akamai.com/edgeworkers/reference/post-secure-token CreateSecureToken(context.Context, CreateSecureTokenRequest) (*CreateSecureTokenResponse, error) }
SecureTokens is EdgeWorker Secure Token API interface
type Summary ¶
Summary represents data object for memory usage, initialization duration and execution duration
type Total ¶
type Total struct {
Total int `json:"total"`
}
Total describes total count for Successes, Invocations, Errors
type UpdateEdgeKVNamespaceRequest ¶
type UpdateEdgeKVNamespaceRequest struct { Network NamespaceNetwork UpdateNamespace }
UpdateEdgeKVNamespaceRequest contains path parameters and request body used to update a namespace
func (UpdateEdgeKVNamespaceRequest) Validate ¶
func (r UpdateEdgeKVNamespaceRequest) Validate() error
Validate validates UpdateEdgeKVNamespaceRequest
type UpdateEdgeWorkerIDRequest ¶
type UpdateEdgeWorkerIDRequest struct { EdgeWorkerIDBodyRequest EdgeWorkerID int }
UpdateEdgeWorkerIDRequest contains body and path parameters used to update EdgeWorkerID
func (UpdateEdgeWorkerIDRequest) Validate ¶
func (c UpdateEdgeWorkerIDRequest) Validate() error
Validate validates CreateEdgeWorkerIDRequest
type UpdateNamespace ¶
type UpdateNamespace struct { Name string `json:"namespace"` Retention *int `json:"retentionInSeconds"` GroupID *int `json:"groupId"` }
UpdateNamespace represents a request body used to update a namespace
type UpsertItemRequest ¶
type UpsertItemRequest struct { ItemID string ItemData Item ItemsRequestParams }
UpsertItemRequest represents the request params and body used to create or update an item
func (UpsertItemRequest) Validate ¶
func (r UpsertItemRequest) Validate() error
Validate validates UpsertItemRequest
type ValidateBundleRequest ¶
type ValidateBundleRequest struct {
Bundle
}
ValidateBundleRequest contains request bundle parameter to validate
func (ValidateBundleRequest) Validate ¶
func (r ValidateBundleRequest) Validate() error
Validate validates ValidateBundleRequest
type ValidateBundleResponse ¶
type ValidateBundleResponse struct { Errors []ValidationIssue `json:"errors"` Warnings []ValidationIssue `json:"warnings"` }
ValidateBundleResponse represents a response object returned by ValidateBundle
type ValidationIssue ¶
ValidationIssue represents a single error or warning
type Validations ¶
type Validations interface { // ValidateBundle given bundle validates it and returns a list of errors and/or warnings // // See: https://techdocs.akamai.com/edgeworkers/reference/post-validations ValidateBundle(context.Context, ValidateBundleRequest) (*ValidateBundleResponse, error) }
Validations is an edgeworkers validations API interface
Source Files ¶
- activations.go
- contracts.go
- deactivations.go
- edgekv_access_tokens.go
- edgekv_groups.go
- edgekv_initialize.go
- edgekv_items.go
- edgekv_namespaces.go
- edgeworker_id.go
- edgeworker_version.go
- edgeworkers.go
- errors.go
- mocks.go
- permission_group.go
- properties.go
- report.go
- resource_tier.go
- secure_tokens.go
- validations.go