Documentation ¶
Overview ¶
Package healthkit contains Apple's HealthKit types and constants.
Index ¶
Constants ¶
const ( BiologicalSexFemale = BiologicalSex("HKBiologicalSexFemale") BiologicalSexMale = BiologicalSex("HKBiologicalSexMale") BiologicalSexOther = BiologicalSex("HKBiologicalSexOther") )
BiologicalSex constants.
const ( BloodTypeAPositive = BloodType("HKBloodTypeAPositive") BloodTypeANegative = BloodType("HKBloodTypeANegative") BloodTypeBPositive = BloodType("HKBloodTypeBPositive") BloodTypeBNegative = BloodType("HKBloodTypeBNegative") BloodTypeABPositive = BloodType("HKBloodTypeABPositive") BloodTypeABNegative = BloodType("HKBloodTypeABNegative") BloodTypeOPositive = BloodType("HKBloodTypeOPositive") BloodTypeONegative = BloodType("HKBloodTypeONegative") )
BloodType constants.
const ( CategoryValueSleepAnalysisInBed = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisInBed") CategoryValueSleepAnalysisAsleep = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisAsleep") CategoryValueSleepAnalysisAwake = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisAwake") )
CategoryValueSleepAnalysis constants.
const ( MetadataKeyExternalUUID = MetadataKey("HKExternalUUID") MetadataKeyTimeZone = MetadataKey("HKTimeZone") MetadataKeyWasUserEntered = MetadataKey("HKWasUserEntered") )
MetadataKey constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivitySummary ¶
type ActivitySummary struct { XMLName xml.Name `xml:"ActivitySummary"` DateComponents string `xml:"dateComponents,attr"` ActiveEnergyBurned string `xml:"activeEnergyBurned,attr"` ActiveEnergyBurnedGoal string `xml:"activeEnergyBurnedGoal,attr"` ActiveEnergyBurnedUnit string `xml:"activeEnergyBurnedUnit,attr"` AppleMoveMinutes string `xml:"appleMoveMinutes,attr"` AppleMoveMinutesGoal string `xml:"appleMoveMinutesGoal,attr"` AppleExerciseTime string `xml:"appleExerciseTime,attr"` AppleExerciseTimeGoal string `xml:"appleExerciseTimeGoal,attr"` AppleStandHours string `xml:"appleStandHours,attr"` AppleStandHoursGoal string `xml:"appleStandHoursGoal,attr"` }
ActivitySummary contains the move, exercise, and stand data for a given day. https://developer.apple.com/documentation/healthkit/hkactivitysummary
func (*ActivitySummary) String ¶
func (as *ActivitySummary) String() string
String returns the object's string representation useful for logging and debugging.
type BiologicalSex ¶
type BiologicalSex string
BiologicalSex indicates the user’s sex. https://developer.apple.com/documentation/healthkit/hkbiologicalsex
type BloodType ¶
type BloodType string
BloodType indicates the user’s blood type. https://developer.apple.com/documentation/healthkit/hkbloodtype
type CategoryValueSleepAnalysis ¶
type CategoryValueSleepAnalysis string
CategoryValueSleepAnalysis represents the result of a sleep analysis. https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis
type Correlation ¶
type Correlation struct { XMLName xml.Name `xml:"Correlation"` Type string `xml:"type,attr"` SourceName string `xml:"sourceName,attr"` SourceVersion string `xml:"sourceVersion,attr"` Device string `xml:"device,attr"` CreationDate string `xml:"creationDate,attr"` StartDate string `xml:"startDate,attr"` EndDate string `xml:"endDate,attr"` MetadataEntry []*MetadataEntry `xml:"MetadataEntry"` Record []*Record `xml:"Record"` }
Correlation is a sample that groups multiple related samples into a single entry. https://developer.apple.com/documentation/healthkit/hkcorrelation
func (*Correlation) CreationDateTime ¶
func (c *Correlation) CreationDateTime() time.Time
func (*Correlation) EndDateTime ¶
func (c *Correlation) EndDateTime() time.Time
func (*Correlation) StartDateTime ¶
func (c *Correlation) StartDateTime() time.Time
func (*Correlation) String ¶
func (c *Correlation) String() string
String returns the object's string representation useful for logging and debugging.
type ExportDate ¶
type HeartRateVariabilityMetadataList ¶
type HeartRateVariabilityMetadataList struct { XMLName xml.Name `xml:"HeartRateVariabilityMetadataList"` InstantaneousBeatsPerMinute []*InstantaneousBeatsPerMinute `xml:"InstantaneousBeatsPerMinute"` }
type Me ¶
type Me struct { XMLName xml.Name `xml:"Me"` DateOfBirth string `xml:"HKCharacteristicTypeIdentifierDateOfBirth,attr"` BiologicalSex BiologicalSex `xml:"HKCharacteristicTypeIdentifierBiologicalSex,attr"` BloodType BloodType `xml:"HKCharacteristicTypeIdentifierBloodType,attr"` FitzpatrickSkinType string `xml:"HKCharacteristicTypeIdentifierFitzpatrickSkinType,attr"` }
func (*Me) DateOfBirthTime ¶
type Meta ¶
type Meta struct { Locale string ExportDate ExportDate Me Me }
type MetadataEntry ¶
type MetadataEntry struct { XMLName xml.Name `xml:"MetadataEntry"` Key string `xml:"key,attr"` Value string `xml:"value,attr"` }
func (*MetadataEntry) String ¶ added in v0.2.0
func (me *MetadataEntry) String() string
String returns the object's string representation useful for logging and debugging.
type MetadataKey ¶ added in v0.2.0
type MetadataKey string
MetadataKey is used to add metadata to objects stored in HealthKit. https://developer.apple.com/documentation/healthkit/samples/metadata_keys
type Record ¶
type Record struct { XMLName xml.Name `xml:"Record"` Type string `xml:"type,attr"` Unit string `xml:"unit,attr"` Value string `xml:"value,attr"` SourceName string `xml:"sourceName,attr"` SourceVersion string `xml:"sourceVersion,attr"` Device string `xml:"device,attr"` CreationDate string `xml:"creationDate,attr"` StartDate string `xml:"startDate,attr"` EndDate string `xml:"endDate,attr"` MetadataEntry []*MetadataEntry `xml:"MetadataEntry"` HeartRateVariabilityMetadataList []*HeartRateVariabilityMetadataList `xml:"HeartRateVariabilityMetadataList"` }
func (*Record) CreationDateTime ¶
func (*Record) EndDateTime ¶
func (*Record) StartDateTime ¶
type Workout ¶
type Workout struct { XMLName xml.Name `xml:"Workout"` WorkoutActivityType string `xml:"workoutActivityType,attr"` Duration string `xml:"duration,attr"` DurationUnit string `xml:"durationUnit,attr"` TotalDistance string `xml:"totalDistance,attr"` TotalDistanceUnit string `xml:"totalDistanceUnit,attr"` TotalEnergyBurned string `xml:"totalEnergyBurned,attr"` TotalEnergyBurnedUnit string `xml:"totalEnergyBurnedUnit,attr"` SourceName string `xml:"sourceName,attr"` SourceVersion string `xml:"sourceVersion,attr"` CreationDate string `xml:"creationDate,attr"` StartDate string `xml:"startDate,attr"` EndDate string `xml:"endDate,attr"` MetadataEntry []*MetadataEntry `xml:"MetadataEntry"` }