MCPcopy Index your code
hub / github.com/coder/coder / PatchOrganizationIDPSyncSettings

Method PatchOrganizationIDPSyncSettings

codersdk/idpsync.go:211–223  ·  view source on GitHub ↗
(ctx context.Context, req OrganizationSyncSettings)

Source from the content-addressed store, hash-verified

209}
210
211func (c *Client) PatchOrganizationIDPSyncSettings(ctx context.Context, req OrganizationSyncSettings) (OrganizationSyncSettings, error) {
212 res, err := c.Request(ctx, http.MethodPatch, "/api/v2/settings/idpsync/organization", req)
213 if err != nil {
214 return OrganizationSyncSettings{}, xerrors.Errorf("make request: %w", err)
215 }
216 defer res.Body.Close()
217
218 if res.StatusCode != http.StatusOK {
219 return OrganizationSyncSettings{}, ReadBodyAsError(res)
220 }
221 var resp OrganizationSyncSettings
222 return resp, json.NewDecoder(res.Body).Decode(&resp)
223}
224
225type PatchOrganizationIDPSyncConfigRequest struct {
226 Field string `json:"field"`

Callers 5

organizationSettingsMethod · 0.80
TestUserOIDCFunction · 0.80

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
ErrorfMethod · 0.45

Tested by 4

TestUserOIDCFunction · 0.64