api

package
v0.0.0-...-72ddd58 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const BindAddress = "bind_addr"

Variables

This section is empty.

Functions

This section is empty.

Types

type ENV

type ENV int
const (
	DEV ENV = iota
	PROD
)

type PORT

type PORT string
const (
	HttpsPort    PORT = "https_port"
	HttpPort     PORT = "http_port"
	DevHttpsPort PORT = "dev_https_port"
)

type Server

type Server struct {
	Log log.Logger

	Bind         string
	HttpsPort    int
	HttpPort     int
	DevHttpsPort int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(options ...func(s *Server) error) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(env ENV, enableHttps bool) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
analytics
Package analytics provides the methods to run an analytics reporting system for API requests which may be useful to users for measuring access and possibly identifying bad actors abusing requests.
Package analytics provides the methods to run an analytics reporting system for API requests which may be useful to users for measuring access and possibly identifying bad actors abusing requests.

Jump to

Keyboard shortcuts

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