gcs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultObjectName

func DefaultObjectName(args ObjNameArgs) string

func New

func New(bucket string, options ...Option) hatchery.Destination

New creates a new Client destination.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a destination that writes data to a Google cloud storage bucket.

func (*Client) Bucket

func (c *Client) Bucket() string

func (*Client) Gzip

func (c *Client) Gzip() bool

func (*Client) Prefix

func (c *Client) Prefix() string

type ObjNameArgs

type ObjNameArgs struct {
	Prefix     string
	Timestamp  time.Time
	Seq        int
	Ext        string
	SchemaHint string
	Slug       string
}

type ObjNameFunc

type ObjNameFunc func(args ObjNameArgs) string

type Option

type Option func(*Client)

func WithClientOptions

func WithClientOptions(options ...option.ClientOption) Option

func WithGzip

func WithGzip(gzip bool) Option

WithGzip sets a flag to compress data with gzip.

func WithPrefix

func WithPrefix(prefix string) Option

WithPrefix sets a prefix for object names in the bucket.

Jump to

Keyboard shortcuts

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