Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AccountNeedUpdate() (needUpdate bool)
- func (c *Cache) AccountSet(account *toggl.Account) error
- func (c *Cache) ClientByID(clientID, workspace int) (client *toggl.Client, err error)
- func (c *Cache) ClientMetaData(workspace int) (m *MetaData, err error)
- func (c *Cache) Clients(workspace int) (clients []toggl.Client, err error)
- func (c *Cache) Close() error
- func (c *Cache) GetAccount() (acc toggl.Account, err error)
- func (c *Cache) NeedUpdate(workspace int) bool
- func (c *Cache) ProjectByID(projectID, workspace int) (project *toggl.Project, err error)
- func (c *Cache) ProjectMetaData(workspace int) (m *MetaData, err error)
- func (c *Cache) Projects(workspace int) (projects []toggl.Project, err error)
- func (c *Cache) SetClients(workspace int, clients []toggl.Client) error
- func (c *Cache) SetProjects(workspace int, projects []toggl.Project) error
- type MetaData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewCache ¶
NewCache creates a cache layer instance and returns it inner workings like options are not yet available
func (*Cache) AccountNeedUpdate ¶
NeedUpdate returns true if cache needs a refresh
func (*Cache) AccountSet ¶
AccountSet can be used to update the value of the account in the cache
func (*Cache) ClientByID ¶
func (*Cache) ClientMetaData ¶
ProjectMetaData returns meta data about the projects cache
func (*Cache) GetAccount ¶
AccountSet can be used to update the value of the account in the cache
func (*Cache) NeedUpdate ¶
NeedUpdate returns true if cache needs a refresh
func (*Cache) ProjectByID ¶
func (*Cache) ProjectMetaData ¶
ProjectMetaData returns meta data about the projects cache
func (*Cache) SetClients ¶
func (*Cache) SetProjects ¶
SetProjects stores provided projects in cache
Source Files ¶
Click to show internal directories.
Click to hide internal directories.