invalidationjobs

package
v5.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 17 Imported by: 0

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.

func CreateUserJob

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

Creates a new job for the current user (via POST request to `/user/current/jobs`) this uses its own special format encoded in the tc.UserInvalidationJobInput structure

func Delete

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

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

func GetUserJobs

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

Gets all jobs that were created by the requesting user, and returns them in in a special format encoded in the tc.UserInvalidationJob structure

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.

Types

type InvalidationJob

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

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.

Jump to

Keyboard shortcuts

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