server

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package server is for all the SPV Wallet settings and HTTP server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupServerRoutes added in v0.16.0

func SetupServerRoutes(appConfig *config.AppConfig, services *config.AppServices, engine *gin.Engine)

SetupServerRoutes will register endpoints for all models

Types

type Server

type Server struct {
	AppConfig *config.AppConfig
	Router    *gin.Engine
	Services  *config.AppServices
	WebServer *http.Server
}

Server is the configuration, services, and actual web server

func NewServer

func NewServer(appConfig *config.AppConfig, services *config.AppServices) *Server

NewServer will return a new server service

func (*Server) Handlers

func (s *Server) Handlers() *gin.Engine

Handlers will return handlers

func (*Server) Serve

func (s *Server) Serve()

Serve will load a server and start serving

func (*Server) Shutdown

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

Shutdown will stop the web server

type WriterFunc added in v0.16.0

type WriterFunc func(p []byte) (n int, err error)

WriterFunc wrapper type for function that is implementing io.Writer interface.

func (WriterFunc) Write added in v0.16.0

func (f WriterFunc) Write(p []byte) (n int, err error)

Write proxy to implement io.Writer interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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