server

package
v0.0.0-...-aee8074 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package server hosts the HealthKit data on http port

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionHandler

func NewSessionHandler(h http.Handler) *sessionHandler

NewSessionHandler creates a new sessionHandler

func Start

func Start(port int, f string)

Start the http server

Types

type ErrorPage

type ErrorPage struct {
	PageHeader
	Error string
}

ErrorPage data for Page records

type GoogleUserInfo

type GoogleUserInfo struct {
	Authenticated bool   // true if user is Authenticated. Set locally
	ID            string `json:"id,omitempty"`
	Email         string `json:"email,omitempty"`
	FamilyName    string `json:"family_name,omitempty"`
	GivenName     string `json:"given_name,omitempty"`
	Gender        string `json:"gender,omitempty"`
	Link          string `json:"link,omitempty"`
	Locale        string `json:"locale,omitempty"`
	Name          string `json:"name,omitempty"`
	ProfileURL    string `json:"picture,omitempty"`
	VerifiedEmail bool   `json:"verified_email,omitempty"`
}

GoogleUserInfo user data for UserInfo API call https://any-api.com/googleapis_com/oauth2/docs/userinfo/oauth2_userinfo_get

type IndexPage

type IndexPage struct {
	PageHeader
	UserID string
}

IndexPage data

type InfoPage

type InfoPage struct {
	PageHeader
}

InfoPage data for Page records

type NameActiveHREF

type NameActiveHREF struct {
	Name   string
	Active bool
	HREF   string
}

NameActiveHREF a tuple that saves name and is a section is active.

type NavPrimary struct {
	Active string // Name of active CSS class in primary navigation links
	State  string // Show "login" or "data" <if available>
}

NavPrimary data used to display "navprimary" elements

type PageHeader struct {
	Title string
	NP    NavPrimary
	NS    []NameActiveHREF // Nav secondary
}

PageHeader defines the Title of a page and Name of Active Primary Nav page. One of "records", "activity" or "summary"

type RecordsDataCategory

type RecordsDataCategory string

type RecordsPage

type RecordsPage struct {
	PageHeader
	*export.Me
	Records export.NameTypeKeyCounts
	Devices export.KeyCounts
	Types   export.KeyCounts
}

RecordsPage data for Page records

Jump to

Keyboard shortcuts

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