You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
6.8 KiB

2 years ago
  1. # \DefaultApi
  2. All URIs are relative to *https://127.0.0.1:9333*
  3. Method | HTTP request | Description
  4. ------------- | ------------- | -------------
  5. [**DirAssign**](DefaultApi.md#DirAssign) | **Get** /dir/assign | Assign a file key
  6. [**DirLookup**](DefaultApi.md#DirLookup) | **Get** /dir/lookup | Lookup volume
  7. ## DirAssign
  8. > FileKey DirAssign(ctx).Count(count).Collection(collection).DataCenter(dataCenter).Rack(rack).DataNode(dataNode).Disk(disk).Replication(replication).Ttl(ttl).Preallocate(preallocate).MemoryMapMaxSizeMb(memoryMapMaxSizeMb).WritableVolumeCount(writableVolumeCount).Execute()
  9. Assign a file key
  10. ### Example
  11. ```go
  12. package main
  13. import (
  14. "context"
  15. "fmt"
  16. "os"
  17. openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
  18. )
  19. func main() {
  20. count := TODO // interface{} | how many file ids to assign. Use <fid>_1, <fid>_2 for the assigned additional file ids. e.g. 3,01637037d6_1, 3,01637037d6_2 (optional)
  21. collection := TODO // interface{} | required collection name (optional)
  22. dataCenter := TODO // interface{} | preferred data center (optional)
  23. rack := TODO // interface{} | preferred rack (optional)
  24. dataNode := TODO // interface{} | preferred volume server, e.g. 127.0.0.1:8080 (optional)
  25. disk := TODO // interface{} | If you have disks labelled, this must be supplied to specify the disk type to allocate on. (optional)
  26. replication := TODO // interface{} | replica placement strategy (optional)
  27. ttl := TODO // interface{} | file expiration time limit, example: 3m for 3 minutes. units: m-minute, h-hour, d-day, w-week, M-month, y-year (optional)
  28. preallocate := TODO // interface{} | If no matching volumes, pre-allocate this number of bytes on disk for new volumes. (optional)
  29. memoryMapMaxSizeMb := TODO // interface{} | Only implemented for windows. Use memory mapped files with specified size for new volumes. (optional)
  30. writableVolumeCount := TODO // interface{} | If no matching volumes, create specified number of new volumes. (optional)
  31. configuration := openapiclient.NewConfiguration()
  32. apiClient := openapiclient.NewAPIClient(configuration)
  33. resp, r, err := apiClient.DefaultApi.DirAssign(context.Background()).Count(count).Collection(collection).DataCenter(dataCenter).Rack(rack).DataNode(dataNode).Disk(disk).Replication(replication).Ttl(ttl).Preallocate(preallocate).MemoryMapMaxSizeMb(memoryMapMaxSizeMb).WritableVolumeCount(writableVolumeCount).Execute()
  34. if err != nil {
  35. fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DirAssign``: %v\n", err)
  36. fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
  37. }
  38. // response from `DirAssign`: FileKey
  39. fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DirAssign`: %v\n", resp)
  40. }
  41. ```
  42. ### Path Parameters
  43. ### Other Parameters
  44. Other parameters are passed through a pointer to a apiDirAssignRequest struct via the builder pattern
  45. Name | Type | Description | Notes
  46. ------------- | ------------- | ------------- | -------------
  47. **count** | [**interface{}**](interface{}.md) | how many file ids to assign. Use &lt;fid&gt;_1, &lt;fid&gt;_2 for the assigned additional file ids. e.g. 3,01637037d6_1, 3,01637037d6_2 |
  48. **collection** | [**interface{}**](interface{}.md) | required collection name |
  49. **dataCenter** | [**interface{}**](interface{}.md) | preferred data center |
  50. **rack** | [**interface{}**](interface{}.md) | preferred rack |
  51. **dataNode** | [**interface{}**](interface{}.md) | preferred volume server, e.g. 127.0.0.1:8080 |
  52. **disk** | [**interface{}**](interface{}.md) | If you have disks labelled, this must be supplied to specify the disk type to allocate on. |
  53. **replication** | [**interface{}**](interface{}.md) | replica placement strategy |
  54. **ttl** | [**interface{}**](interface{}.md) | file expiration time limit, example: 3m for 3 minutes. units: m-minute, h-hour, d-day, w-week, M-month, y-year |
  55. **preallocate** | [**interface{}**](interface{}.md) | If no matching volumes, pre-allocate this number of bytes on disk for new volumes. |
  56. **memoryMapMaxSizeMb** | [**interface{}**](interface{}.md) | Only implemented for windows. Use memory mapped files with specified size for new volumes. |
  57. **writableVolumeCount** | [**interface{}**](interface{}.md) | If no matching volumes, create specified number of new volumes. |
  58. ### Return type
  59. [**FileKey**](FileKey.md)
  60. ### Authorization
  61. No authorization required
  62. ### HTTP request headers
  63. - **Content-Type**: Not defined
  64. - **Accept**: application/json
  65. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
  66. [[Back to Model list]](../README.md#documentation-for-models)
  67. [[Back to README]](../README.md)
  68. ## DirLookup
  69. > interface{} DirLookup(ctx).VolumeId(volumeId).Collection(collection).FileId(fileId).Read(read).Execute()
  70. Lookup volume
  71. ### Example
  72. ```go
  73. package main
  74. import (
  75. "context"
  76. "fmt"
  77. "os"
  78. openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
  79. )
  80. func main() {
  81. volumeId := TODO // interface{} | volume id (optional)
  82. collection := TODO // interface{} | optionally to speed up the lookup (optional)
  83. fileId := TODO // interface{} | If provided, this returns the fileId location and a JWT to update or delete the file. (optional)
  84. read := TODO // interface{} | works together with \"fileId\", if read=yes, JWT is generated for reads. (optional)
  85. configuration := openapiclient.NewConfiguration()
  86. apiClient := openapiclient.NewAPIClient(configuration)
  87. resp, r, err := apiClient.DefaultApi.DirLookup(context.Background()).VolumeId(volumeId).Collection(collection).FileId(fileId).Read(read).Execute()
  88. if err != nil {
  89. fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DirLookup``: %v\n", err)
  90. fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
  91. }
  92. // response from `DirLookup`: interface{}
  93. fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DirLookup`: %v\n", resp)
  94. }
  95. ```
  96. ### Path Parameters
  97. ### Other Parameters
  98. Other parameters are passed through a pointer to a apiDirLookupRequest struct via the builder pattern
  99. Name | Type | Description | Notes
  100. ------------- | ------------- | ------------- | -------------
  101. **volumeId** | [**interface{}**](interface{}.md) | volume id |
  102. **collection** | [**interface{}**](interface{}.md) | optionally to speed up the lookup |
  103. **fileId** | [**interface{}**](interface{}.md) | If provided, this returns the fileId location and a JWT to update or delete the file. |
  104. **read** | [**interface{}**](interface{}.md) | works together with \&quot;fileId\&quot;, if read&#x3D;yes, JWT is generated for reads. |
  105. ### Return type
  106. **interface{}**
  107. ### Authorization
  108. No authorization required
  109. ### HTTP request headers
  110. - **Content-Type**: Not defined
  111. - **Accept**: application/json
  112. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
  113. [[Back to Model list]](../README.md#documentation-for-models)
  114. [[Back to README]](../README.md)