Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type Address
- type AuthenticationScheme
- type AuthenticationSchemes
- type BasicAuth
- type BulkSupported
- type Configuration
- type Email
- type EnterpriseUser
- type ErrorResponse
- type FilterSupported
- type Meta
- type Name
- type PatchOperation
- type PhoneNumber
- type Photo
- type SearchRequest
- type ServiceProviderConfig
- type ServiceProviderConfigApiService
- type Supported
- type User
- type UserApiService
- func (a *UserApiService) CreateUser(ctx context.Context, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
- func (a *UserApiService) DeleteUser(ctx context.Context, id string) (*http.Response, error)
- func (a *UserApiService) GetUserById(ctx context.Context, id string) (UserResponse, *http.Response, error)
- func (a *UserApiService) PatchUser(ctx context.Context, id string, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
- func (a *UserApiService) ReplaceUser(ctx context.Context, id string, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
- func (a *UserApiService) SearchViaGet(ctx context.Context, localVarOptionals map[string]interface{}) (UserSearchResponse, *http.Response, error)
- func (a *UserApiService) SearchViaPost(ctx context.Context, localVarOptionals map[string]interface{}) (UserSearchResponse, *http.Response, error)
- type UserPatch
- type UserResponse
- type UserSearchResponse
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct {
// API Services
ServiceProviderConfigApi *ServiceProviderConfigApiService
UserApi *UserApiService
// contains filtered or unexported fields
}
APIClient manages communication with the SCIM API API v0.1.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
// Operation is the name of the swagger operation.
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
Payload []byte `json:"-"`
}
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AuthenticationScheme ¶
type AuthenticationSchemes ¶
type AuthenticationSchemes struct {
AuthenticationSchemes []AuthenticationScheme `json:"authenticationSchemes,omitempty"`
}
type BasicAuth ¶
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BulkSupported ¶
type Configuration ¶
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client
}
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type EnterpriseUser ¶
type EnterpriseUser struct {
Department string `json:"department,omitempty"`
}
type ErrorResponse ¶
type ErrorResponse struct {
// detail error message
Detail string `json:"detail,omitempty"`
Schemas []string `json:"schemas,omitempty"`
// bad request type when status code is 400
ScimType string `json:"scimType,omitempty"`
// same as HTTP status code, e.g. 400, 401, etc.
Status string `json:"status,omitempty"`
}
type FilterSupported ¶
type Meta ¶
type Meta struct {
Created time.Time `json:"created,omitempty"`
LastModified time.Time `json:"lastModified,omitempty"`
// resource location URI
Location string `json:"location,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
}
resource metadata
type PatchOperation ¶
type PhoneNumber ¶
type SearchRequest ¶
type SearchRequest struct {
// page size
Count int32 `json:"count,omitempty"`
// only support 'userName' or 'email' filter expressions for now
Filter string `json:"filter,omitempty"`
Schemas []string `json:"schemas,omitempty"`
// start index (1-based)
StartIndex int32 `json:"startIndex,omitempty"`
}
type ServiceProviderConfig ¶
type ServiceProviderConfig struct {
AuthenticationSchemes *AuthenticationSchemes `json:"authenticationSchemes,omitempty"`
Bulk *BulkSupported `json:"bulk,omitempty"`
ChangePassword *Supported `json:"changePassword,omitempty"`
Etag *Supported `json:"etag,omitempty"`
Filter *FilterSupported `json:"filter,omitempty"`
Patch *Supported `json:"patch,omitempty"`
Schemas []string `json:"schemas,omitempty"`
Sort *Supported `json:"sort,omitempty"`
XmlDataFormat *Supported `json:"xmlDataFormat,omitempty"`
}
type ServiceProviderConfigApiService ¶
type ServiceProviderConfigApiService service
func (*ServiceProviderConfigApiService) GetServiceProviderConfig ¶
func (a *ServiceProviderConfigApiService) GetServiceProviderConfig(ctx context.Context) (ServiceProviderConfig, *http.Response, error)
ServiceProviderConfigApiService get service provider config * @param ctx context.Context for authentication, logging, tracing, etc. @return ServiceProviderConfig
type User ¶
type User struct {
// user status
Active bool `json:"active,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
// Emails []Email `json:"emails"`
Emails []Email `json:"emails,omitempty"`
// external unique resource id defined by provisioning client
ExternalId string `json:"externalId,omitempty"`
// unique resource id defined by RingCentral
Id string `json:"id,omitempty"`
Name *Name `json:"name,omitempty"`
PhoneNumbers []PhoneNumber `json:"phoneNumbers,omitempty"`
Photos []Photo `json:"photos,omitempty"`
Schemas []string `json:"schemas,omitempty"`
Urnietfparamsscimschemasextensionenterprise20User *EnterpriseUser `json:"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User,omitempty"`
// MUST be same as work type email address
//UserName string `json:"userName"`
UserName string `json:"userName,omitempty"`
}
type UserApiService ¶
type UserApiService service
func (*UserApiService) CreateUser ¶
func (a *UserApiService) CreateUser(ctx context.Context, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
UserApiService create a user
* @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "body" (User) a new user without 'id'
@return UserResponse
func (*UserApiService) DeleteUser ¶
UserApiService delete a user
* @param ctx context.Context for authentication, logging, tracing, etc. @param id user id @return
func (*UserApiService) GetUserById ¶
func (a *UserApiService) GetUserById(ctx context.Context, id string) (UserResponse, *http.Response, error)
UserApiService get a user by id
* @param ctx context.Context for authentication, logging, tracing, etc. @param id user id @return UserResponse
func (*UserApiService) PatchUser ¶
func (a *UserApiService) PatchUser(ctx context.Context, id string, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
UserApiService partially update/patch a user
* @param ctx context.Context for authentication, logging, tracing, etc. @param id user id @param optional (nil or map[string]interface{}) with one or more of:
@param "body" (UserPatch) patch operations list
@return UserResponse
func (*UserApiService) ReplaceUser ¶
func (a *UserApiService) ReplaceUser(ctx context.Context, id string, localVarOptionals map[string]interface{}) (UserResponse, *http.Response, error)
UserApiService fully update/replace a user
* @param ctx context.Context for authentication, logging, tracing, etc. @param id user id @param optional (nil or map[string]interface{}) with one or more of:
@param "body" (User) an existing user
@return UserResponse
func (*UserApiService) SearchViaGet ¶
func (a *UserApiService) SearchViaGet(ctx context.Context, localVarOptionals map[string]interface{}) (UserSearchResponse, *http.Response, error)
UserApiService search or list users
* @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "filter" (string) only support 'userName' or 'email' filter expressions for now @param "startIndex" (int32) start index (1-based) @param "count" (int32) page size
@return UserSearchResponse
func (*UserApiService) SearchViaPost ¶
func (a *UserApiService) SearchViaPost(ctx context.Context, localVarOptionals map[string]interface{}) (UserSearchResponse, *http.Response, error)
UserApiService search or list users
* @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "body" (SearchRequest) search parameters
@return UserSearchResponse
type UserPatch ¶
type UserPatch struct {
// patch operations list
Operations []PatchOperation `json:"Operations"`
Schemas []string `json:"schemas"`
}
type UserResponse ¶
type UserResponse struct {
// user status
Active bool `json:"active,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
Emails []Email `json:"emails"`
// external unique resource id defined by provisioning client
ExternalId string `json:"externalId,omitempty"`
// unique resource id defined by RingCentral
Id string `json:"id,omitempty"`
Name *Name `json:"name"`
PhoneNumbers []PhoneNumber `json:"phoneNumbers,omitempty"`
Photos []Photo `json:"photos,omitempty"`
Schemas []string `json:"schemas"`
Urnietfparamsscimschemasextensionenterprise20User *EnterpriseUser `json:"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User,omitempty"`
// MUST be same as work type email address
UserName string `json:"userName"`
Meta *Meta `json:"meta,omitempty"`
}
type UserSearchResponse ¶
type UserSearchResponse struct {
// user list
Resources []UserResponse `json:"Resources,omitempty"`
ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
Schemas []string `json:"schemas,omitempty"`
StartIndex int64 `json:"startIndex,omitempty"`
TotalResults int64 `json:"totalResults,omitempty"`
}
Source Files
¶
- address.go
- api_client.go
- api_response.go
- authentication_scheme.go
- authentication_schemes.go
- bulk_supported.go
- configuration.go
- email.go
- enterprise_user.go
- error_response.go
- filter_supported.go
- meta.go
- name.go
- patch_operation.go
- phone_number.go
- photo.go
- search_request.go
- service_provider_config.go
- service_provider_config_api.go
- supported.go
- user.go
- user_api.go
- user_patch.go
- user_response.go
- user_search_response.go