models

package
v0.0.0-...-af23b48 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHash

func GenerateHash(c ComboDBMediaItem) uint64

Types

type ComboDBMediaItem

type ComboDBMediaItem struct {
	ID              string              `json:"id" db:"id"`
	Hash            uint64              `json:"hash" db:"-"`
	OccuredAt       int64               `json:"occurred_at" db:"created_at"`
	Title           string              `json:"title" db:"title"`
	Subtitle        string              `json:"subtitle" db:"subtitle"`
	Category        string              `json:"category" db:"category"`
	IsActive        bool                `json:"is_active" db:"is_active"`
	Elapsed         int                 `json:"elapsed_ms" db:"-"`
	Duration        int                 `json:"duration_ms" db:"duration_ms"`
	Source          string              `json:"source" db:"source"`
	Image           string              `json:"image" db:"image"`
	DominantColours SerializableColours `json:"dominant_colours" db:"dominant_colours"`
	Backfilled      bool                `json:"-" db:"-"`
}

Used in V4 but not renamed until V3 is deprecated

type Enclosure

type Enclosure struct {
	ID               int    `json:"id"`
	UserID           int    `json:"user_id"`
	EntryID          int    `json:"entry_id"`
	URL              string `json:"url"`
	MimeType         string `json:"mime_type"`
	Size             int64  `json:"size"`
	MediaProgression int    `json:"media_progression"`
}

type Entry

type Entry struct {
	ID          int         `json:"id"`
	UserID      int         `json:"user_id"`
	FeedID      int         `json:"feed_id"`
	Status      string      `json:"status"`
	Hash        string      `json:"hash"`
	URL         string      `json:"url"`
	CommentsURL string      `json:"comments_url"`
	PublishedAt string      `json:"published_at"`
	CreatedAt   string      `json:"created_at"`
	ChangedAt   string      `json:"changed_at"`
	Content     string      `json:"content"`
	Author      string      `json:"author"`
	ShareCode   string      `json:"share_code"`
	Starred     bool        `json:"starred"`
	ReadingTime int         `json:"reading_time"`
	Enclosures  []Enclosure `json:"enclosures"`
	Tags        []string    `json:"tags"`
	Feed        Feed        `json:"feed"`
}

type Feed

type Feed struct {
	ID        int    `json:"id"`
	UserID    int    `json:"user_id"`
	FeedURL   string `json:"feed_url"`
	SiteURL   string `json:"site_url"`
	Title     string `json:"title"`
	CheckedAt string `json:"checked_at"`
}

type MediaItem

type MediaItem struct {
	CreatedAt       int64               `json:"-"`
	Title           string              `json:"title"`
	Subtitle        string              `json:"subtitle"`
	Category        string              `json:"category"`
	IsActive        bool                `json:"is_active"`
	Elapsed         int                 `json:"elapsed_ms"`
	Duration        int                 `json:"duration_ms"`
	Source          string              `json:"source"`
	Image           string              `json:"image"`
	DominantColours SerializableColours `json:"dominant_colours"`
	Hash            uint64              `json:"hash"`
	Backfilled      bool                `json:"-"`
}

func (MediaItem) GenerateHash

func (m MediaItem) GenerateHash() uint64

type MinifluxSavedEntry

type MinifluxSavedEntry struct {
	EventType string `json:"event_type"`
	Entry     Entry  `json:"entry"`
}

type ResponseMediaItem

type ResponseMediaItem struct {
	OccuredAt       string              `json:"occurred_at"`
	Title           string              `json:"title"`
	Subtitle        string              `json:"subtitle"`
	Category        string              `json:"category"`
	Source          string              `json:"source"`
	Image           string              `json:"image"`
	Duration        int                 `json:"duration_ms"`
	Hash            uint64              `json:"hash"`
	DominantColours SerializableColours `json:"dominant_colours"`
}

type SerializableColours

type SerializableColours []string

SerializableColours is a custom DB extension type that stores a string slice as a comma separate value in the database Example input: []string{"#020304", "#6581be"} Example DB value: #020304,#6581be

func (*SerializableColours) Scan

func (s *SerializableColours) Scan(src interface{}) error

func (SerializableColours) Value

func (s SerializableColours) Value() (driver.Value, error)

type Token

type Token struct {
	ID    string `db:"id"`
	Value string `db:"value"`
}

Jump to

Keyboard shortcuts

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