Skip to content

Commit aae1b2c

Browse files
committed
refactor: rename type to backend and clarify experimental feature flag
1 parent eb5b226 commit aae1b2c

File tree

24 files changed

+51
-51
lines changed

24 files changed

+51
-51
lines changed

deploy/config/dev_umccr.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,39 @@ environment = "dev"
2626
[[resolvers]]
2727
regex = '^(org.umccr.dev.htsget-rs-test-data)/(?P<key>.*)$'
2828
substitution_string = '$key'
29-
storage.type = 'S3'
29+
storage.backend = 'S3'
3030

3131
[[resolvers]]
3232
regex = '^(umccr-10c-data-dev)/(?P<key>.*)$'
3333
substitution_string = '$key'
34-
storage.type = 'S3'
34+
storage.backend = 'S3'
3535

3636
[[resolvers]]
3737
regex = '^(umccr-10f-data-dev)/(?P<key>.*)$'
3838
substitution_string = '$key'
39-
storage.type = 'S3'
39+
storage.backend = 'S3'
4040

4141
[[resolvers]]
4242
regex = '^(umccr-10g-data-dev)/(?P<key>.*)$'
4343
substitution_string = '$key'
44-
storage.type = 'S3'
44+
storage.backend = 'S3'
4545

4646
[[resolvers]]
4747
regex = '^(umccr-agha-test-dev)/(?P<key>.*)$'
4848
substitution_string = '$key'
49-
storage.type = 'S3'
49+
storage.backend = 'S3'
5050

5151
[[resolvers]]
5252
regex = '^(umccr-research-dev)/(?P<key>.*)$'
5353
substitution_string = '$key'
54-
storage.type = 'S3'
54+
storage.backend = 'S3'
5555

5656
[[resolvers]]
5757
regex = '^(umccr-primary-data-dev)/(?P<key>.*)$'
5858
substitution_string = '$key'
59-
storage.type = 'S3'
59+
storage.backend = 'S3'
6060

6161
[[resolvers]]
6262
regex = '^(umccr-validation-prod)/(?P<key>.*)$'
6363
substitution_string = '$key'
64-
storage.type = 'S3'
64+
storage.backend = 'S3'

deploy/config/example_deploy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ environment = "dev"
1717
[[resolvers]]
1818
regex = '^(?P<bucket>.*?)/(?P<key>.*)$'
1919
substitution_string = '$key'
20-
storage.type = 'S3'
20+
storage.backend = 'S3'

deploy/config/prod_umccr.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ environment = "prod"
2222
[[resolvers]]
2323
regex = '^(umccr-research-dev)/(?P<key>.*)$'
2424
substitution_string = '$key'
25-
storage.type = 'S3'
25+
storage.backend = 'S3'
2626

2727
[[resolvers]]
2828
regex = '^(umccr-validation-prod)/(?P<key>.*)$'
2929
substitution_string = '$key'
30-
storage.type = 'S3'
30+
storage.backend = 'S3'
3131

3232
[[resolvers]]
3333
regex = '^(umccr-primary-data-prod)/(?P<key>.*)$'
3434
substitution_string = '$key'
35-
storage.type = 'S3'
35+
storage.backend = 'S3'

deploy/config/public_umccr.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ environment = 'public'
1111
[[resolvers]]
1212
regex = '^(org.umccr.demo.sbeacon-data)/CINECA_UK1/(?P<key>.*)$'
1313
substitution_string = 'CINECA_UK1/$key'
14-
storage.type = 'S3'
14+
storage.backend = 'S3'
1515

1616
[[resolvers]]
1717
regex = '^(org.umccr.demo.htsget-rs-data)/(?P<type>bam|cram|vcf|bcf|crypt4gh|mixed)/(?P<key>.*)$'
1818
substitution_string = '$type/$key'
19-
storage.type = 'S3'
19+
storage.backend = 'S3'

htsget-actix/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ are exposed in the public API.
5050
This crate has the following features:
5151
* `s3-storage`: used to enable `S3Storage` functionality.
5252
* `url-storage`: used to enable `UrlStorage` functionality.
53-
* `experimental`: used to enable experimental features like `C4GHStorage`.
53+
* `experimental`: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support through `C4GHStorage`.
5454

5555
## Benchmarks
5656
Benchmarks for this crate written using [Criterion.rs][criterion-rs], and aim to compare the performance of this crate with the

htsget-axum/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ htsget-rs. It also contains the data block server which fetches data from a `Loc
171171
This crate has the following features:
172172
* `s3-storage`: used to enable `S3Storage` functionality.
173173
* `url-storage`: used to enable `UrlStorage` functionality.
174-
* `experimental`: used to enable experimental features like `C4GHStorage`.
174+
* `experimental`: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support through `C4GHStorage`.
175175

176176
## License
177177

htsget-config/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ For more information about regex options see the [regex crate](https://docs.rs/r
151151
Each resolver also maps to a certain storage backend. This storage backend can be used to set query IDs which are served from local storage, from S3-style bucket storage, or from HTTP URLs.
152152
To set the storage backend for a resolver, add a `[resolvers.storage]` table. Some storage backends require feature flags to be set when compiling htsget-rs.
153153

154-
To use `LocalStorage`, set `type = 'Local'` under `[resolvers.storage]`, and specify any additional options from below:
154+
To use `LocalStorage`, set `backend = 'Local'` under `[resolvers.storage]`, and specify any additional options from below:
155155

156156
| Option | Description | Type | Default |
157157
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------|------------------------------|--------------------|
@@ -161,7 +161,7 @@ To use `LocalStorage`, set `type = 'Local'` under `[resolvers.storage]`, and spe
161161
| `path_prefix` | The path prefix which the URL tickets will have. This should likely match the `data_server_serve_at` path. | URL path | `''` |
162162
| `use_data_server_config` | Whether to use the data server config to fill in the above values. This overrides any other options specified from this table. | Boolean | `false` |
163163

164-
To use `S3Storage`, build htsget-rs with the `s3-storage` feature enabled, set `type = 'S3'` under `[resolvers.storage]`, and specify any additional options from below:
164+
To use `S3Storage`, build htsget-rs with the `s3-storage` feature enabled, set `backend = 'S3'` under `[resolvers.storage]`, and specify any additional options from below:
165165

166166
| Option | Description | Type | Default |
167167
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------|
@@ -170,7 +170,7 @@ To use `S3Storage`, build htsget-rs with the `s3-storage` feature enabled, set `
170170
| `path_style` | The S3 path style to request from the storage backend. If `true`, "path style" is used, e.g. `host.com/bucket/object.bam`, otherwise `bucket.host.com/object` style is used. | Boolean | `false` |
171171

