Skip to content

Commit 1466632

Browse files
authored
Add share object api (#335)
1 parent 0c43e5c commit 1466632

10 files changed

+825
-4
lines changed

restapi/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ type MCClient interface {
143143
remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass bool, contentCh <-chan *mc.ClientContent) <-chan *probe.Error
144144
list(ctx context.Context, opts mc.ListOptions) <-chan *mc.ClientContent
145145
get(ctx context.Context, opts mc.GetOptions) (io.ReadCloser, *probe.Error)
146+
shareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)
146147
}
147148

148149
// Interface implementation
@@ -183,6 +184,10 @@ func (c mcClient) get(ctx context.Context, opts mc.GetOptions) (io.ReadCloser, *
183184
return c.client.Get(ctx, opts)
184185
}
185186

187+
func (c mcClient) shareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error) {
188+
return c.client.ShareDownload(ctx, versionID, expires)
189+
}
190+
186191
// ConsoleCredentials interface with all functions to be implemented
187192
// by mock when testing, it should include all needed consoleCredentials.Login api calls
188193
// that are used within this project.

restapi/embedded_spec.go

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

restapi/operations/console_api.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

restapi/operations/user_api/share_object.go

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)