http

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 28 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            []UserPassword `yaml:"users,omitempty"`
	SignInExpireDays int            `yaml:"signInExpireDays,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 UserPassword

type UserPassword struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

UserPassword contains the username and password

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