cache

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func Read

func Read()

func SetCurrentTimeEntry

func SetCurrentTimeEntry(timeEntry toggl.TimeEntry)

func SetProjects

func SetProjects(projects toggl.Projects)

func SetWorkspaces

func SetWorkspaces(workspaces toggl.Workspaces)

func Write

func Write()

Types

type Cache

type Cache struct {
	Filename string
	Content  CacheContent
}

func New

func New(filename string) *Cache

func (*Cache) GetContent

func (c *Cache) GetContent() CacheContent

func (*Cache) Init

func (c *Cache) Init() error

func (*Cache) Read

func (c *Cache) Read() error

func (*Cache) SetCurrentTimeEntry

func (c *Cache) SetCurrentTimeEntry(timeEntry toggl.TimeEntry)

func (*Cache) SetProjects

func (c *Cache) SetProjects(projects toggl.Projects)

func (*Cache) SetWorkspaces

func (c *Cache) SetWorkspaces(workspaces toggl.Workspaces)

func (*Cache) Write

func (c *Cache) Write() error

type CacheContent

type CacheContent struct {
	CurrentTimeEntry toggl.TimeEntry  `json:"current_time_entry"`
	Projects         toggl.Projects   `json:"projects"`
	Workspaces       toggl.Workspaces `json:"workspaces"`
}

func GetContent

func GetContent() CacheContent

Jump to

Keyboard shortcuts

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