http

package
v0.0.0-...-80f9fc5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(s *Server, w http.ResponseWriter, r *http.Request, err error)

func SetError

func SetError(w http.ResponseWriter, err error)

func SetFlash

func SetFlash(w http.ResponseWriter, value string)

Types

type Config

type Config struct {
	Address   string `koanf:"address"`
	JWTSecret []byte `koanf:"jwt_secret"`
}

type Option

type Option func(*Config)

type Server

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

func NewServer

func NewServer(storage *storage.Storage, pbCli pb.ControllerServiceClient, opts ...Option) *Server

func (*Server) Address

func (s *Server) Address() string

func (*Server) Serve

func (s *Server) Serve() (err error)

func (*Server) ShutDown

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

Jump to

Keyboard shortcuts

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