sheets

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyPayload = errors.New("empty paylaod")
)

Functions

This section is empty.

Types

type BatchReader

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

func NewBatchReader

func NewBatchReader(ctx context.Context, args BatchReaderArgs) (*BatchReader, error)

func (*BatchReader) GetSheetRecords

func (b *BatchReader) GetSheetRecords(ctx context.Context, offset int64) ([]sdk.Record, error)

GetSheetRecords returns the list of records up to a maximum of 1000 rows(default limit) added after the row offset of last successfully read record

type BatchReaderArgs

type BatchReaderArgs struct {
	OAuthConfig          *oauth2.Config
	OAuthToken           *oauth2.Token
	SpreadsheetID        string
	SheetID              int64
	DateTimeRenderOption string
	ValueRenderOption    string
	PollingPeriod        time.Duration
}

type Writer

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

func NewWriter

func NewWriter(
	ctx context.Context,
	oauthCfg *oauth2.Config,
	token *oauth2.Token,
	spreadsheetID, sheetName, valueInputOption string,
	retries uint64,
) (*Writer, error)

func (*Writer) Write

func (w *Writer) Write(ctx context.Context, records []sdk.Record) (int, error)

Write function writes the records to google sheet

Jump to

Keyboard shortcuts

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