Documentation ¶
Index ¶
- Constants
- Variables
- func Init(config edgegrid.Config)
- func IsActive(endpoint *Endpoint, network string) bool
- type APIParameterLocationValue
- type APIParameterTypeValue
- type APIPrivacyResource
- type APIPrivacySettings
- type AcgPair
- type ActivateEndpointOptions
- type Activation
- type CORSSetings
- type CacheResource
- type CacheResourceOptionValue
- type CacheSettings
- type Category
- type CloneVersionOptions
- type CompressResponseValue
- type CreateEndpointFromFileOptions
- type CreateEndpointOptions
- type DownstreamCaching
- type Endpoint
- func CloneVersion(options *CloneVersionOptions) (*Endpoint, error)
- func CreateEndpoint(options *CreateEndpointOptions) (*Endpoint, error)
- func CreateEndpointFromFile(options *CreateEndpointFromFileOptions) (*Endpoint, error)
- func GetVersion(options *GetVersionOptions) (*Endpoint, error)
- func ModifyVersion(endpoint *Endpoint) (*Endpoint, error)
- func RemoveEndpoint(endpointId int) (*Endpoint, error)
- func RemoveVersion(options *RemoveVersionOptions) (*Endpoint, error)
- func UpdateEndpointFromFile(options *UpdateEndpointFromFileOptions) (*Endpoint, error)
- type EndpointList
- type Endpoints
- type ErrorCaching
- type GetVersionOptions
- type GzipSettings
- type ImportResult
- type JWTClaim
- type JWTSettings
- type JWTSettingsLocationValue
- type JWTSettingsResource
- type Links
- type ListEndpointOptions
- type ListVersionsOptions
- type MaxAge
- type MaxAgeUnitValue
- type Method
- type MethodValue
- type Methods
- type Parameters
- type Problem
- type Problems
- type RemoveVersionOptions
- type Resource
- type ResourceBaseInfo
- type ResourceSettings
- type Resources
- type RsaPublicKey
- type SecurityRestrictions
- type SecurityScheme
- type SecuritySchemeDetail
- type StatusValue
- type UpdateEndpointFromFileOptions
- type Version
- type VersionSummary
- type Versions
Constants ¶
View Source
const ( MaxAgeUnitSeconds MaxAgeUnitValue = "SECONDS" MaxAgeUnitMinutes MaxAgeUnitValue = "MINUTES" MaxAgeUnitHours MaxAgeUnitValue = "HOURS" MaxAgeUnitDays MaxAgeUnitValue = "DAYS" CacheResourceOptionCache CacheResourceOptionValue = "CACHE" CacheResourceOptionBypassCache CacheResourceOptionValue = "BYPASS_CACHE" CacheResourceOptionNoStore CacheResourceOptionValue = "NO_STORE" CacheResourceOptionHonorOriginCacheControl CacheResourceOptionValue = "HONOR_ORIGIN_CACHE_CONTROL" CacheResourceOptionHonorOriginExpires CacheResourceOptionValue = "HONOR_ORIGIN_EXPIRES" CacheResourceOptionHonorOriginCacheControlAndExpires CacheResourceOptionValue = "HONOR_ORIGIN_CACHE_CONTROL_AND_EXPIRES" )
View Source
const ( APIParameterLocationHeader APIParameterLocationValue = "header" APIParameterLocationCookie APIParameterLocationValue = "cookie" APIParameterLocationQuery APIParameterLocationValue = "query" APIParameterLocationBody APIParameterLocationValue = "body" APIParameterTypeString APIParameterTypeValue = "string" APIParameterTypeInteger APIParameterTypeValue = "integer" APIParameterTypeNumber APIParameterTypeValue = "number" APIParameterTypeBoolean APIParameterTypeValue = "boolean" APIParameterTypeJson APIParameterTypeValue = "json/xml" APIParameterTypeXml APIParameterTypeValue = "json/xml" )
View Source
const ( StatusPending string = "PENDING" StatusActive string = "ACTIVE" StatusDeactivated string = "DEACTIVATED" StatusFailed string = "FAILED" )
Variables ¶
View Source
var ( // Config contains the Akamai OPEN Edgegrid API credentials // for automatic signing of requests Config edgegrid.Config )
Functions ¶
Types ¶
type APIParameterLocationValue ¶
type APIParameterLocationValue string
type APIParameterTypeValue ¶
type APIParameterTypeValue string
type APIPrivacyResource ¶
type APIPrivacyResource struct { ResourceSettings Notes string `json:"notes"` Public bool `json:"public"` }
type APIPrivacySettings ¶
type APIPrivacySettings struct { Resources map[int]APIPrivacyResource `json:"resources"` Public bool `json:"public"` }
type ActivateEndpointOptions ¶
type Activation ¶
type Activation struct { Networks []string `json:"networks"` NotificationRecipients []string `json:"notificationRecipients"` Notes string `json:"notes"` }
func ActivateEndpoint ¶
func ActivateEndpoint(options *ActivateEndpointOptions, activation *Activation) (*Activation, error)
func DeactivateEndpoint ¶
func DeactivateEndpoint(options *ActivateEndpointOptions, activation *Activation) (*Activation, error)
type CORSSetings ¶
type CORSSetings struct { Enabled bool `json:"enabled"` AllowedOrigins []string `json:"allowedOrigins,omitempty"` AllowedHeaders []string `json:"allowedHeaders,omitempty"` AllowedMethods []MethodValue `json:"allowedMethods,omitempty"` AllowCredentials bool `json:"allowCredentials,omitempty"` ExposedHeaders []string `json:"exposedHeaders,omitempty"` PreflightMaxAge int `json:"preflightMaxAge,omitempty"` }
type CacheResource ¶
type CacheResource struct { ResourceSettings Option CacheResourceOptionValue `json:"option"` MaxAge *MaxAge `json:"maxAge"` ServeStale bool `json:"serveStale"` }
type CacheResourceOptionValue ¶
type CacheResourceOptionValue string
type CacheSettings ¶
type CacheSettings struct { Enabled bool `json:"enabled"` Option string `json:"option"` MaxAge *MaxAge `json:"maxAge"` ServeStale bool `json:"serveStale"` DownstreamCaching DownstreamCaching `json:"downstreamCaching"` ErrorCaching ErrorCaching `json:"errorCaching"` Resources map[int]CacheResource `json:"resources"` }
type Category ¶
type Category struct { APICategoryID int `json:"apiCategoryId,omitempty"` APICategoryName string `json:"apiCategoryName"` APICategoryDescription string `json:"apiCategoryDescription"` Link string `json:"link"` LockVersion int `json:"lockVersion"` CreatedBy string `json:"createdBy,omitempty"` CreateDate string `json:"createDate,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` UpdateDate string `json:"updateDate,omitempty"` }
type CloneVersionOptions ¶
type CompressResponseValue ¶
type CompressResponseValue string
const ( CompressResponseAlways CompressResponseValue = "ALWAYS" CompressResponseNever CompressResponseValue = "NEVER" CompressResponseSameAsOrigin CompressResponseValue = "SAME_AS_ORIGIN" )
type CreateEndpointOptions ¶
type DownstreamCaching ¶
type Endpoint ¶
type Endpoint struct { APICategoryIds []int `json:"apiCategoryIds,omitempty"` APIEndPointHosts []string `json:"apiEndPointHosts"` APIEndPointID int `json:"apiEndPointId,omitempty"` APIEndPointLocked bool `json:"apiEndPointLocked,omitempty"` APIEndPointName string `json:"apiEndPointName"` APIEndPointScheme string `json:"apiEndPointScheme,omitempty"` APIResourceBaseInfo []*ResourceBaseInfo `json:"apiResourceBaseInfo,omitempty"` BasePath string `json:"basePath,omitempty"` ClonedFromVersion *int `json:"clonedFromVersion,omitempty"` ConsumeType string `json:"consumeType,omitempty"` ContractID string `json:"contractId,omitempty"` CreateDate string `json:"createDate,omitempty"` CreatedBy string `json:"createdBy,omitempty"` Description string `json:"description,omitempty"` GroupID int `json:"groupId,omitempty"` ProductionVersion *VersionSummary `json:"productionVersion,omitempty"` ProductionStatus string `json:"productionStatus,omitempty"` ProtectedByAPIKey bool `json:"protectedByApiKey,omitempty"` StagingStatus string `json:"stagingStatus,omitempty"` StagingVersion *VersionSummary `json:"stagingVersion,omitempty"` UpdateDate string `json:"updateDate,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` VersionNumber int `json:"versionNumber,omitempty"` SecurityScheme *SecurityScheme `json:"securityScheme,omitempty"` AkamaiSecurityRestrictions *SecurityRestrictions `json:"akamaiSecurityRestrictions,omitempty"` APIResources *Resources `json:"apiResources,omitempty"` }
func CloneVersion ¶
func CloneVersion(options *CloneVersionOptions) (*Endpoint, error)
func CreateEndpoint ¶
func CreateEndpoint(options *CreateEndpointOptions) (*Endpoint, error)
func CreateEndpointFromFile ¶
func CreateEndpointFromFile(options *CreateEndpointFromFileOptions) (*Endpoint, error)
func GetVersion ¶
func GetVersion(options *GetVersionOptions) (*Endpoint, error)
func ModifyVersion ¶
func RemoveEndpoint ¶
func RemoveVersion ¶
func RemoveVersion(options *RemoveVersionOptions) (*Endpoint, error)
func UpdateEndpointFromFile ¶
func UpdateEndpointFromFile(options *UpdateEndpointFromFileOptions) (*Endpoint, error)
type EndpointList ¶
type EndpointList struct { APIEndPoints Endpoints `json:"apiEndPoints"` Links Links `json:"links"` Page int `json:"page"` PageSize int `json:"pageSize"` TotalSize int `json:"totalSize"` }
func (*EndpointList) ListEndpoints ¶
func (list *EndpointList) ListEndpoints(options *ListEndpointOptions) error
type ErrorCaching ¶
type GetVersionOptions ¶
type GzipSettings ¶
type GzipSettings struct {
CompressResponse CompressResponseValue `json:"compressResponse"`
}
type ImportResult ¶
type JWTSettings ¶
type JWTSettings struct { Enabled bool `json:"enabled"` Settings struct { Location JWTSettingsLocationValue `json:"location"` ParamName string `json:"paramName"` ClockSkew int `json:"clockSkew"` Validation *struct { Claims []JWTClaim `json:"claims"` RsaPublicKeyA RsaPublicKey `json:"rsaPublicKeyA"` RsaPublicKeyB *RsaPublicKey `json:"rsaPublicKeyB,omitempty"` } `json:"validation"` } `json:"settings"` Resources map[int]JWTSettingsResource `json:"resources"` }
type JWTSettingsLocationValue ¶
type JWTSettingsLocationValue string
const ( JWTSettingsLocationHeader JWTSettingsLocationValue = "HEADER" JWTSettingsLocationCookie JWTSettingsLocationValue = "COOKIE" JWTSettingsLocationQuery JWTSettingsLocationValue = "QUERY" )
type JWTSettingsResource ¶
type JWTSettingsResource struct { ResourceSettings Enabled bool `json:"enabled"` Notes *string `json:"notes,omitempty"` }
type ListEndpointOptions ¶
type ListEndpointOptions struct { ContractId string `url:"contractId,omitempty"` GroupId int `url:"groupId,omitempty"` Category string `url:"category,omitempty"` Contains string `url:"contains,omitempty"` Page int `url:"page,omitempty"` PageSize int `url:"pageSize,omitempty"` Show string `url:show,omitempty` SortBy string `url:"sortBy,omitempty"` SortOrder string `url:"sortOrder,omitempty"` VersionPreference string `url:"versionPreference,omitempty"` }
type ListVersionsOptions ¶
type ListVersionsOptions struct {
EndpointId int
}
type MaxAgeUnitValue ¶
type MaxAgeUnitValue string
type Method ¶
type Method struct { APIResourceMethodID int `json:"apiResourceMethodId"` APIResourceMethod MethodValue `json:"apiResourceMethod"` APIResourceMethodLogicID int `json:"apiResourceMethodLogicId"` APIParameters []Parameters `json:"apiParameters"` }
type MethodValue ¶
type MethodValue string
const ( MethodGet MethodValue = "get" MethodPost MethodValue = "post" MethodPut MethodValue = "put" MethodDelete MethodValue = "delete" MethodHead MethodValue = "head" MethodPatch MethodValue = "patch" MethodOptions MethodValue = "options" )
type Parameters ¶
type Parameters struct { APIChildParameters []*Parameters `json:"apiChildParameters"` APIParameterID int `json:"apiParameterId"` APIParameterRequired bool `json:"apiParameterRequired"` APIParameterName string `json:"apiParameterName"` APIParameterLocation APIParameterLocationValue `json:"apiParameterLocation"` APIParameterType APIParameterTypeValue `json:"apiParameterType"` APIParameterNotes *string `json:"apiParameterNotes"` APIParamLogicID int `json:"apiParamLogicId"` Array bool `json:"array"` APIParameterRestriction struct { RangeRestriction struct { RangeMin int `json:"rangeMin"` RangeMax int `json:"rangeMax"` } `json:"rangeRestriction"` } `json:"apiParameterRestriction"` }
type RemoveVersionOptions ¶
type Resource ¶
type Resource struct { APIResourceID int `json:"apiResourceId"` APIResourceName string `json:"apiResourceName"` ResourcePath string `json:"resourcePath"` Description string `json:"description"` LockVersion int `json:"lockVersion"` APIResourceClonedFromID *int `json:"apiResourceClonedFromId"` APIResourceLogicID int `json:"apiResourceLogicId"` CreatedBy string `json:"createdBy"` CreateDate string `json:"createDate"` UpdatedBy string `json:"updatedBy"` UpdateDate string `json:"updateDate"` APIResourceMethods Methods `json:"apiResourceMethods"` }
type ResourceBaseInfo ¶
type ResourceBaseInfo struct { APIResourceClonedFromID *int `json:"apiResourceClonedFromId"` APIResourceID int `json:"apiResourceId"` APIResourceLogicID int `json:"apiResourceLogicId"` APIResourceName string `json:"apiResourceName"` CreateDate string `json:"createDate"` CreatedBy string `json:"createdBy"` Description *string `json:"description"` Link *string `json:"link"` LockVersion int `json:"lockVersion"` Private bool `json:"private"` ResourcePath string `json:"resourcePath"` UpdateDate string `json:"updateDate"` UpdatedBy string `json:"updatedBy"` }
type ResourceSettings ¶
type ResourceSettings struct { Path string `json:"path"` Methods []MethodValue `json:"methods"` InheritsFromEndpoint bool `json:"inheritsFromEndpoint"` }
type RsaPublicKey ¶
type SecurityRestrictions ¶
type SecurityRestrictions struct { MaxJsonxmlElement int `json:"MAX_JSONXML_ELEMENT,omitempty"` MaxElementNameLength int `json:"MAX_ELEMENT_NAME_LENGTH,omitempty"` MaxDocDepth int `json:"MAX_DOC_DEPTH,omitempty"` PositiveSecurityEnabled int `json:"POSITIVE_SECURITY_ENABLED,omitempty"` MaxStringLength int `json:"MAX_STRING_LENGTH,omitempty"` MaxBodySize int `json:"MAX_BODY_SIZE,omitempty"` MaxIntegerValue int `json:"MAX_INTEGER_VALUE,omitempty"` }
type SecurityScheme ¶
type SecurityScheme struct { SecuritySchemeType string `json:"securitySchemeType,omitempty"` SecuritySchemeDetail *SecuritySchemeDetail `json:"securitySchemeDetail,omitempty"` }
type SecuritySchemeDetail ¶
type StatusValue ¶
type StatusValue string
type Version ¶
type Version struct { CreatedBy string `json:"createdBy"` CreateDate string `json:"createDate"` UpdateDate string `json:"updateDate"` UpdatedBy string `json:"updatedBy"` APIEndPointVersionID int `json:"apiEndPointVersionId"` BasePath string `json:"basePath"` Description *string `json:"description` BasedOn *int `json:"basedOn"` StagingStatus *StatusValue `json:"stagingStatus"` ProductionStatus *StatusValue `json:"productionStatus"` StagingDate *string `json:"stagingDate"` ProductionDate *string `json:"productionDate"` IsVersionLocked bool `json:"isVersionLocked"` AvailableActions []string `json:"availableActions"` VersionNumber int `json:"versionNumber"` LockVersion int `json:"lockVersion"` }
type VersionSummary ¶
type VersionSummary struct { Status StatusValue `json:"status,omitempty"` VersionNumber int `json:"versionNumber,omitempty"` }
type Versions ¶
type Versions struct { APIEndPointID int `json:"apiEndPointId"` APIEndPointName string `json:"apiEndPointName"` APIVersions []Version `json:"apiVersions"` }
func ListVersions ¶
func ListVersions(options *ListVersionsOptions) (*Versions, error)
Click to show internal directories.
Click to hide internal directories.