Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiRequestRetryConfig ¶
type DiaryData ¶
type DiaryData struct { FromDate time.Time ToDate time.Time AggregatedDayData []FoodEntryDayData DiaryData []FoodEntryData }
type FatSOauth1Keys ¶
type FatSOauth1Service ¶
type FatSOauth1Service struct { Keys FatSOauth1Keys // contains filtered or unexported fields }
func NewFatSOauth1Service ¶
func NewFatSOauth1Service(keys FatSOauth1Keys) *FatSOauth1Service
func (*FatSOauth1Service) Authorize ¶
func (s *FatSOauth1Service) Authorize() error
func (*FatSOauth1Service) GetAuthCode ¶
func (s *FatSOauth1Service) GetAuthCode() error
func (*FatSOauth1Service) GetRequestToken ¶
func (s *FatSOauth1Service) GetRequestToken() error
type FatSecret ¶
type FatSecret struct {
// contains filtered or unexported fields
}
func (*FatSecret) FoodEntriesGet ¶
func (s *FatSecret) FoodEntriesGet(date time.Time) (*FoodEntriesData, error)
func (*FatSecret) FoodEntriesGetMonth ¶
func (s *FatSecret) FoodEntriesGetMonth(fromDate time.Time) (*FoodEntriesMonthData, error)
type FoodEntriesData ¶
type FoodEntriesData struct { FoodEntries struct { FoodEntry []FoodEntryData } }
func FoodEntriesDataFromRaw ¶
func FoodEntriesDataFromRaw(rawData FoodEntriesDataRaw) (*FoodEntriesData, error)
type FoodEntriesDataRaw ¶
type FoodEntriesDataRaw struct { FoodEntries struct { FoodEntry []FoodEntryDataRaw `mapstructure:"food_entry"` Other map[string]interface{} `mapstructure:",remain"` } `mapstructure:"food_entries"` Other map[string]interface{} `mapstructure:",remain"` }
type FoodEntriesMonthData ¶
type FoodEntriesMonthData struct { Month struct { Day []FoodEntryDayData FromDateInt int64 ToDateInt int64 FromDate time.Time ToDate time.Time } }
func FoodEntriesMonthDataFromRaw ¶
func FoodEntriesMonthDataFromRaw(rawData *FoodEntriesMonthDataRaw) (*FoodEntriesMonthData, error)
type FoodEntriesMonthDataRaw ¶
type FoodEntriesMonthDataRaw struct { Month struct { Day []FoodEntryDayDataRaw FromDateInt string `mapstructure:"from_date_int"` ToDateInt string `mapstructure:"to_date_int"` Other map[string]interface{} `mapstructure:",remain"` } Other map[string]interface{} `mapstructure:",remain"` }
type FoodEntryData ¶
type FoodEntryData struct { DateInt int64 Date time.Time FoodId int64 FoodEntryId int64 ServingId int64 FoodEntryName string FoodEntryDescription string NumberOfUnits float64 Meal string Protein float64 Calories float64 Carbohydrate float64 Fat float64 Fiber float64 Sugar float64 Calcium float64 Cholesterol float64 Iron float64 MonounsaturatedFat float64 PolyunsaturatedFat float64 SaturatedFat float64 TransFat float64 VitaminA float64 VitaminC float64 Sodium float64 Potassium float64 }
type FoodEntryDataRaw ¶
type FoodEntryDataRaw struct { DateInt string `mapstructure:"date_int"` FoodId string `mapstructure:"food_id"` FoodEntryId string `mapstructure:"food_entry_id"` ServingId string `mapstructure:"serving_id"` FoodEntryName string `mapstructure:"food_entry_name"` FoodEntryDescription string `mapstructure:"food_entry_description"` NumberOfUnits string `mapstructure:"number_of_units"` Meal string Protein string Calories string Carbohydrate string Fat string Fiber string Sugar string Calcium string Cholesterol string Iron string MonounsaturatedFat string `mapstructure:"monounsaturated_fat"` PolyunsaturatedFat string `mapstructure:"polyunsaturated_fat"` SaturatedFat string `mapstructure:"saturated_fat"` TransFat string `mapstructure:"trans_fat"` VitaminA string `mapstructure:"vitamin_a"` VitaminC string `mapstructure:"vitamin_c"` Sodium string Potassium string Other map[string]interface{} `mapstructure:",remain"` }
type FoodEntryDayData ¶
Click to show internal directories.
Click to hide internal directories.