models

package
v0.1.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	ID                int64  `json:"id"`
	Kind              string `json:"kind"`
	Name              string `json:"name"`
	AppURL            string `json:"app_url"`
	URL               string `json:"url"`
	PostingChangesURL string `json:"posting_changes_url"`
}

type Calendar

type Calendar struct {
	ID             int64  `json:"id"`
	Name           string `json:"name"`
	Kind           string `json:"kind"`
	Owned          bool   `json:"owned"`
	Personal       bool   `json:"personal"`
	External       bool   `json:"external"`
	URL            string `json:"url"`
	RecordingsURL  string `json:"recordings_url"`
	OccurrencesURL string `json:"occurrences_url"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
}

type Contact

type Contact struct {
	ID           int64     `json:"id"`
	AccountID    int64     `json:"account_id,omitempty"`
	Name         string    `json:"name"`
	EmailAddress string    `json:"email_address"`
	Avatar       string    `json:"avatar,omitempty"`
	UpdatedAt    string    `json:"updated_at,omitempty"`
	Aliases      []Contact `json:"aliases,omitempty"`
}

type Entry

type Entry struct {
	ID                    int64     `json:"id"`
	CreatedAt             string    `json:"created_at"`
	UpdatedAt             string    `json:"updated_at"`
	Creator               Contact   `json:"creator"`
	AlternativeSenderName string    `json:"alternative_sender_name"`
	Summary               string    `json:"summary"`
	Kind                  string    `json:"kind"`
	AppURL                string    `json:"app_url"`
	Body                  string    `json:"body,omitempty"`
	BodyHTML              string    `json:"-"`
	Recipients            []Contact `json:"recipients,omitempty"`
}

type Extenzion

type Extenzion struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

Extenzion is a HEY extension (group/list) through which a topic was received.

type Folder added in v0.1.1

type Folder struct {
	ID     int64  `json:"id"`
	Name   string `json:"name"`
	AppURL string `json:"app_url"`
}

type JournalEntry

type JournalEntry struct {
	ID        int64  `json:"id"`
	Date      string `json:"date"`
	Body      string `json:"body"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type Posting

type Posting struct {
	ID                    int64       `json:"id"`
	CreatedAt             string      `json:"created_at"`
	UpdatedAt             string      `json:"updated_at"`
	ObservedAt            string      `json:"observed_at"`
	Kind                  string      `json:"kind"`
	Name                  string      `json:"name"`
	Seen                  bool        `json:"seen"`
	Bundled               bool        `json:"bundled"`
	Muted                 bool        `json:"muted"`
	Summary               string      `json:"summary"`
	EntryKind             string      `json:"entry_kind"`
	IncludesAttachments   bool        `json:"includes_attachments"`
	BubbledUp             bool        `json:"bubbled_up"`
	AppURL                string      `json:"app_url"`
	Creator               Contact     `json:"creator"`
	AlternativeSenderName string      `json:"alternative_sender_name"`
	VisibleEntryCount     int32       `json:"visible_entry_count"`
	Extenzions            []Extenzion `json:"extenzions,omitempty"`
	Folders               []Folder    `json:"folders,omitempty"`
	TopicID               int64       `json:"topic_id"`
	Topic                 *Topic      `json:"topic,omitempty"`
}

func (*Posting) ResolveTopicID

func (p *Posting) ResolveTopicID() int64

ResolveTopicID returns the topic ID for this posting, preferring the embedded topic_id/topic fields, then parsing from app_url. Returns 0 if no topic ID can be determined (e.g. bundles).

type Recording

type Recording struct {
	ID               int64     `json:"id"`
	ParentID         *int64    `json:"parent_id"`
	Title            string    `json:"title"`
	AllDay           bool      `json:"all_day"`
	Recurring        bool      `json:"recurring"`
	StartsAt         string    `json:"starts_at"`
	EndsAt           string    `json:"ends_at"`
	StartsAtTimeZone string    `json:"starts_at_time_zone"`
	EndsAtTimeZone   string    `json:"ends_at_time_zone"`
	CreatedAt        string    `json:"created_at"`
	UpdatedAt        string    `json:"updated_at"`
	Type             string    `json:"type"`
	CompletedAt      string    `json:"completed_at,omitempty"`
	Label            string    `json:"label,omitempty"`
	Calendar         *Calendar `json:"calendar,omitempty"`
	RemindersLabel   string    `json:"reminders_label,omitempty"`
	OccurrencesURL   string    `json:"occurrences_url,omitempty"`
	Content          string    `json:"content,omitempty"`
}

type RecordingsResponse

type RecordingsResponse map[string][]Recording

type Topic

type Topic struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	CreatedAt   string    `json:"created_at"`
	UpdatedAt   string    `json:"updated_at"`
	AccountID   int64     `json:"account_id"`
	AppURL      string    `json:"app_url"`
	Creator     Contact   `json:"creator"`
	Contacts    []Contact `json:"contacts"`
	LatestEntry *Entry    `json:"latest_entry,omitempty"`
}

Jump to

Keyboard shortcuts

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