http

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFilename = "http.yaml"
)

Config Constants

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                int        `yaml:"port,omitempty"`
	LimitPerSecond      int        `yaml:"limitPerSecond,omitempty"`
	Users               []UserAuth `yaml:"users,omitempty"`
	SignInExpireDays    int        `yaml:"signInExpireDays,omitempty"`
	Links               []link     `yaml:"links,omitempty"`
	LinkRetry           int        `yaml:"linkRetry,omitempty"`
	TwoFactorTimeoutSec int        `yaml:"twoFactorTimeoutSec,omitempty"`
	LoginSigningKey     string     `yaml:"loginSigningKey,omitempty"`
}

Config contains the parameters for Http

func NewConfig

func NewConfig(configPath string) *Config

NewConfig creates a new Config

type Http

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

Http manages the http server

func NewHttp

func NewHttp(manage *manage.Manage) *Http

NewHttp returns a new Http

func (*Http) Listen

func (h *Http) Listen()

Listen on port

func (*Http) Stop

func (h *Http) Stop()

Stop the http

func (*Http) Wait added in v1.39.0

func (h *Http) Wait()

type UserAuth added in v1.25.0

type UserAuth struct {
	User      string          `yaml:"user"`
	Password  string          `yaml:"password"`
	TwoFactor notify.RxConfig `yaml:"twoFactor"`
}

UserAuth contains the username, password, and optional two factor

Jump to

Keyboard shortcuts

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