firestore

package
v0.0.0-...-e9fe98c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sync

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

Sync describes the Firestore sync provider.

func New

func New(ctx context.Context, projectID string, rootDocPath string) (*Sync, error)

New creates a new Sync (UpdateChecker) with a default client using Firestore.

func NewWithClient

func NewWithClient(ctx context.Context, projectID string, rootDocPath string, client fsClient.ClientInterface) (*Sync, error)

NewWithClient creates a new Sync (UpdateChecker) with a provided ClientInterface client. Note: Use this one for the tests with a mock ClientInterface.

func (Sync) GetSyncTime

func (f Sync) GetSyncTime(event, projectType string) time.Time

GetSyncTime gets the time a sync occurred.

func (Sync) RecordUpdate

func (f Sync) RecordUpdate(project wporg.RepoProject) error

RecordUpdate records the project.

func (Sync) SetSyncTime

func (f Sync) SetSyncTime(event, projectType string, t time.Time)

SetSyncTime sets the time a sync occurred.

func (Sync) UpdateCheck

func (f Sync) UpdateCheck(project wporg.RepoProject) bool

UpdateCheck determines if an item should be synced.

Jump to

Keyboard shortcuts

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