ResourceHandler represents a set of callback method that connect the SCIM server with a provider of a certain resource.
| 92 | |
| 93 | // ResourceHandler represents a set of callback method that connect the SCIM server with a provider of a certain resource. |
| 94 | type ResourceHandler interface { |
| 95 | // Create stores given attributes. Returns a resource with the attributes that are stored and a (new) unique identifier. |
| 96 | Create(r *http.Request, attributes ResourceAttributes) (Resource, error) |
| 97 | // Get returns the resource corresponding with the given identifier. |
| 98 | Get(r *http.Request, id string) (Resource, error) |
| 99 | // GetAll returns a paginated list of resources. |
| 100 | // An empty list of resources will be represented as `null` in the JSON response if `nil` is assigned to the |
| 101 | // Page.Resources. Otherwise, is an empty slice is assigned, an empty list will be represented as `[]`. |
| 102 | GetAll(r *http.Request, params ListRequestParams) (Page, error) |
| 103 | // Replace replaces ALL existing attributes of the resource with given identifier. Given attributes that are empty |
| 104 | // are to be deleted. Returns a resource with the attributes that are stored. |
| 105 | Replace(r *http.Request, id string, attributes ResourceAttributes) (Resource, error) |
| 106 | // Delete removes the resource with corresponding ID. |
| 107 | Delete(r *http.Request, id string) error |
| 108 | // Patch update one or more attributes of a SCIM resource using a sequence of |
| 109 | // operations to "add", "remove", or "replace" values. |
| 110 | // If you return no Resource.Attributes, a 204 No Content status code will be returned. |
| 111 | // This case is only valid in the following scenarios: |
| 112 | // 1. the Add/Replace operation should return No Content only when the value already exists AND is the same. |
| 113 | // 2. the Remove operation should return No Content when the value to be remove is already absent. |
| 114 | // More information in Section 3.5.2 of RFC 7644: https://tools.ietf.org/html/rfc7644#section-3.5.2 |
| 115 | Patch(r *http.Request, id string, operations []PatchOperation) (Resource, error) |
| 116 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…