app

package
v0.0.0-...-14aead9 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEmailORPassword = errors.New("wrong email or password")

Functions

func AuthRequiredMiddleware

func AuthRequiredMiddleware() echo.MiddlewareFunc

func ContextMiddleware

func ContextMiddleware(fn func(ctx context.Context) context.Context) echo.MiddlewareFunc

func ExportLayer

func ExportLayer() echo.HandlerFunc

func GraphqlAPI

func GraphqlAPI(conf config.GraphQLConfig, dev bool) echo.HandlerFunc

func NewRewriteHTMLFS

func NewRewriteHTMLFS(f afero.Fs, base, title, favicon string) (http.FileSystem, error)

func PasswordReset

func PasswordReset() echo.HandlerFunc

func Ping

func Ping() echo.HandlerFunc

func PublishedAuthMiddleware

func PublishedAuthMiddleware() echo.MiddlewareFunc

func PublishedData

func PublishedData(pattern string, useParam bool) echo.HandlerFunc

func PublishedIndex

func PublishedIndex(pattern string, useParam bool) echo.HandlerFunc

func PublishedIndexMiddleware

func PublishedIndexMiddleware(pattern string, useParam, errorIfNotFound bool) echo.MiddlewareFunc

func PublishedMetadata

func PublishedMetadata() echo.HandlerFunc

func Signup

func Signup() echo.HandlerFunc

func SignupVerify

func SignupVerify() echo.HandlerFunc

func Start

func Start(debug bool, version string)

func StartSignupVerify

func StartSignupVerify() echo.HandlerFunc

func UsecaseMiddleware

func UsecaseMiddleware(r *repo.Container, g *gateway.Container, ar *accountrepo.Container, ag *accountgateway.Container, config interactor.ContainerConfig) echo.MiddlewareFunc

Types

type AdapterFS

type AdapterFS struct {
	FSU afero.Fs
	FS  afero.Fs
}

func (*AdapterFS) Chmod

func (fs *AdapterFS) Chmod(name string, mode os.FileMode) error

func (*AdapterFS) Chown

func (fs *AdapterFS) Chown(name string, uid, gid int) error

func (*AdapterFS) Chtimes

func (fs *AdapterFS) Chtimes(name string, atime time.Time, mtime time.Time) error

func (*AdapterFS) Create

func (fs *AdapterFS) Create(name string) (afero.File, error)

func (*AdapterFS) Mkdir

func (fs *AdapterFS) Mkdir(name string, perm os.FileMode) error

func (*AdapterFS) MkdirAll

func (fs *AdapterFS) MkdirAll(path string, perm os.FileMode) error

func (*AdapterFS) Name

func (fs *AdapterFS) Name() string

func (*AdapterFS) Open

func (fs *AdapterFS) Open(name string) (afero.File, error)

func (*AdapterFS) OpenFile

func (fs *AdapterFS) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

func (*AdapterFS) Remove

func (fs *AdapterFS) Remove(name string) error

func (*AdapterFS) RemoveAll

func (fs *AdapterFS) RemoveAll(path string) error

func (*AdapterFS) Rename

func (fs *AdapterFS) Rename(oldname, newname string) error

func (*AdapterFS) Stat

func (fs *AdapterFS) Stat(name string) (os.FileInfo, error)

type ServerConfig

type ServerConfig struct {
	Config          *config.Config
	Debug           bool
	Repos           *repo.Container
	AccountRepos    *accountrepo.Container
	Gateways        *gateway.Container
	AccountGateways *accountgateway.Container
}

type WebHandler

type WebHandler struct {
	Disabled    bool
	AppDisabled bool
	WebConfig   map[string]any
	AuthConfig  *config.AuthConfig
	HostPattern string
	Title       string
	FaviconURL  string
	FS          afero.Fs
}

func (*WebHandler) Handler

func (w *WebHandler) Handler(e *echo.Echo)

type WebServer

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

func NewServer

func NewServer(ctx context.Context, cfg *ServerConfig) *WebServer

func (*WebServer) Run

func (w *WebServer) Run()

func (*WebServer) Serve

func (w *WebServer) Serve(l net.Listener) error

func (*WebServer) ServeHTTP

func (w *WebServer) ServeHTTP(wr http.ResponseWriter, r *http.Request)

func (*WebServer) Shutdown

func (w *WebServer) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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