ds

package
v0.0.0-...-0ba504f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleAuthConfig

type GoogleAuthConfig struct {
	ProjectId           string
	ServiceAccountMail  string
	ServiceAccountKey   []byte
	ServiceAccountKeyId string
}

type GoogleSheetsConfig

type GoogleSheetsConfig struct {
	SpreadsheetId string
	SkipFirstRow  bool
	ApiKey        string
	Auth          *GoogleAuthConfig
}

func (*GoogleSheetsConfig) UseServiceAccount

func (dsc *GoogleSheetsConfig) UseServiceAccount() bool

type GoogleSheetsDataSource

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

func CreateSheetsDataSource

func CreateSheetsDataSource() *GoogleSheetsDataSource

func (*GoogleSheetsDataSource) DriveService

func (ds *GoogleSheetsDataSource) DriveService() *drive.Service

func (*GoogleSheetsDataSource) FetchRedirectMapping

func (ds *GoogleSheetsDataSource) FetchRedirectMapping() (state.RedirectMap, error)

func (*GoogleSheetsDataSource) Id

func (ds *GoogleSheetsDataSource) Id() string

func (*GoogleSheetsDataSource) LastModified

func (ds *GoogleSheetsDataSource) LastModified() time.Time

func (*GoogleSheetsDataSource) LastUpdate

func (ds *GoogleSheetsDataSource) LastUpdate() time.Time

func (*GoogleSheetsDataSource) NeedsUpdate

func (ds *GoogleSheetsDataSource) NeedsUpdate() bool

func (*GoogleSheetsDataSource) SheetsService

func (ds *GoogleSheetsDataSource) SheetsService() *sheets.Service

func (*GoogleSheetsDataSource) SpreadsheetId

func (ds *GoogleSheetsDataSource) SpreadsheetId() string
func (ds *GoogleSheetsDataSource) SpreadsheetWebLink() (string, error)

type RedirectDataSource

type RedirectDataSource interface {
	// LastUpdate returns the timestamp at which the last update occurred
	LastUpdate() time.Time
	// LastModified returns the timestamp at which the data source has been modified
	LastModified() time.Time
	// NeedsUpdate returns true when the data source provider determined that an update of the redirect mapping is necessary
	NeedsUpdate() bool
	// FetchRedirectMapping returns the current redirect mapping from the provider
	FetchRedirectMapping() (state.RedirectMap, error)
	// Id returns a provider specific identifier
	Id() string
}

Jump to

Keyboard shortcuts

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