invalidationjobs

package
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 20 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request)

Used by POST requests to `/jobs`, creates a new content invalidation job from the provided request body.

Deprecated. To be used only with versions less than 4.0

func CreateV40

func CreateV40(w http.ResponseWriter, r *http.Request)

Used by POST requests to `/jobs`, creates a new content invalidation job from the provided request body.

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

Used by DELETE requests to `/jobs`, deletes an existing content invalidation job

Deprecated. To be used only with versions less than 4.0

func DeleteV40

func DeleteV40(w http.ResponseWriter, r *http.Request)

Used by DELETE requests to `/jobs`, deletes an existing content invalidation job

func IsUserAuthorizedToModifyDSID

func IsUserAuthorizedToModifyDSID(inf *api.APIInfo, ds uint) (bool, error)

Checks if the current user's (identified in the APIInfo) tenant has permissions to edit a Delivery Service. `ds` is expected to be the integral, unique identifer of the Delivery Service in question.

This returns, in order, a boolean that indicates whether or not the current user has the required tenancy to modify the indicated Delivery Service, and an error indicating what, if anything, went wrong during the check. returned errors is not nil, otherwise its value is undefined.

Note: If no such delivery service exists, the return values shall indicate that the user isn't authorized.

func IsUserAuthorizedToModifyDSXMLID

func IsUserAuthorizedToModifyDSXMLID(inf *api.APIInfo, ds string) (bool, error)

Checks if the current user's (identified in the APIInfo) tenant has permissions to edit a Delivery Service. `ds` is expected to be the "xml_id" of the Delivery Service in question.

This returns, in order, a boolean that indicates whether or not the current user has the required tenancy to modify the indicated Delivery Service, and an error indicating what, if anything, went wrong during the check. returned errors is not nil, otherwise its value is undefined.

Note: If no such delivery service exists, the return values shall indicate that the user isn't authorized.

func IsUserAuthorizedToModifyJobsMadeByUserID

func IsUserAuthorizedToModifyJobsMadeByUserID(inf *api.APIInfo, u uint) (bool, error)

Checks if the current user's (identified in the APIInfo) tenant has permissions to edit on par with the user identified by `u`. `u` is expected to be the integral, unique identifer of the user in question (not the current, requesting user).

This returns, in order, a boolean that indicates whether or not the current user has the required tenancy to modify the indicated Delivery Service, and an error indicating what, if anything, went wrong during the check. returned errors is not nil, otherwise its value is undefined.

Note: If no such delivery service exists, the return values shall indicate that the user isn't authorized.

func IsUserAuthorizedToModifyJobsMadeByUsername

func IsUserAuthorizedToModifyJobsMadeByUsername(inf *api.APIInfo, u string) (bool, error)

Checks if the current user's (identified in the APIInfo) tenant has permissions to edit on par with the user identified by `u`. `u` is expected to be the username of the user in question (not the current, requesting user).

This returns, in order, a boolean that indicates whether or not the current user has the required tenancy to modify the indicated Delivery Service, and an error indicating what, if anything, went wrong during the check. returned errors is not nil, otherwise its value is undefined.

Note: If no such delivery service exists, the return values shall indicate that the user isn't authorized.

func Update

func Update(w http.ResponseWriter, r *http.Request)

Used by PUT requests to `/jobs`, replaces an existing content invalidation job with the provided request body.

Deprecated. To be used only with versions less than 4.0

func UpdateV40

func UpdateV40(w http.ResponseWriter, r *http.Request)

Used by PUT requests to `/jobs`, replaces an existing content invalidation job with the provided request body.

Types

type InvalidationJob

type InvalidationJob struct {
	api.APIInfoImpl `json:"-"`
	tc.InvalidationJob
}

Deprecated, only to be used with versions below 4.0

func (*InvalidationJob) Read

func (job *InvalidationJob) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)

Used by GET requests to `/jobs`, simply returns a filtered list of content invalidation jobs according to the provided query parameters.

Deprecated. To be used only with versions less than 4.0

type InvalidationJobV4

type InvalidationJobV4 struct {
	api.APIInfoImpl `json:"-"`
	tc.InvalidationJobV4
}

func (*InvalidationJobV4) Read

func (job *InvalidationJobV4) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)

Used by GET requests to `/jobs`, simply returns a filtered list of content invalidation jobs according to the provided query parameters.

Jump to

Keyboard shortcuts

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