MCPcopy Create free account
hub / github.com/elimity-com/scim / ResourceHandler

Interface ResourceHandler

resource_handler.go:94–116  ·  view source on GitHub ↗

ResourceHandler represents a set of callback method that connect the SCIM server with a provider of a certain resource.

Source from the content-addressed store, hash-verified

92
93// ResourceHandler represents a set of callback method that connect the SCIM server with a provider of a certain resource.
94type 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}

Callers 12

resourcePostHandlerMethod · 0.65
getFilterFunction · 0.65
getIntQueryParamFunction · 0.65
resourceGetHandlerMethod · 0.65
resourcesGetHandlerMethod · 0.65
resourcePutHandlerMethod · 0.65
resourceDeleteHandlerMethod · 0.65
resourcePatchHandlerMethod · 0.65

Implementers 5

testResourceHandlerresource_handler_test.go
oktaGroupResourceHandlerinternal/idp_test/okta_util_test.go
oktaUserResourceHandlerinternal/idp_test/okta_util_test.go
azureADGroupResourceHandlerinternal/idp_test/azuread_util_test.go
azureADUserResourceHandlerinternal/idp_test/azuread_util_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…