servermain

package
v0.0.0-...-301faa4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotLoggedIn = errors.New("you are not logged in")

Functions

func Main

func Main()

func ServeApp

func ServeApp(
	webSession websessioncp.WebSession,
	w http.ResponseWriter,
	req *http.Request,
	rootHost string,
)

Types

type Config

type Config struct {
	HTTP HTTPConfig
	SMTP SMTPConfig
}

func ConfigFromSettings

func ConfigFromSettings(lg *slog.Logger, src settings.Source) Config

type ContainerSet

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

func (*ContainerSet) Get

func (cset *ContainerSet) Get(ctx context.Context, lg *slog.Logger, db database.DB, grainID types.GrainID) (container.Container, error)

func (*ContainerSet) Release

func (cset *ContainerSet) Release()

type HTTPConfig

type HTTPConfig struct {
	RootDomain        string // Main Tempest domain name
	Port              string
	TLSPort           string
	CertFile, KeyFile string
	DefaultTLS        bool
}

func HTTPConfigFromSettings

func HTTPConfigFromSettings(lg *slog.Logger, src settings.Source) HTTPConfig

type SMTPConfig

type SMTPConfig struct {
	Host     string
	Port     string
	Username string
	Password string
}

func SMTPConfigFromSettings

func SMTPConfigFromSettings(src settings.Source) SMTPConfig

func (SMTPConfig) SendMail

func (c SMTPConfig) SendMail(to []string, msg []byte) error

Jump to

Keyboard shortcuts

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