edgecname

package
v0.1.22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEdgeCnameParams

type AddEdgeCnameParams struct {
	EdgeCname     EdgeCname
	AccountNumber string
}

func NewAddEdgeCnameParams

func NewAddEdgeCnameParams() *AddEdgeCnameParams

type DeleteEdgeCnameParams

type DeleteEdgeCnameParams struct {
	EdgeCname     EdgeCnameGetOK
	AccountNumber string
}

func NewDeleteEdgeCnameParams

func NewDeleteEdgeCnameParams() *DeleteEdgeCnameParams

type EdgeCname

type EdgeCname struct {
	// Sets the name that will be assigned to the edge CNAME. It should only
	// contain lower-case alphanumeric characters, dashes, and periods.
	// The name specified for this parameter should also be defined as a CNAME
	// record on a DNS server. The CNAME record defined on the DNS server should
	// point to the CDN hostname (e.g., wpc.0001.omegacdn.net) for the platform
	// identified by the MediaTypeId request parameter.
	Name string `json:"Name,omitempty"`

	// Identifies a location on the origin server. This string should specify
	// the relative path from the root folder of the origin server to the
	// desired location. Set this parameter to blank to point the edge CNAME to
	// the root folder of the origin server.
	DirPath string `json:"DirPath,omitempty"`

	// Determines whether hits and data transferred statistics will be tracked
	// for this edge CNAME. Logged data can be viewed through the Custom Reports
	// module. Valid values are:
	// 0: Disabled (Default Value).
	// 1: Enabled. CDN activity on this edge CNAME will be logged.
	EnableCustomReports int `json:"EnableCustomReports,omitempty"`

	// Identifies whether an edge CNAME will be created for a CDN origin server
	// or a customer origin server. Valid values are:
	// -1: Indicates that you would like to create an edge CNAME for our CDN
	// storage service. This type of edge CNAME points to the root folder of a
	// CDN origin server (e.g., /000001).
	// CustomerOriginID: Specifying an ID for an existing customer origin
	// configuration indicates that you would like to create an edge CNAME for
	// that customer origin. This type of edge CNAME points to the root folder
	// of that customer origin server (e.g., /800001/CustomerOrigin).
	//
	// Retrieve a list of customer origin IDs through the ADN, HTTP Large, or
	// HTTP Small version of the Get All Customer Origins endpoint.
	OriginID int `json:"OriginId,omitempty"`

	// Identifies the platform on which the edge CNAME will be created.
	// Valid values are:
	// 3: HTTP Large (Includes SSL Traffic)
	// 8: HTTP Small (Includes SSL Traffic)
	// 14: Application Delivery Network (ADN) – (Includes SSL Traffic)
	MediaTypeID int `json:"MediaTypeId,omitempty"`
}

EdgeCname is a user-friendly URL, which is known as an edge CNAME URL, instead of a CDN URL. Edge CNAME URLs are typically shorter and easier to remember than CDN URLs. Additionally, you may set up an edge CNAME URL to reflect your current workflow. Doing so allows you to transition to our service through a quick DNS update.

For more information on Edge CNAME management, please visit the following URLa: https://docs.edgecast.com/cdn/index.html#Origin_Server_-_File_Storage/Creating_an_Alias_for_a_CDN_URL.htm https://developer.edgecast.com/cdn/api/index.html#Media_Management/Edge_CNAMEs.htm

type EdgeCnameGetOK

type EdgeCnameGetOK struct {
	EdgeCname

	// Indicates the ID for the edge CNAME.
	ID int `json:"Id,omitempty"`

	// Indicates the origin identifier, the account number, and the relative
	// path associated with the edge CNAME.
	// Format: /yyAN/Path.
	// yy: Indicates the origin identifier (e.g., 00, 80, etc.) associated with
	// the edge CNAME.
	// AN: Indicates the CDN customer account number associated with the edge
	// CNAME.
	// Path: Indicates the relative path to the location on the origin server to
	// which the edge CNAME is pointed. This relative path is also returned by
	// the DirPath response parameter. If an edge CNAME points to a customer
	// origin server, then this relative path will always start with the name of
	// the customer origin configuration (e.g., /800001/myorigin).
	OriginString string `json:"OriginString,omitempty"`
}

EdgeCnameGetOK is used specifically when retrieving an Edge CNAME and contains additional read-only properties.

type EdgeCnameService

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

Edge Cname service interacts with the EdgeCast API for managing Edge Cnames

func New

func New(config edgecast.SDKConfig) (*EdgeCnameService, error)

New creates a new Edge Cname service

func (*EdgeCnameService) AddEdgeCname

func (svc *EdgeCnameService) AddEdgeCname(
	params AddEdgeCnameParams,
) (*int, error)

AddEdgeCname creates an edge CNAME.

func (*EdgeCnameService) DeleteEdgeCname

func (svc *EdgeCnameService) DeleteEdgeCname(
	params DeleteEdgeCnameParams,
) error

DeleteEdgeCname deletes an edge CNAME.

func (*EdgeCnameService) GetAllEdgeCnames

func (svc *EdgeCnameService) GetAllEdgeCnames(
	params GetAllEdgeCnameParams,
) (*[]EdgeCnameGetOK, error)

GetAllEdgeCnames retrieves all edge CNAMEs for the provided platform.

func (*EdgeCnameService) GetEdgeCname

func (svc *EdgeCnameService) GetEdgeCname(
	params GetEdgeCnameParams,
) (*EdgeCnameGetOK, error)

GetEdgeCname retrieves a single edge CNAME configuration.

func (*EdgeCnameService) GetEdgeCnamePropagationStatus

func (svc *EdgeCnameService) GetEdgeCnamePropagationStatus(
	params GetEdgeCnamePropagationStatus,
) (*ecmodels.PropagationStatus, error)

GetEdgeCnamePropagationStatus retrieves the propagation status for an edge CNAME configuration.

func (*EdgeCnameService) UpdateEdgeCname

func (svc *EdgeCnameService) UpdateEdgeCname(
	params UpdateEdgeCnameParams,
) (*int, error)

UpdateEdgeCname updates the configuration for the specified edge CNAME.

type GetAllEdgeCnameParams

type GetAllEdgeCnameParams struct {
	AccountNumber string
	Platform      enums.Platform
}

func NewGetAllEdgeCnameParams

func NewGetAllEdgeCnameParams() *GetAllEdgeCnameParams

type GetEdgeCnameParams

type GetEdgeCnameParams struct {
	EdgeCnameID   int
	AccountNumber string
}

func NewGetEdgeCnameParams

func NewGetEdgeCnameParams() *GetEdgeCnameParams

type GetEdgeCnamePropagationStatus

type GetEdgeCnamePropagationStatus struct {
	EdgeCnameID   int
	AccountNumber string
}

func NewGetEdgeCnamePropagationStatusParams

func NewGetEdgeCnamePropagationStatusParams() *GetEdgeCnamePropagationStatus

type UpdateEdgeCnameParams

type UpdateEdgeCnameParams struct {
	EdgeCname     EdgeCnameGetOK
	AccountNumber string
}

func NewUpdateEdgeCnameParams

func NewUpdateEdgeCnameParams() *UpdateEdgeCnameParams

Jump to

Keyboard shortcuts

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