| 1 | package files |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | "os" |
| 6 | "time" |
| 7 | |
| 8 | "github.com/Azure/go-autorest/autorest" |
| 9 | ) |
| 10 | |
| 11 | type StorageFile interface { |
| 12 | PutByteRange(ctx context.Context, accountName, shareName, path, fileName string, input PutByteRangeInput) (result autorest.Response, err error) |
| 13 | GetByteRange(ctx context.Context, accountName, shareName, path, fileName string, input GetByteRangeInput) (result GetByteRangeResult, err error) |
| 14 | ClearByteRange(ctx context.Context, accountName, shareName, path, fileName string, input ClearByteRangeInput) (result autorest.Response, err error) |
| 15 | SetProperties(ctx context.Context, accountName, shareName, path, fileName string, input SetPropertiesInput) (result autorest.Response, err error) |
| 16 | PutFile(ctx context.Context, accountName, shareName, path, fileName string, file *os.File, parallelism int) error |
| 17 | Copy(ctx context.Context, accountName, shareName, path, fileName string, input CopyInput) (result CopyResult, err error) |
| 18 | SetMetaData(ctx context.Context, accountName, shareName, path, fileName string, metaData map[string]string) (result autorest.Response, err error) |
| 19 | GetMetaData(ctx context.Context, accountName, shareName, path, fileName string) (result GetMetaDataResult, err error) |
| 20 | AbortCopy(ctx context.Context, accountName, shareName, path, fileName, copyID string) (result autorest.Response, err error) |
| 21 | GetFile(ctx context.Context, accountName, shareName, path, fileName string, parallelism int) (result autorest.Response, outputBytes []byte, err error) |
| 22 | GetResourceID(accountName, shareName, directoryName, filePath string) string |
| 23 | ListRanges(ctx context.Context, accountName, shareName, path, fileName string) (result ListRangesResult, err error) |
| 24 | GetProperties(ctx context.Context, accountName, shareName, path, fileName string) (result GetResult, err error) |
| 25 | Delete(ctx context.Context, accountName, shareName, path, fileName string) (result autorest.Response, err error) |
| 26 | Create(ctx context.Context, accountName, shareName, path, fileName string, input CreateInput) (result autorest.Response, err error) |
| 27 | CopyAndWait(ctx context.Context, accountName, shareName, path, fileName string, input CopyInput, pollDuration time.Duration) (result CopyResult, err error) |
| 28 | } |