Documentation ¶
Index ¶
- func Create(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func IsUserAuthorizedToModifyDSID(inf *api.APIInfo, ds uint) (bool, error)
- func IsUserAuthorizedToModifyDSXMLID(inf *api.APIInfo, ds string) (bool, error)
- func IsUserAuthorizedToModifyJobsMadeByUserID(inf *api.APIInfo, u uint) (bool, error)
- func IsUserAuthorizedToModifyJobsMadeByUsername(inf *api.APIInfo, u string) (bool, error)
- func Update(w http.ResponseWriter, r *http.Request)
- type InvalidationJob
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 Delete ¶
func Delete(w http.ResponseWriter, r *http.Request)
Used by DELETE requests to `/jobs`, deletes an existing content invalidation job
func IsUserAuthorizedToModifyDSID ¶
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 ¶
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 ¶
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 ¶
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.
Types ¶
type InvalidationJob ¶
type InvalidationJob struct { api.APIInfoImpl `json:"-"` tc.InvalidationJob }