server

package
v0.0.0-...-8c928bc Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *database.Queries) *http.Server

Types

type Feed

type Feed struct {
	Id            uuid.UUID  `json:"id"`
	CreatedAt     time.Time  `json:"created_at"`
	UpdatedAt     time.Time  `json:"updated_at"`
	Name          string     `json:"name"`
	Url           string     `json:"url"`
	UserId        uuid.UUID  `json:"user_id"`
	LastFetchedAt *time.Time `json:"last_fetched_at"`
}

func ConvertFeedModelToResource

func ConvertFeedModelToResource(feed 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"`
	FeedId    uuid.UUID `json:"feed_id"`
	UserId    uuid.UUID `json:"user_id"`
}

func ConvertFeedFollowModelToResource

func ConvertFeedFollowModelToResource(feedFollow database.Feedfollow) FeedFollow

type FeedFollows

type FeedFollows []FeedFollow

type Feeds

type Feeds []Feed

type Post

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

this is resource post

func ConvertPostModelToResource

func ConvertPostModelToResource(post database.Post) Post

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes() http.Handler

type User

type User struct {
	Id        uuid.UUID `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Name      string    `json:"name"`
	ApiKey    string    `json:"api_key"`
}

func ConvertUserModelToResource

func ConvertUserModelToResource(user database.User) User

Jump to

Keyboard shortcuts

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