diff --git a/go.mod b/go.mod index 41772bc528..08d70288bd 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,7 @@ require ( github.com/onsi/gomega v1.29.0 github.com/open-policy-agent/opa v0.51.0 github.com/orcaman/concurrent-map v1.0.0 - github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb + github.com/owncloud/libre-graph-api-go v1.0.5-0.20231116165004-6101db024810 github.com/pkg/errors v0.9.1 github.com/pkg/xattr v0.4.9 github.com/prometheus/client_golang v1.17.0 diff --git a/go.sum b/go.sum index 9d2e073aed..91f93886a3 100644 --- a/go.sum +++ b/go.sum @@ -1789,8 +1789,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/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= 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.20231113143725-09bf34dc9afb h1:KFnmkGvHY+6k6IZ9I1w5Ia24VbALYms+Y6W7LrsUbsE= -github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb/go.mod h1:v2aAl5IwEI8t+GmcWvBd+bvJMYp9Vf1hekLuRf0UnEs= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20231116165004-6101db024810 h1:a7ojKQIyMTyqgS+R2w4UAk88RqZ1eIEjoTMoyRV9zU0= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20231116165004-6101db024810/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/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item_create_link.go b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item_create_link.go index cdd2bdf6e7..aa23fd6632 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item_create_link.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item_create_link.go @@ -27,6 +27,8 @@ type DriveItemCreateLink struct { Password *string `json:"password,omitempty"` // Provides a user-visible display name of the link. Optional. Libregraph only. DisplayName *string `json:"displayName,omitempty"` + // The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only. + LibreGraphQuickLink *bool `json:"@libre.graph.quickLink,omitempty"` } // NewDriveItemCreateLink instantiates a new DriveItemCreateLink object @@ -174,6 +176,38 @@ func (o *DriveItemCreateLink) SetDisplayName(v string) { o.DisplayName = &v } +// GetLibreGraphQuickLink returns the LibreGraphQuickLink field value if set, zero value otherwise. +func (o *DriveItemCreateLink) GetLibreGraphQuickLink() bool { + if o == nil || IsNil(o.LibreGraphQuickLink) { + var ret bool + return ret + } + return *o.LibreGraphQuickLink +} + +// GetLibreGraphQuickLinkOk returns a tuple with the LibreGraphQuickLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DriveItemCreateLink) GetLibreGraphQuickLinkOk() (*bool, bool) { + if o == nil || IsNil(o.LibreGraphQuickLink) { + return nil, false + } + return o.LibreGraphQuickLink, true +} + +// HasLibreGraphQuickLink returns a boolean if a field has been set. +func (o *DriveItemCreateLink) HasLibreGraphQuickLink() bool { + if o != nil && !IsNil(o.LibreGraphQuickLink) { + return true + } + + return false +} + +// SetLibreGraphQuickLink gets a reference to the given bool and assigns it to the LibreGraphQuickLink field. +func (o *DriveItemCreateLink) SetLibreGraphQuickLink(v bool) { + o.LibreGraphQuickLink = &v +} + func (o DriveItemCreateLink) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -196,6 +230,9 @@ func (o DriveItemCreateLink) ToMap() (map[string]interface{}, error) { if !IsNil(o.DisplayName) { toSerialize["displayName"] = o.DisplayName } + if !IsNil(o.LibreGraphQuickLink) { + toSerialize["@libre.graph.quickLink"] = o.LibreGraphQuickLink + } return toSerialize, nil } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link.go b/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link.go index 0e9e5fbad9..67d2ba9f5e 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link.go @@ -26,6 +26,8 @@ type SharingLink struct { WebUrl *string `json:"webUrl,omitempty"` // Provides a user-visible display name of the link. Optional. Libregraph only. LibreGraphDisplayName *string `json:"@libre.graph.displayName,omitempty"` + // The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only. + LibreGraphQuickLink *bool `json:"@libre.graph.quickLink,omitempty"` } // NewSharingLink instantiates a new SharingLink object @@ -173,6 +175,38 @@ func (o *SharingLink) SetLibreGraphDisplayName(v string) { o.LibreGraphDisplayName = &v } +// GetLibreGraphQuickLink returns the LibreGraphQuickLink field value if set, zero value otherwise. +func (o *SharingLink) GetLibreGraphQuickLink() bool { + if o == nil || IsNil(o.LibreGraphQuickLink) { + var ret bool + return ret + } + return *o.LibreGraphQuickLink +} + +// GetLibreGraphQuickLinkOk returns a tuple with the LibreGraphQuickLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SharingLink) GetLibreGraphQuickLinkOk() (*bool, bool) { + if o == nil || IsNil(o.LibreGraphQuickLink) { + return nil, false + } + return o.LibreGraphQuickLink, true +} + +// HasLibreGraphQuickLink returns a boolean if a field has been set. +func (o *SharingLink) HasLibreGraphQuickLink() bool { + if o != nil && !IsNil(o.LibreGraphQuickLink) { + return true + } + + return false +} + +// SetLibreGraphQuickLink gets a reference to the given bool and assigns it to the LibreGraphQuickLink field. +func (o *SharingLink) SetLibreGraphQuickLink(v bool) { + o.LibreGraphQuickLink = &v +} + func (o SharingLink) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -195,6 +229,9 @@ func (o SharingLink) ToMap() (map[string]interface{}, error) { if !IsNil(o.LibreGraphDisplayName) { toSerialize["@libre.graph.displayName"] = o.LibreGraphDisplayName } + if !IsNil(o.LibreGraphQuickLink) { + toSerialize["@libre.graph.quickLink"] = o.LibreGraphQuickLink + } return toSerialize, nil } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link_type.go b/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link_type.go index f73f51fc11..657dc3f6bb 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link_type.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_sharing_link_type.go @@ -15,11 +15,12 @@ import ( "fmt" ) -// SharingLinkType The type of the link created. | Value | Display name | Description | | -------------- | ----------------- | --------------------------------------------------------------- | | view | View | Creates a read-only link to the driveItem. | | upload | Upload | Creates a read-write link to the folder driveItem. | | edit | Edit | Creates a read-write link to the driveItem. | | createOnly | File Drop | Creates an upload-only link to the folder driveItem. | | blocksDownload | Secure View | Creates a read-only link that blocks download to the driveItem. | +// SharingLinkType The type of the link created. | Value | Display name | Description | | -------------- | ----------------- | --------------------------------------------------------------- | | internal | Internal | Creates an internal link without any permissions. | | view | View | Creates a read-only link to the driveItem. | | upload | Upload | Creates a read-write link to the folder driveItem. | | edit | Edit | Creates a read-write link to the driveItem. | | createOnly | File Drop | Creates an upload-only link to the folder driveItem. | | blocksDownload | Secure View | Creates a read-only link that blocks download to the driveItem. | type SharingLinkType string // List of sharingLinkType const ( + INTERNAL SharingLinkType = "internal" VIEW SharingLinkType = "view" UPLOAD SharingLinkType = "upload" EDIT SharingLinkType = "edit" @@ -29,6 +30,7 @@ const ( // All allowed values of SharingLinkType enum var AllowedSharingLinkTypeEnumValues = []SharingLinkType{ + "internal", "view", "upload", "edit", diff --git a/vendor/modules.txt b/vendor/modules.txt index 9cf27f8b89..cf152ef117 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1560,7 +1560,7 @@ github.com/opentracing/opentracing-go/log # github.com/orcaman/concurrent-map v1.0.0 ## explicit github.com/orcaman/concurrent-map -# github.com/owncloud/libre-graph-api-go v1.0.5-0.20231113143725-09bf34dc9afb +# github.com/owncloud/libre-graph-api-go v1.0.5-0.20231116165004-6101db024810 ## explicit; go 1.18 github.com/owncloud/libre-graph-api-go # github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c