Documentation
¶
Overview ¶
Package www serves the Web application.
Index ¶
- Variables
- type OptionFunc
- func WithBookmarkServices(bookmarkService *bookmark.Service, exportingService *bookmarkexporting.Service, ...) OptionFunc
- func WithCSRFKey(csrfKey string) OptionFunc
- func WithFeedServices(feedService *feed.Service, feedExportingService *feedexporting.Service, ...) OptionFunc
- func WithMetricsRegistry(prefix string, registry *prometheus.Registry) OptionFunc
- func WithPublicURL(publicURL *url.URL) OptionFunc
- func WithSessionService(sessionService *session.Service) OptionFunc
- func WithUserService(userService *user.Service) OptionFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerCSRFKeyRequired = errors.New("server: csrf key required") ErrServerMetricsPrefixRequired = errors.New("server: metrics prefix required") ErrServerMetricsRegistryRequired = errors.New("server: metrics registry required") ErrServerPublicURLRequired = errors.New("server: public url required") ErrServerBookmarkServiceRequired = errors.New("server: bookmark service required") ErrServerBookmarkExportingServiceRequired = errors.New("server: bookmark exporting service required") ErrServerBookmarkImportingServiceRequired = errors.New("server: bookmark importing service required") ErrServerBookmarkQueryingServiceRequired = errors.New("server: bookmark querying service required") ErrServerFeedServiceRequired = errors.New("server: feed service required") ErrServerFeedExportingServiceRequired = errors.New("server: feed exporting service required") ErrServerFeedImportingServiceRequired = errors.New("server: feed importing service required") ErrServerFeedQueryingServiceRequired = errors.New("server: feed querying service required") ErrServerSessionServiceRequired = errors.New("server: session service required") ErrServerUserServiceRequired = errors.New("server: user service required") )
Functions ¶
This section is empty.
Types ¶
type OptionFunc ¶ added in v0.5.0
OptionFunc represents a function that configures a set of options for a Server.
func WithBookmarkServices ¶
func WithBookmarkServices( bookmarkService *bookmark.Service, exportingService *bookmarkexporting.Service, importingService *bookmarkimporting.Service, queryingService *bookmarkquerying.Service, ) OptionFunc
WithBookmarkServices sets the bookmark management services.
func WithCSRFKey ¶
func WithCSRFKey(csrfKey string) OptionFunc
WithCSRFKey sets the CSRF key used to secure HTML forms.
func WithFeedServices ¶
func WithFeedServices( feedService *feed.Service, feedExportingService *feedexporting.Service, feedImportingService *feedimporting.Service, feedQueryingService *feedquerying.Service, ) OptionFunc
WithFeedServices sets the feed management services.
func WithMetricsRegistry ¶
func WithMetricsRegistry(prefix string, registry *prometheus.Registry) OptionFunc
WithMetricsRegistry sets the Prometheus metrics registry used to expose application metrics.
func WithPublicURL ¶
func WithPublicURL(publicURL *url.URL) OptionFunc
WithPublicURL sets the public URL the application is accessible at.
This URL is used to generate absolute URLs for permalinks and feeds.
func WithSessionService ¶
func WithSessionService(sessionService *session.Service) OptionFunc
WithSessionService sets the user session management service.
func WithUserService ¶
func WithUserService(userService *user.Service) OptionFunc
WithUserService sets the user management service.
Click to show internal directories.
Click to hide internal directories.