server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlashMessage

type FlashMessage struct {
	Message string
	Type    string
}

type Server

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

func NewServer

func NewServer(store StoreInterface, oidcConfig *baseliboidc.OidcConfiguration, sessionKey string) (*Server, error)

func (*Server) Start

func (s *Server) Start(addr string) error

func (*Server) StartWithContext

func (s *Server) StartWithContext(ctx context.Context, addr string) error

type StoreInterface

type StoreInterface interface {
	GetUserFeeds(userID int64) ([]db.Feed, error)
	GetFeedPosts(feedID, userID int64, limit int) ([]db.Post, error)
	GetPost(postID int64) (*db.Post, error)
	GetOrCreateUser(subject, issuer string) (int64, error)
	AddFeed(url string) (int64, error)
	AddFeedForUser(userID int64, url string) (int64, error)
	UpdateFeedTitle(feedID int64, title string) error
	AddPost(feedID int64, guid, title, link string, publishedAt time.Time, content string) error
	DeleteFeed(feedID string) error
	MarkPostAsSeen(userID int64, postID string) error
	MarkAllFeedPostsAsSeen(userID int64, feedID string) error
	GetUserPostsPerFeed(userID int64) (int, error)
	SetUserPostsPerFeed(userID int64, postsPerFeed int) error
}

StoreInterface defines the interface that the server needs

Jump to

Keyboard shortcuts

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