api

package
v0.0.0-...-7b985c9 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTPServerTimeout         time.Duration
	HTTPServerShutdownTimeout time.Duration
	Host                      string
	Port                      string
	Hostname                  string
	Tokens                    int
	Every                     time.Duration
	Timeout                   time.Duration
	// redis connection url. ie: "localhost:6379"
	RedisAddr string
	// redis password
	Passwd string
}

type Server

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

func NewServer

func NewServer(c *Config, l *log.Logger) *Server

func (*Server) JSONResponse

func (s *Server) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{}, responseCode int)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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