Skip to content

Commit 535c666

Browse files
authored
docs: remove tigrisheaders package documentation from README (#13)
Remove mentions of the tigrisheaders package to focus on the main storage package API. Assisted-by: GLM 4.7 via Claude Code Signed-off-by: Xe Iaso <xe@tigrisdata.com>
1 parent 07657d9 commit 535c666

1 file changed

Lines changed: 1 addition & 105 deletions

File tree

README.md

Lines changed: 1 addition & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ Welcome to the Tigris Storage SDK for Go! This package contains high-level wrapp
66

77
[Tigris](https://www.tigrisdata.com/) is a cloud storage service that provides a simple, scalable, and secure object storage solution. It is based on the S3 API, but has additional features that need these helpers.
88

9-
This SDK provides two main packages:
10-
11-
- **`storage`** - The main package containing the Tigris client with S3-compatible methods plus Tigris-specific features like bucket forking, snapshots, and object renaming.
12-
- **`tigrisheaders`** - Lower-level helpers for setting Tigris-specific HTTP headers on S3 API calls.
9+
This SDK provides the main **`storage`** package containing the Tigris client with S3-compatible methods plus Tigris-specific features like bucket forking, snapshots, and object renaming.
1310

1411
## Installation
1512

@@ -128,107 +125,6 @@ _, err := client.RenameObject(ctx, &s3.CopyObjectInput{
128125
})
129126
```
130127

131-
## Using the tigrisheaders Package
132-
133-
The `tigrisheaders` package provides lower-level helpers for setting Tigris-specific HTTP headers. These can be used directly with S3 client operations.
134-
135-
### Static Replication Regions
136-
137-
Control which regions your objects are replicated to:
138-
139-
```go
140-
import "github.com/tigrisdata/storage-go/tigrisheaders"
141-
142-
// Replicate to specific regions
143-
_, err := client.PutObject(ctx, &s3.PutObjectInput{
144-
Bucket: aws.String("my-bucket"),
145-
Key: aws.String("file.txt"),
146-
Body: bytes.NewReader(data),
147-
}, tigrisheaders.WithStaticReplicationRegions([]tigrisheaders.Region{
148-
tigrisheaders.FRA, // Frankfurt
149-
tigrisheaders.SJC, // San Jose
150-
}))
151-
```
152-
153-
Available regions:
154-
155-
- `FRA` - Frankfurt, Germany
156-
- `GRU` - São Paulo, Brazil
157-
- `HKG` - Hong Kong, China
158-
- `IAD` - Ashburn, Virginia, USA
159-
- `JNB` - Johannesburg, South Africa
160-
- `LHR` - London, UK
161-
- `MAD` - Madrid, Spain
162-
- `NRT` - Tokyo (Narita), Japan
163-
- `ORD` - Chicago, Illinois, USA
164-
- `SIN` - Singapore
165-
- `SJC` - San Jose, California, USA
166-
- `SYD` - Sydney, Australia
167-
- `Europe` - European datacenters
168-
- `USA` - American datacenters
169-
170-
### Query Metadata
171-
172-
Filter objects in a ListObjectsV2 request with a SQL-like WHERE clause:
173-
174-
```go
175-
_, err := client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{
176-
Bucket: aws.String("my-bucket"),
177-
}, tigrisheaders.WithQuery("metadata.user_id = '123'"))
178-
```
179-
180-
### Conditional Operations
181-
182-
Perform operations based on object state:
183-
184-
```go
185-
// Create object only if it doesn't exist
186-
_, err := client.PutObject(ctx, input,
187-
tigrisheaders.WithCreateObjectIfNotExists())
188-
189-
// Only proceed if ETag matches
190-
_, err := client.PutObject(ctx, input,
191-
tigrisheaders.WithIfEtagMatches("\"abc123\""))
192-
193-
// Only proceed if modified since date
194-
_, err := client.GetObject(ctx, input,
195-
tigrisheaders.WithModifiedSince(time.Now().Add(-24 * time.Hour)))
196-
197-
// Only proceed if unmodified since date
198-
_, err := client.GetObject(ctx, input,
199-
tigrisheaders.WithUnmodifiedSince(time.Now().Add(-24 * time.Hour)))
200-
201-
// Compare-and-swap (skip cache, read from designated region)
202-
_, err := client.GetObject(ctx, input,
203-
tigrisheaders.WithCompareAndSwap())
204-
```
205-
206-
### Snapshot Operations
207-
208-
Work with specific snapshot versions:
209-
210-
```go
211-
// List objects from a specific snapshot
212-
_, err := client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{
213-
Bucket: aws.String("my-bucket"),
214-
}, tigrisheaders.WithSnapshotVersion("snapshot-id"))
215-
216-
// Get object from a specific snapshot
217-
_, err := client.GetObject(ctx, &s3.GetObjectInput{
218-
Bucket: aws.String("my-bucket"),
219-
Key: aws.String("file.txt"),
220-
}, tigrisheaders.WithSnapshotVersion("snapshot-id"))
221-
```
222-
223-
### Custom Headers
224-
225-
Set arbitrary HTTP headers on requests:
226-
227-
```go
228-
_, err := client.PutObject(ctx, input,
229-
tigrisheaders.WithHeader("X-Custom-Header", "value"))
230-
```
231-
232128
## Documentation
233129

234130
For more information on Tigris features, see:

0 commit comments

Comments
 (0)