healthkit

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package healthkit contains Apple's HealthKit types and constans.

Index

Constants

View Source
const (
	BiologicalSexFemale = BiologicalSex("HKBiologicalSexFemale")
	BiologicalSexMale   = BiologicalSex("HKBiologicalSexMale")
	BiologicalSexOther  = BiologicalSex("HKBiologicalSexOther")
)
View Source
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")
)
View Source
const (
	CategoryValueSleepAnalysisInBed  = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisInBed")
	CategoryValueSleepAnalysisAsleep = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisAsleep")
	CategoryValueSleepAnalysisAwake  = CategoryValueSleepAnalysis("HKCategoryValueSleepAnalysisAwake")
)

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"`
}

func (*ActivitySummary) String

func (as *ActivitySummary) String() string

type BiologicalSex

type BiologicalSex string

type BloodType

type BloodType string

type CategoryValueSleepAnalysis

type CategoryValueSleepAnalysis string

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"`
}

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

type Data

type Data interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

type ExportDate

type ExportDate struct {
	XMLName xml.Name `xml:"ExportDate"`
	Value   string   `xml:"value,attr"`
}

type HeartRateVariabilityMetadataList

type HeartRateVariabilityMetadataList struct {
	XMLName                     xml.Name                       `xml:"HeartRateVariabilityMetadataList"`
	InstantaneousBeatsPerMinute []*InstantaneousBeatsPerMinute `xml:"InstantaneousBeatsPerMinute"`
}

type InstantaneousBeatsPerMinute

type InstantaneousBeatsPerMinute struct {
	XMLName xml.Name `xml:"InstantaneousBeatsPerMinute"`
	Bpm     int      `xml:"bpm,attr"`
	Time    string   `xml:"time,attr"`
}

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

func (me *Me) DateOfBirthTime() time.Time

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"`
}

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 (r *Record) CreationDateTime() time.Time

func (*Record) DeviceMap

func (r *Record) DeviceMap() map[string]string

func (*Record) EndDateTime

func (r *Record) EndDateTime() time.Time

func (*Record) StartDateTime

func (r *Record) StartDateTime() time.Time

func (*Record) String

func (r *Record) String() string

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"`
}

func (*Workout) CreationDateTime

func (w *Workout) CreationDateTime() time.Time

func (*Workout) EndDateTime

func (w *Workout) EndDateTime() time.Time

func (*Workout) StartDateTime

func (w *Workout) StartDateTime() time.Time

func (*Workout) String

func (w *Workout) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL