api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Host        string
	Domain      string
	Port        int
	TLSPort     int
	TLSCertPath string
	TLSKeyPath  string
	StatusPath  string
	Storage     app.Storage
}

Server represents the API server.

func (*Server) Addr

func (s *Server) Addr(port int) string

Addr returns an address in the format expected by http.Server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(err chan error)

ListenAndServe sets the necessary conditions for the underlying http.Server to serve the API via HTTPS.

Any errors are returned via the received channel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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