Documentation
¶
Index ¶
- func Load(projectID string) (*api.Project, bool)
- func LoadUserInfo() (*api.UserInfo, bool)
- func ResolveCategory(project *api.Project, nameOrID string) (int, error)
- func ResolveCurrency(project *api.Project, nameOrID string) (*api.Currency, error)
- func ResolveMember(project *api.Project, username string) (int, error)
- func ResolvePaymentMode(project *api.Project, nameOrID string) (int, error)
- func Save(projectID string, project *api.Project) error
- func SaveUserInfo(userInfo *api.UserInfo) error
- func SymbolToISO(symbol string) string
- type CachedProject
- type CachedUserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadUserInfo ¶ added in v1.2.0
LoadUserInfo retrieves cached user info if it exists and is not expired
func ResolveCategory ¶
ResolveCategory finds a category by name (case-insensitive, substring) or ID and returns the ID
func ResolveCurrency ¶
ResolveCurrency finds a currency by name (case-insensitive), ID, or currency code symbol and returns the currency
func ResolveMember ¶
ResolveMember finds a member by username (case-insensitive) and returns their ID
func ResolvePaymentMode ¶
ResolvePaymentMode finds a payment mode by name (case-insensitive, substring) or ID and returns the ID
func SaveUserInfo ¶ added in v1.2.0
SaveUserInfo stores user info in the cache
func SymbolToISO ¶ added in v1.2.0
SymbolToISO returns the uppercase ISO currency code for a given symbol. For ambiguous symbols (e.g. "$"), it prefers USD.
Types ¶
Click to show internal directories.
Click to hide internal directories.