http

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 37 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"`
}

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

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

Directories

Path Synopsis
Package websockets is a wrapper for gofiber websocket.
Package websockets is a wrapper for gofiber websocket.

Jump to

Keyboard shortcuts

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