Documentation ¶
Overview ¶
Package clientlists provides access to Akamai Client Lists APIs
Index ¶
- Constants
- Variables
- type Activation
- type ActivationAction
- type ActivationNetwork
- type ActivationParams
- type ActivationStatus
- type ClientFunc
- type ClientList
- type ClientListType
- type ClientLists
- type CreateActivationRequest
- type CreateActivationResponse
- type CreateClientListRequest
- type CreateClientListResponse
- type DeleteClientListRequest
- type Error
- type GetActivationRequest
- type GetActivationResponse
- type GetActivationStatusRequest
- type GetActivationStatusResponse
- type GetClientListRequest
- type GetClientListResponse
- type GetClientListsRequest
- type GetClientListsResponse
- type ListContent
- type ListItemContent
- type ListItemPayload
- type Lists
- type Mock
- func (p *Mock) CreateActivation(ctx context.Context, params CreateActivationRequest) (*CreateActivationResponse, error)
- func (p *Mock) CreateClientList(ctx context.Context, params CreateClientListRequest) (*CreateClientListResponse, error)
- func (p *Mock) DeleteClientList(ctx context.Context, params DeleteClientListRequest) error
- func (p *Mock) GetActivation(ctx context.Context, params GetActivationRequest) (*GetActivationResponse, error)
- func (p *Mock) GetActivationStatus(ctx context.Context, params GetActivationStatusRequest) (*GetActivationStatusResponse, error)
- func (p *Mock) GetClientList(ctx context.Context, params GetClientListRequest) (*GetClientListResponse, error)
- func (p *Mock) GetClientLists(ctx context.Context, params GetClientListsRequest) (*GetClientListsResponse, error)
- func (p *Mock) UpdateClientList(ctx context.Context, params UpdateClientListRequest) (*UpdateClientListResponse, error)
- func (p *Mock) UpdateClientListItems(ctx context.Context, params UpdateClientListItemsRequest) (*UpdateClientListItemsResponse, error)
- type Option
- type UpdateClientList
- type UpdateClientListItems
- type UpdateClientListItemsRequest
- type UpdateClientListItemsResponse
- type UpdateClientListRequest
- type UpdateClientListResponse
Constants ¶
const ( // Staging activation network value STAGING Staging ActivationNetwork = "STAGING" // Production activation network value PRODUCTION Production ActivationNetwork = "PRODUCTION" // Inactive activation status value INACTIVE Inactive ActivationStatus = "INACTIVE" // PendingActivation activation status value PENDING_ACTIVATION PendingActivation ActivationStatus = "PENDING_ACTIVATION" // Active activation status value ACTIVE Active ActivationStatus = "ACTIVE" // Modified activation status value MODIFIED Modified ActivationStatus = "MODIFIED" // PendingDeactivation activation status value PENDING_DEACTIVATION PendingDeactivation ActivationStatus = "PENDING_DEACTIVATION" // Failed activation status value FAILED Failed ActivationStatus = "FAILED" // Activate action value ACTIVATE Activate ActivationAction = "ACTIVATE" )
Variables ¶
var ( // ErrStructValidation is returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
Functions ¶
This section is empty.
Types ¶
type Activation ¶
type Activation interface { // GetActivation retrieves details of a specified activation ID. // // See: https://techdocs.akamai.com/client-lists/reference/get-retrieve-activation-status GetActivation(ctx context.Context, params GetActivationRequest) (*GetActivationResponse, error) // GetActivationStatus retrieves activation status for a client list in a network environment. // // See: https://techdocs.akamai.com/client-lists/reference/get-activation-status GetActivationStatus(ctx context.Context, params GetActivationStatusRequest) (*GetActivationStatusResponse, error) // CreateActivation activates a client list // // See: https://techdocs.akamai.com/client-lists/reference/post-activate-list CreateActivation(ctx context.Context, params CreateActivationRequest) (*CreateActivationResponse, error) }
Activation interface to support activating client lists.
type ActivationNetwork ¶
type ActivationNetwork string
ActivationNetwork is a type for network field
type ActivationParams ¶
type ActivationParams struct { Action ActivationAction `json:"action"` Comments string `json:"comments"` Network ActivationNetwork `json:"network"` NotificationRecipients []string `json:"notificationRecipients"` SiebelTicketID string `json:"siebelTicketId"` }
ActivationParams contains activation general parameters
type ActivationStatus ¶
type ActivationStatus string
ActivationStatus is a type for activationStatus field
type ClientFunc ¶
type ClientFunc func(sess session.Session, opts ...Option) ClientLists
ClientFunc is a clientlists client new method, this can be used for mocking
type ClientList ¶
type ClientList struct { ListContent Items []ListItemContent }
ClientList contains list content and items
type ClientListType ¶
type ClientListType string
ClientListType represents client list type
const ( // IP for ip type list type IP ClientListType = "IP" // GEO for geo/countries list type GEO ClientListType = "GEO" // ASN for AS Number list type ASN ClientListType = "ASN" // TLSFingerprint for TLS Fingerprint list type TLSFingerprint ClientListType = "TLS_FINGERPRINT" // FileHash for file hash type list FileHash ClientListType = "FILE_HASH" )
type ClientLists ¶
type ClientLists interface { Activation Lists }
ClientLists is the clientlists api interface
type CreateActivationRequest ¶
type CreateActivationRequest struct { ListID string ActivationParams }
CreateActivationRequest contains activation request parameters for CreateActivation method
type CreateActivationResponse ¶
type CreateActivationResponse GetActivationStatusResponse
CreateActivationResponse contains activation response
type CreateClientListRequest ¶
type CreateClientListRequest struct { ContractID string `json:"contractId"` GroupID int64 `json:"groupId"` Name string `json:"name"` Type ClientListType `json:"type"` Notes string `json:"notes"` Tags []string `json:"tags"` Items []ListItemPayload `json:"items"` }
CreateClientListRequest contains request params for CreateClientList method
type CreateClientListResponse ¶
type CreateClientListResponse GetClientListResponse
CreateClientListResponse contains response from CreateClientList method
type DeleteClientListRequest ¶
type DeleteClientListRequest struct {
ListID string
}
DeleteClientListRequest contains request params for DeleteClientList method
type Error ¶
type Error struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance,omitempty"` BehaviorName string `json:"behaviorName,omitempty"` ErrorLocation string `json:"errorLocation,omitempty"` StatusCode int `json:"-"` }
Error is a Client Lists error interface
type GetActivationRequest ¶
type GetActivationRequest struct {
ActivationID int64
}
GetActivationRequest contains activation request param
type GetActivationResponse ¶
type GetActivationResponse struct { ActivationID int64 `json:"activationId"` CreateDate string `json:"createDate"` CreatedBy string `json:"createdBy"` Fast bool `json:"fast"` InitialActivation bool `json:"initialActivation"` ActivationStatus ActivationStatus `json:"activationStatus"` ListID string `json:"listId"` Version int64 `json:"version"` ActivationParams }
GetActivationResponse contains activation details
type GetActivationStatusRequest ¶
type GetActivationStatusRequest struct { ListID string Network ActivationNetwork }
GetActivationStatusRequest contains request params for GetActivationStatus
type GetActivationStatusResponse ¶
type GetActivationStatusResponse struct { Action ActivationAction `json:"action"` ActivationID int64 `json:"activationId"` ActivationStatus ActivationStatus `json:"activationStatus"` Comments string `json:"comments"` CreateDate string `json:"createDate"` CreatedBy string `json:"createdBy"` ListID string `json:"listId"` Network ActivationNetwork `json:"network"` NotificationRecipients []string `json:"notificationRecipients"` SiebelTicketID string `json:"siebelTicketId"` Version int64 `json:"version"` }
GetActivationStatusResponse contains activation status response
type GetClientListRequest ¶
GetClientListRequest contains request params for GetClientList method
type GetClientListResponse ¶
type GetClientListResponse struct { ListContent ContractID string `json:"contractId"` GroupID int64 `json:"groupId"` GroupName string `json:"groupName"` Items []ListItemContent `json:"items"` }
GetClientListResponse contains response from GetClientList method
type GetClientListsRequest ¶
type GetClientListsRequest struct { Type []ClientListType Name string Search string IncludeItems bool IncludeDeprecated bool IncludeNetworkList bool Page *int PageSize *int Sort []string }
GetClientListsRequest contains request parameters for GetClientLists method
type GetClientListsResponse ¶
type GetClientListsResponse struct {
Content []ClientList
}
GetClientListsResponse contains response parameters from GetClientLists method
type ListContent ¶
type ListContent struct { Name string `json:"name"` Type ClientListType `json:"type"` Notes string `json:"notes"` Tags []string `json:"tags"` ListID string `json:"listId"` Version int64 `json:"version"` ItemsCount int64 `json:"itemsCount"` CreateDate string `json:"createDate"` CreatedBy string `json:"createdBy"` UpdateDate string `json:"updateDate"` UpdatedBy string `json:"updatedBy"` ProductionActivationStatus string `json:"productionActivationStatus"` StagingActivationStatus string `json:"stagingActivationStatus"` ProductionActiveVersion int64 `json:"productionActiveVersion"` StagingActiveVersion int64 `json:"stagingActiveVersion"` ListType string `json:"listType"` ReadOnly bool `json:"readOnly"` Deprecated bool `json:"deprecated"` }
ListContent contains list content
type ListItemContent ¶
type ListItemContent struct { Value string `json:"value"` Tags []string `json:"tags"` Description string `json:"description"` ExpirationDate string `json:"expirationDate"` CreateDate string `json:"createDate"` CreatedBy string `json:"createdBy"` CreatedVersion int64 `json:"createdVersion"` ProductionStatus string `json:"productionStatus"` StagingStatus string `json:"stagingStatus"` Type ClientListType `json:"type"` UpdateDate string `json:"updateDate"` UpdatedBy string `json:"updatedBy"` }
ListItemContent contains client list item information
type ListItemPayload ¶
type ListItemPayload struct { Value string `json:"value"` Tags []string `json:"tags"` Description string `json:"description"` ExpirationDate string `json:"expirationDate"` }
ListItemPayload contains item's editable fields to use as update/create/delete payload
type Lists ¶
type Lists interface { // GetClientLists lists all client lists accessible for an authenticated user // // See: https://techdocs.akamai.com/client-lists/reference/get-lists GetClientLists(ctx context.Context, params GetClientListsRequest) (*GetClientListsResponse, error) // GetClientList retrieves client list with specific list id // // See: https://techdocs.akamai.com/client-lists/reference/get-list GetClientList(ctx context.Context, params GetClientListRequest) (*GetClientListResponse, error) // CreateClientList creates a new client list // // See: https://techdocs.akamai.com/client-lists/reference/post-create-list CreateClientList(ctx context.Context, params CreateClientListRequest) (*CreateClientListResponse, error) // UpdateClientList updates existing client list // // See: https://techdocs.akamai.com/client-lists/reference/put-update-list UpdateClientList(ctx context.Context, params UpdateClientListRequest) (*UpdateClientListResponse, error) // UpdateClientListItems updates items/entries of an existing client lists // // See: https://techdocs.akamai.com/client-lists/reference/post-update-items UpdateClientListItems(ctx context.Context, params UpdateClientListItemsRequest) (*UpdateClientListItemsResponse, error) // DeleteClientList removes a client list // // See: https://techdocs.akamai.com/client-lists/reference/delete-list DeleteClientList(ctx context.Context, params DeleteClientListRequest) error }
Lists interface to support creating, retrieving, updating and removing client lists.
type Mock ¶
Mock is ClientList API Mock
func (*Mock) CreateActivation ¶
func (p *Mock) CreateActivation(ctx context.Context, params CreateActivationRequest) (*CreateActivationResponse, error)
func (*Mock) CreateClientList ¶
func (p *Mock) CreateClientList(ctx context.Context, params CreateClientListRequest) (*CreateClientListResponse, error)
func (*Mock) DeleteClientList ¶
func (p *Mock) DeleteClientList(ctx context.Context, params DeleteClientListRequest) error
func (*Mock) GetActivation ¶
func (p *Mock) GetActivation(ctx context.Context, params GetActivationRequest) (*GetActivationResponse, error)
func (*Mock) GetActivationStatus ¶
func (p *Mock) GetActivationStatus(ctx context.Context, params GetActivationStatusRequest) (*GetActivationStatusResponse, error)
func (*Mock) GetClientList ¶
func (p *Mock) GetClientList(ctx context.Context, params GetClientListRequest) (*GetClientListResponse, error)
func (*Mock) GetClientLists ¶
func (p *Mock) GetClientLists(ctx context.Context, params GetClientListsRequest) (*GetClientListsResponse, error)
GetClientLists return list of client lists
func (*Mock) UpdateClientList ¶
func (p *Mock) UpdateClientList(ctx context.Context, params UpdateClientListRequest) (*UpdateClientListResponse, error)
func (*Mock) UpdateClientListItems ¶
func (p *Mock) UpdateClientListItems(ctx context.Context, params UpdateClientListItemsRequest) (*UpdateClientListItemsResponse, error)
type UpdateClientList ¶
type UpdateClientList struct { Name string `json:"name"` Notes string `json:"notes"` Tags []string `json:"tags"` }
UpdateClientList contains the body of client list update request
type UpdateClientListItems ¶
type UpdateClientListItems struct { Append []ListItemPayload `json:"append"` Update []ListItemPayload `json:"update"` Delete []ListItemPayload `json:"delete"` }
UpdateClientListItems contains the body of client list items update request
type UpdateClientListItemsRequest ¶
type UpdateClientListItemsRequest struct { UpdateClientListItems ListID string }
UpdateClientListItemsRequest contains request params for UpdateClientListItems method
type UpdateClientListItemsResponse ¶
type UpdateClientListItemsResponse struct { Appended []ListItemContent `json:"appended"` Updated []ListItemContent `json:"updated"` Deleted []ListItemContent `json:"deleted"` }
UpdateClientListItemsResponse contains response from UpdateClientListItems method
type UpdateClientListRequest ¶
type UpdateClientListRequest struct { UpdateClientList ListID string }
UpdateClientListRequest contains request params for UpdateClientList method
type UpdateClientListResponse ¶
type UpdateClientListResponse struct { ListContent ContractID string `json:"contractId"` GroupName string `json:"groupName"` GroupID int64 `json:"groupId"` }
UpdateClientListResponse contains response from UpdateClientList method