172172
`UrlStorage` is another storage backend which can be used to serve data from a remote HTTP URL. When using this storage backend, htsget-rs will fetch data from a `url` which is set in the config. It will also forward any headers received with the initial query, which is useful for authentication.
173-
To use `UrlStorage`, build htsget-rs with the `url-storage` feature enabled, set `type = 'Url'` under `[resolvers.storage]`, and specify any additional options from below:
173+
To use `UrlStorage`, build htsget-rs with the `url-storage` feature enabled, set `backend = 'Url'` under `[resolvers.storage]`, and specify any additional options from below:
174174

175175
| Option | Description | Type | Default |
176176
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------|
@@ -195,7 +195,7 @@ regex = '^(example_bucket)/(?P<key>.*)$'
195195
substitution_string = '$key'
196196

197197
[resolvers.storage]
198-
type = 'S3'
198+
backend = 'S3'
199199
# Uses the first capture group in the regex as the bucket.
200200
```
201201
Will use "example_bucket" as the S3 bucket if that resolver matches, because this is the first capture group in the `regex`.
@@ -210,7 +210,7 @@ regex = '.*'
210210
substitution_string = '$0'
211211

212212
[resolvers.storage]
213-
type = 'Local'
213+
backend = 'Local'
214214
scheme = 'Http'
215215
authority = '127.0.0.1:8081'
216216
local_path = './'
@@ -225,7 +225,7 @@ regex = '.*'
225225
substitution_string = '$0'
226226

227227
[resolvers.storage]
228-
type = 'S3'
228+
backend = 'S3'
229229
bucket = 'bucket'
230230
```
231231

@@ -237,7 +237,7 @@ regex = ".*"
237237
substitution_string = "$0"
238238

239239
[resolvers.storage]
240-
type = 'Url'
240+
backend = 'Url'
241241
url = "http://localhost:8080"
242242
response_url = "https://example.com"
243243
forward_headers = true
@@ -276,7 +276,7 @@ regex = '.*'
276276
substitution_string = '$0'
277277

278278
[resolvers.storage]
279-
type = 'S3'
279+
backend = 'S3'
280280
bucket = 'bucket'
281281

282282
[resolvers.allow_guard]
@@ -486,7 +486,7 @@ regex = '.*'
486486
substitution_string = '$0'
487487

488488
[resolvers.storage]
489-
type = 'S3'
489+
backend = 'S3'
490490
bucket = 'bucket'
491491
endpoint = 'http://127.0.0.1:9000'
492492
path_style = true
@@ -523,7 +523,7 @@ regex = '.*'
523523
substitution_string = '$0'
524524

525525
[resolvers.storage]
526-
type = 'Local'
526+
backend = 'Local'
527527
private_key = 'data/c4gh/keys/bob.sec' # pragma: allowlist secret
528528
recipient_public_key = 'data/c4gh/keys/alice.pub'
529529
```
@@ -544,7 +544,7 @@ regex, and changing it by using a substitution string.
544544
This crate has the following features:
545545
* `s3-storage`: used to enable `S3Storage` functionality.
546546
* `url-storage`: used to enable `UrlStorage` functionality.
547-
* `experimental`: used to enable experimental features like `C4GHStorage`.
547+
* `experimental`: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support through `C4GHStorage`.
548548

549549
## License
550550

htsget-config/examples/config-files/c4gh.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ regex = ".*"
99
substitution_string = "$0"
1010

1111
[resolvers.storage]
12-
type = 'Local'
12+
backend = 'Local'
1313

1414
private_key = "data/c4gh/keys/bob.sec" # pragma: allowlist secret
1515
recipient_public_key = "data/c4gh/keys/alice.pub"

htsget-config/examples/config-files/s3_storage.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ data_server_enabled = false
1111
[[resolvers]]
1212
regex = '^(bucket)/(?P<key>.*)$'
1313
substitution_string = '$key'
14-
storage.type = 'S3'
14+
storage.backend = 'S3'
1515

1616
# Or, set the bucket manually
1717
#[resolvers.storage]
18-
#type = 'S3'
18+
#backend = 'S3'
1919
#bucket = 'bucket'

htsget-config/examples/config-files/tls_data_server.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ regex = ".*"
1212
substitution_string = "$0"
1313

1414
[resolvers.storage]
15-
type = 'Local'
15+
backend = 'Local'
1616
use_data_server_config = true

0 commit comments

Comments
 (0)