Add share object api (#335)
This commit is contained in:
@@ -143,6 +143,7 @@ type MCClient interface {
|
||||
remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass bool, contentCh <-chan *mc.ClientContent) <-chan *probe.Error
|
||||
list(ctx context.Context, opts mc.ListOptions) <-chan *mc.ClientContent
|
||||
get(ctx context.Context, opts mc.GetOptions) (io.ReadCloser, *probe.Error)
|
||||
shareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)
|
||||
}
|
||||
|
||||
// Interface implementation
|
||||
@@ -183,6 +184,10 @@ func (c mcClient) get(ctx context.Context, opts mc.GetOptions) (io.ReadCloser, *
|
||||
return c.client.Get(ctx, opts)
|
||||
}
|
||||
|
||||
func (c mcClient) shareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error) {
|
||||
return c.client.ShareDownload(ctx, versionID, expires)
|
||||
}
|
||||
|
||||
// ConsoleCredentials interface with all functions to be implemented
|
||||
// by mock when testing, it should include all needed consoleCredentials.Login api calls
|
||||
// that are used within this project.
|
||||
|
||||
Reference in New Issue
Block a user