bump libre-graph-api-go
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -67,7 +67,7 @@ require (
|
|||||||
github.com/onsi/gomega v1.29.0
|
github.com/onsi/gomega v1.29.0
|
||||||
github.com/open-policy-agent/opa v0.51.0
|
github.com/open-policy-agent/opa v0.51.0
|
||||||
github.com/orcaman/concurrent-map v1.0.0
|
github.com/orcaman/concurrent-map v1.0.0
|
||||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231107135330-011e9d4c45e3
|
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/pkg/xattr v0.4.9
|
github.com/pkg/xattr v0.4.9
|
||||||
github.com/prometheus/client_golang v1.17.0
|
github.com/prometheus/client_golang v1.17.0
|
||||||
|
|||||||
@@ -1774,8 +1774,8 @@ github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35uk
|
|||||||
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
|
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
|
||||||
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
||||||
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
|
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
|
||||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231107135330-011e9d4c45e3 h1:eUE3kNgr8PwcXeUKFkuEuz1+4hfCCmq+rKYQzk0OxtY=
|
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb h1:KFnmkGvHY+6k6IZ9I1w5Ia24VbALYms+Y6W7LrsUbsE=
|
||||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231107135330-011e9d4c45e3/go.mod h1:v2aAl5IwEI8t+GmcWvBd+bvJMYp9Vf1hekLuRf0UnEs=
|
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb/go.mod h1:v2aAl5IwEI8t+GmcWvBd+bvJMYp9Vf1hekLuRf0UnEs=
|
||||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||||
|
|||||||
+1
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
|
|||||||
*MeDriveRootChildrenApi* | [**HomeGetChildren**](docs/MeDriveRootChildrenApi.md#homegetchildren) | **Get** /v1.0/me/drive/root/children | Get children from drive
|
*MeDriveRootChildrenApi* | [**HomeGetChildren**](docs/MeDriveRootChildrenApi.md#homegetchildren) | **Get** /v1.0/me/drive/root/children | Get children from drive
|
||||||
*MeDrivesApi* | [**ListMyDrives**](docs/MeDrivesApi.md#listmydrives) | **Get** /v1.0/me/drives | Get all drives where the current user is a regular member of
|
*MeDrivesApi* | [**ListMyDrives**](docs/MeDrivesApi.md#listmydrives) | **Get** /v1.0/me/drives | Get all drives where the current user is a regular member of
|
||||||
*MeUserApi* | [**GetOwnUser**](docs/MeUserApi.md#getownuser) | **Get** /v1.0/me | Get current user
|
*MeUserApi* | [**GetOwnUser**](docs/MeUserApi.md#getownuser) | **Get** /v1.0/me | Get current user
|
||||||
|
*MeUserApi* | [**UpdateOwnUser**](docs/MeUserApi.md#updateownuser) | **Patch** /v1.0/me | Update the current user
|
||||||
*RoleManagementApi* | [**GetPermissionRoleDefinition**](docs/RoleManagementApi.md#getpermissionroledefinition) | **Get** /v1beta1/roleManagement/permissions/roleDefinitions/{role-id} | Get unifiedRoleDefinition
|
*RoleManagementApi* | [**GetPermissionRoleDefinition**](docs/RoleManagementApi.md#getpermissionroledefinition) | **Get** /v1beta1/roleManagement/permissions/roleDefinitions/{role-id} | Get unifiedRoleDefinition
|
||||||
*RoleManagementApi* | [**ListPermissionRoleDefinitions**](docs/RoleManagementApi.md#listpermissionroledefinitions) | **Get** /v1beta1/roleManagement/permissions/roleDefinitions | List roleDefinitions
|
*RoleManagementApi* | [**ListPermissionRoleDefinitions**](docs/RoleManagementApi.md#listpermissionroledefinitions) | **Get** /v1beta1/roleManagement/permissions/roleDefinitions | List roleDefinitions
|
||||||
*TagsApi* | [**AssignTags**](docs/TagsApi.md#assigntags) | **Put** /v1.0/extensions/org.libregraph/tags | Assign tags to a resource
|
*TagsApi* | [**AssignTags**](docs/TagsApi.md#assigntags) | **Put** /v1.0/extensions/org.libregraph/tags | Assign tags to a resource
|
||||||
|
|||||||
+114
@@ -135,3 +135,117 @@ func (a *MeUserApiService) GetOwnUserExecute(r ApiGetOwnUserRequest) (*User, *ht
|
|||||||
|
|
||||||
return localVarReturnValue, localVarHTTPResponse, nil
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ApiUpdateOwnUserRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MeUserApiService
|
||||||
|
user *User
|
||||||
|
}
|
||||||
|
|
||||||
|
// New user values
|
||||||
|
func (r ApiUpdateOwnUserRequest) User(user User) ApiUpdateOwnUserRequest {
|
||||||
|
r.user = &user
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUpdateOwnUserRequest) Execute() (*User, *http.Response, error) {
|
||||||
|
return r.ApiService.UpdateOwnUserExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UpdateOwnUser Update the current user
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiUpdateOwnUserRequest
|
||||||
|
*/
|
||||||
|
func (a *MeUserApiService) UpdateOwnUser(ctx context.Context) ApiUpdateOwnUserRequest {
|
||||||
|
return ApiUpdateOwnUserRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
// @return User
|
||||||
|
func (a *MeUserApiService) UpdateOwnUserExecute(r ApiUpdateOwnUserRequest) (*User, *http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodPatch
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
localVarReturnValue *User
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeUserApiService.UpdateOwnUser")
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/v1.0/me"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = r.user
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
var v OdataError
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|||||||
+37
@@ -45,6 +45,8 @@ type User struct {
|
|||||||
GivenName *string `json:"givenName,omitempty"`
|
GivenName *string `json:"givenName,omitempty"`
|
||||||
// The user`s type. This can be either \"Member\" for regular user, or \"Guest\" for guest users.
|
// The user`s type. This can be either \"Member\" for regular user, or \"Guest\" for guest users.
|
||||||
UserType *string `json:"userType,omitempty"`
|
UserType *string `json:"userType,omitempty"`
|
||||||
|
// Represents the users language setting, ISO-639-1 Code
|
||||||
|
PreferredLanguage *string `json:"preferredLanguage,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewUser instantiates a new User object
|
// NewUser instantiates a new User object
|
||||||
@@ -512,6 +514,38 @@ func (o *User) SetUserType(v string) {
|
|||||||
o.UserType = &v
|
o.UserType = &v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetPreferredLanguage returns the PreferredLanguage field value if set, zero value otherwise.
|
||||||
|
func (o *User) GetPreferredLanguage() string {
|
||||||
|
if o == nil || IsNil(o.PreferredLanguage) {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.PreferredLanguage
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPreferredLanguageOk returns a tuple with the PreferredLanguage field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *User) GetPreferredLanguageOk() (*string, bool) {
|
||||||
|
if o == nil || IsNil(o.PreferredLanguage) {
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
|
return o.PreferredLanguage, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPreferredLanguage returns a boolean if a field has been set.
|
||||||
|
func (o *User) HasPreferredLanguage() bool {
|
||||||
|
if o != nil && !IsNil(o.PreferredLanguage) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPreferredLanguage gets a reference to the given string and assigns it to the PreferredLanguage field.
|
||||||
|
func (o *User) SetPreferredLanguage(v string) {
|
||||||
|
o.PreferredLanguage = &v
|
||||||
|
}
|
||||||
|
|
||||||
func (o User) MarshalJSON() ([]byte, error) {
|
func (o User) MarshalJSON() ([]byte, error) {
|
||||||
toSerialize, err := o.ToMap()
|
toSerialize, err := o.ToMap()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -564,6 +598,9 @@ func (o User) ToMap() (map[string]interface{}, error) {
|
|||||||
if !IsNil(o.UserType) {
|
if !IsNil(o.UserType) {
|
||||||
toSerialize["userType"] = o.UserType
|
toSerialize["userType"] = o.UserType
|
||||||
}
|
}
|
||||||
|
if !IsNil(o.PreferredLanguage) {
|
||||||
|
toSerialize["preferredLanguage"] = o.PreferredLanguage
|
||||||
|
}
|
||||||
return toSerialize, nil
|
return toSerialize, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1555,7 +1555,7 @@ github.com/opentracing/opentracing-go/log
|
|||||||
# github.com/orcaman/concurrent-map v1.0.0
|
# github.com/orcaman/concurrent-map v1.0.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/orcaman/concurrent-map
|
github.com/orcaman/concurrent-map
|
||||||
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20231107135330-011e9d4c45e3
|
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/owncloud/libre-graph-api-go
|
github.com/owncloud/libre-graph-api-go
|
||||||
# github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
|
# github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
|
||||||
|
|||||||
Reference in New Issue
Block a user