Documentation ¶
Index ¶
- func Create(w http.ResponseWriter, r *http.Request)
- func CreateUserJob(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func GetUserJobs(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 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 ¶
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 }