Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GSP-117 Rename Service to System as the Opposite to Global #124

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/2021-04-27-sse.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In this way, you create and store encryption keys yourself. Different from Clien

## How to Use SSE in go-storage

Since different services support different SSE options and have different behaviors, SSE-related pairs are considered service pairs. So you will have to check which options are provided for your specific service first. We listed supported options and related pairs in our service [docs]. You'd better first choose the SSE option you want to use, and then ignore other pairs in case of being confused with the usage of the pairs.
Since different services support different SSE options and have different behaviors, SSE-related pairs are considered system pairs. So you will have to check which options are provided for your specific service first. We listed supported options and related pairs in our service [docs]. You'd better first choose the SSE option you want to use, and then ignore other pairs in case of being confused with the usage of the pairs.

We recommend using SSE with [DefaultPairs], where you only provide SSE-related options during `NewStorager` and can write the same logic for different services. Take [s3] for example. The code snippets come from [go-storage-example]

Expand Down
2 changes: 1 addition & 1 deletion blog/2021-06-04-weekly-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ For more details, please refer to <https://beyondstorage.io/community/events/osp

[specs]: https://github.com/beyondstorage/specs

[go-service-qingsor]: https://github.com/beyondstorage/go-service-qingstor
[go-service-qingstor]: https://github.com/beyondstorage/go-service-qingstor

[GSP-47]: https://github.com/beyondstorage/specs/blob/master/rfcs/47-additional-error-specification.md

Expand Down
2 changes: 1 addition & 1 deletion blog/2021-06-21-weekly-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ So users can get the storage's restrictions before really call the API.

This week we approved and merged this GSP. The implementations could be tracked at [Tracking issue for GSP-97: Add Restrictions In Storage Metadata](https://github.com/beyondstorage/go-storage/issues/599).

### Add Service Metadata In Storage Metadata
### Add System Metadata In Storage Metadata

[GSP-111](https://github.com/beyondstorage/specs/pull/111) is still under discussion.

Expand Down
12 changes: 6 additions & 6 deletions docs/go-storage/internal/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func WithContentType(v string) Pair {
We have two kind of pairs:

- `Global Pair`: defined in [specs](https://github.com/beyondstorage/specs/blob/master/definitions/pairs.toml), could be used in all services.
- `Service Pair`: defined in `service.toml`, could only be used in current service.
- `System Pair`: defined in `service.toml`, could only be used in current service.

All supported fields are following:

Expand All @@ -88,7 +88,7 @@ type = "int64"
description = "specify size for this request, storage will only read limited content data"
```

Example of adding service pair:
Example of adding system pair:

```toml
[pairs.force_path_style]
Expand All @@ -114,7 +114,7 @@ func (o *Object) MustGetContentLength() int64 {}
We have two kind of info:

- `Global Info`: defined in [specs](https://github.com/beyondstorage/specs/blob/master/definitions), could be used in all services.
- `Service Info`: defined in `service.toml`, could only be used in current service.
- `System Info`: defined in `service.toml`, could only be used in current service.

All supported fields are following:

Expand All @@ -130,7 +130,7 @@ type = "string"
export = true
```

Example of adding service pair for object metadata:
Example of adding system pair for object metadata:

```toml
[infos.object.meta.storage-class]
Expand Down Expand Up @@ -232,7 +232,7 @@ func (s *Storage) convertWriteStorageClass(v string) (string, bool) {
type = "bool"
description = "see http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html for Amazon S3: Virtual Hosting of Buckets"
```
Service pairs, name should be `snack_case`
System pairs, name should be `snack_case`

### `infos`

Expand All @@ -241,7 +241,7 @@ Service pairs, name should be `snack_case`
type = "string"
```

Service infos, name should be `kebab-case`
System infos, name should be `kebab-case`

[specs]: https://github.com/beyondstorage/specs
[go-storage]: https://github.com/beyondstorage/go-storage
Expand Down
6 changes: 3 additions & 3 deletions docs/go-storage/pairs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ sidebar_position: 1
There are two kinds of `Pair`:

- Global Pair: Defined in [specs](https://github.com/beyondstorage/specs/blob/master/definitions/pairs.toml), shared across all services.
- Service Pair: Defined in service's `service.toml` pairs section, only available in current service.
- System Pair: Defined in service's `service.toml` pairs section, only available in current service.

## Available Pairs

We will document all global pair here and leave service pairs in service's documents.
We will document all global pair here and leave system pairs in service's documents.

- [content_md5](./content_md5/)
- [content_type](./content_type/)
Expand All @@ -35,7 +35,7 @@ We will document all global pair here and leave service pairs in service's docum

`go-storage` provides a mechanism to allow user pass default pairs for every operation during `NewServicer` and `NewStorager`.

Any service that supports this mechanism will generate service pairs called `DefaultServicePairs` and `DefaultStoragePairs`:
Any service that supports this mechanism will generate system pairs called `DefaultServicePairs` and `DefaultStoragePairs`:

```go
type DefaultStoragePairs struct {
Expand Down