chore: bump libregraph api

This commit is contained in:
Michael Barz
2023-11-25 10:21:04 +01:00
committed by Florian Schade
parent 580e8aeb46
commit fdb3572cc0
6 changed files with 81 additions and 5 deletions

2
go.mod
View File

@@ -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

4
go.sum
View File

@@ -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=

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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",

2
vendor/modules.txt vendored
View File

@@ -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