models

package
v0.0.0-...-252d32f Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	ID        uuid.UUID `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Url       string    `json:"url"`
	UserID    uuid.UUID `json:"user_id"`
}

func ConvertDatabaseFeedToAPIFeed

func ConvertDatabaseFeedToAPIFeed(dbFeed database.Feed) Feed

func ConvertDatabaseFeedsToAPIFeeds

func ConvertDatabaseFeedsToAPIFeeds(dbFeeds []database.Feed) []Feed

type FeedFollow

type FeedFollow struct {
	ID        uuid.UUID `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	UserID    uuid.UUID `json:"user_id"`
	FeedID    uuid.UUID `json:"feed_id"`
}

func ConvertDatabaseFeedFollowToAPIFeedFollow

func ConvertDatabaseFeedFollowToAPIFeedFollow(dbFeedFollow database.FeedFollow) FeedFollow

func ConvertDatabaseFeedFollowsToAPIFeedFollows

func ConvertDatabaseFeedFollowsToAPIFeedFollows(dbFeedFollows []database.FeedFollow) []FeedFollow

type Post

type Post struct {
	ID          uuid.UUID `json:"id"`
	Title       string    `json:"title"`
	Description *string   `json:"description"`
	PublishedAt time.Time `json:"published_at"`
	Url         string    `json:"url"`
	FeedID      uuid.UUID `json:"feed_id"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

func ConvertDatabasePostToAPIPost

func ConvertDatabasePostToAPIPost(dbPost database.Post) Post

func ConvertDatabasePostsToAPIPosts

func ConvertDatabasePostsToAPIPosts(dbPosts []database.Post) []Post

type RSSFeed

type RSSFeed struct {
	Channel struct {
		Title       string    `xml:"title"`
		Link        string    `xml:"link"`
		Description string    `xml:"description"`
		Language    string    `xml:"language"`
		Item        []RSSItem `xml:"item"`
	} `xml:"channel"`
}

type RSSItem

type RSSItem struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	Description string `xml:"description"`
	PubDate     string `xml:"pubDate"`
}

type User

type User struct {
	ID           uuid.UUID `json:"id"`
	Name         string    `json:"name"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	ApiKey       string    `json:"api_key"`
	Email        string    `json:"email"`
	AccessToken  string    `json:"access_token,omitempty"`
	RefreshToken string    `json:"refresh_token,omitempty"`
}

func ConvertDatabaseUserToAPIUser

func ConvertDatabaseUserToAPIUser(dbUser database.User, accessToken, refreshToken string) User

Jump to

Keyboard shortcuts

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