Documentation ¶
Overview ¶
Package tigris contains a Tigris client and helpers for interacting with Tigris.
Tigris 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.
Index ¶
- func Client(ctx context.Context) (*s3.Client, error)
- func WithCompareAndSwap() func(*s3.Options)
- func WithCreateObjectIfNotExists() func(*s3.Options)
- func WithHeader(key, value string) func(*s3.Options)
- func WithIfEtagMatches(etag string) func(*s3.Options)
- func WithModifiedSince(modifiedSince time.Time) func(*s3.Options)
- func WithQuery(query string) func(*s3.Options)
- func WithStaticReplicationRegions(regions []Region) func(*s3.Options)
- func WithUnmodifiedSince(unmodifiedSince time.Time) func(*s3.Options)
- type Region
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCompareAndSwap ¶
WithCompareAndSwap tells Tigris to skip the cache and read the object from its designated region.
This is only used on GET requests.
See the Tigris documentation1 for more information.
func WithCreateObjectIfNotExists ¶
WithCreateIfNotExists will create the object if it doesn't exist.
See the Tigris documentation1 for more information.
func WithHeader ¶
WithHeader sets an arbitrary HTTP header on the request.
func WithIfEtagMatches ¶
WithIfEtagMatches sets the ETag that the object must match.
See the Tigris documentation1 for more information.
func WithModifiedSince ¶
WithModifiedSince lets you proceed with operation if object was modified after provided date (RFC1123).
See the Tigris documentation1 for more information.
func WithQuery ¶
WithQuery lets you filter objects in a ListObjectsV2 request.
This functions like the WHERE clause in SQL, but for S3 objects. For more information, see the Tigris documentation1.
func WithStaticReplicationRegions ¶
WithStaticReplicationRegions sets the regions where the object will be replicated.
Note that this will cause you to be charged multiple times for the same object, once per region.
Types ¶
type Region ¶
type Region string
Region is a Tigris region from the documentation.
https://www.tigrisdata.com/docs/concepts/regions/
const ( FRA Region = "fra" // Frankfurt, Germany GRU Region = "gru" // São Paulo, Brazil HKG Region = "hkg" // Hong Kong, China IAD Region = "iad" // Ashburn, Virginia, USA JNB Region = "jnb" // Johannesburg, South Africa LHR Region = "lhr" // London, UK MAD Region = "mad" // Madrid, Spain NRT Region = "nrt" // Tokyo (Narita), Japan ORD Region = "ord" // Chicago, Illinois, USA SIN Region = "sin" // Singapore SJC Region = "sjc" // San Jose, California, USA SYD Region = "syd" // Sydney, Australia )
Possible Tigris regions.