state

package
v0.0.0-...-03b3635 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSum

func CheckSum(listName string) string

CheckSum calculates settings checksum

func DefaultStartDate

func DefaultStartDate() time.Time

DefaultStartDate ...

func ListStateToMap

func ListStateToMap(s *List) map[string]interface{}

ListStateToMap ...

func Lists

func Lists(s *Grid) []string

Lists gets sync entities slice

Types

type Grid

type Grid struct {
	Lists map[string]*List `json:"lists"`
}

Grid struct

type List

type List struct {
	EntID       string      `json:"entId"`
	SyncMode    spsync.Mode `json:"syncMode"`
	SyncDate    time.Time   `json:"syncDate"`
	SyncStage   string      `json:"syncStage"`
	ChangeToken string      `json:"changeToken"`
	PageToken   string      `json:"pageToken"`
	Fails       int         `json:"fails"`

	Lock *time.Time `json:"sessionLock,omitempty"`
	MD5  string     `json:"md5"`
}

List struct

func ListStateFromMap

func ListStateFromMap(m map[string]interface{}) *List

ListStateFromMap ...

type State

type State interface {
	Get() *Grid
	GetList(listUri string) *List
	Save(state *Grid) error
	SaveList(listUri string, listState *List) error
}

State interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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