tigris

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2024 License: CC0-1.0 Imports: 8 Imported by: 1

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(ctx context.Context) (*s3.Client, error)

Client returns a new S3 client wired up for Tigris.

func WithCompareAndSwap

func WithCompareAndSwap() func(*s3.Options)

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

func WithCreateObjectIfNotExists() func(*s3.Options)

WithCreateIfNotExists will create the object if it doesn't exist.

See the Tigris documentation1 for more information.

func WithHeader

func WithHeader(key, value string) func(*s3.Options)

WithHeader sets an arbitrary HTTP header on the request.

func WithIfEtagMatches

func WithIfEtagMatches(etag string) func(*s3.Options)

WithIfEtagMatches sets the ETag that the object must match.

See the Tigris documentation1 for more information.

func WithModifiedSince

func WithModifiedSince(modifiedSince time.Time) func(*s3.Options)

WithModifiedSince lets you proceed with operation if object was modified after provided date (RFC1123).

See the Tigris documentation1 for more information.

func WithQuery

func WithQuery(query string) func(*s3.Options)

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

func WithStaticReplicationRegions(regions []Region) func(*s3.Options)

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.

func WithUnmodifiedSince

func WithUnmodifiedSince(unmodifiedSince time.Time) func(*s3.Options)

WithUnmodifiedSince lets you proceed with operation if object was not modified after provided date (RFC1123).

See the Tigris documentation1 for more information.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL