Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the config directory where files are being stored.
func ExistingUser ¶
ExistingUser tells us if the user exists or not.
func OpenUserFile ¶
OpenUserFile is used to open up the file for the specified user.
Types ¶
type Data ¶
type Data struct {
Exercise []Exercise `json:"exercise,omitempty"`
}
Data has the xml data for the initial data tag and then incorporates the Exercise struct.
func ReadEncryptedJSON ¶
ReadEncryptedJSON reads encrypted data and then outputs the JSON as a struct.
func ReadJSON ¶
ReadJSON is an adaptation of ReadEncryptedJSON that handles already unencrypted JSON text.
type Exercise ¶
type Exercise struct { Time time.Time `json:"time,omitempty"` Date string `json:"date,omitempty"` Clock string `json:"clock,omitempty"` Activity string `json:"activity,omitempty"` Distance float64 `json:"distance,omitempty"` Duration float64 `json:"duration,omitempty"` Reps uint32 `json:"reps,omitempty"` Sets uint32 `json:"sets,omitempty"` Comment string `json:"comment,omitempty"` }
Exercise keeps track of the data for each exercise that the user has done.
Click to show internal directories.
Click to hide internal directories.