server

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDryRunFinished = errors.New("dry run finished")

Functions

This section is empty.

Types

type FilterRepository

type FilterRepository interface {
	GetFilter(name string) (*filters.Filter, error)
	GetFilters() []*filters.Filter
	GetTags() []string
	Render(w io.Writer, name string, data map[string]interface{}) error
}

type Options

type Options struct {
	Address       string `default:"127.0.0.1:8765" help:"address to listen to"`
	SystemdSocket bool   `help:"use a systemd socket instead of opening a port"`
	Debug         bool   `help:"log with debug level"`
	DryRun        bool   `help:"instantiate all components and exit"`
	KratosURL     string `default:"http://localhost:4000/.ory" help:"url of the kratos API, defaults to using local proxy"`
	Reload        bool   `help:"reload frontend when the backend restarts"`
	Statsd        string `placeholder:"localhost:8125" help:"address to send statsd metrics to, disabled by default"`
	DatabaseName  string `default:"letsblockit" help:"psql database name to use"`
	DatabaseHost  string `default:"/var/run/postgresql" help:"psql host to connect to"`
	// contains filtered or unexported fields
}

type PageRenderer

type PageRenderer interface {
	RegisterHelpers(helpers map[string]interface{})
	Render(c echo.Context, name string, data *pages.Context) error
	RenderWithSidebar(c echo.Context, name, sidebar string, data *pages.Context) error
}

type ReleaseClient

type ReleaseClient interface {
	GetReleases() ([]*news.Release, error)
	GetLatestAt() (time.Time, error)
}

type Server

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

func NewServer

func NewServer(options *Options) *Server

func (*Server) Start

func (s *Server) Start() error

type UserPreferenceManager

type UserPreferenceManager interface {
	Get(c echo.Context, user uuid.UUID) (*db.UserPreference, error)
	UpdateNewsCursor(c echo.Context, user uuid.UUID, at time.Time) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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