server

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(ctx context.Context) *zap.Logger

GetLogger returns the logger instance from the context

func GetMapper

func GetMapper(ctx context.Context) *mapper.Mapper

GetMapper returns the mapper instance from the context

Types

type Data

type Data struct {
	Host                     string
	Port                     string
	HTTPS                    bool
	AppPath                  string
	GraphqlURIPath           string
	GraphqlURL               string
	GraphqlPlaygroundEnabled bool
	GraphqlPlaygroundURIPath string
	GraphqlPlaygroundUrl     string
}

type LoggerKey

type LoggerKey int

type MapperKey

type MapperKey int

type Server

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

func New

func New(cliProject *project.CliProject) (s *Server, err error)

New creates a new server instance

func (*Server) GetDataFromCliContext

func (s *Server) GetDataFromCliContext() *Data

GetDataFromCliContext returns the data from the cli context for the server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(serverConstructor common.Constructor) error

func (*Server) TestServer

func (s *Server) TestServer(serverConstructor common.Constructor) (testSrv *httptest.Server, cancel func())

TestServer creates a new test server instance

Jump to

Keyboard shortcuts

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