server

package
v0.0.0-...-0f898fb Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GraphiQL

func GraphiQL() gin.HandlerFunc

GraphiQL is defining as the GraphiQL Page handler

func GrqphQL

func GrqphQL(Usecase *services.UseCasesInterface) gin.HandlerFunc

GrqphQL is defining as the GraphQL handler

func Middleware

func Middleware() gin.HandlerFunc

Middleware for GraphQL resolver to pass services into ctx

Types

type ServerHTTP

type ServerHTTP struct {
	Environment    string `name:"env"`
	Port           string `name:"port"`
	Host           string `name:"host"`
	GraphiQLEnable bool   `name:"graphiql_enable"`
	Logger         *zap.Logger
	Server         *http.Server
	Manager        *autocert.Manager

	MongoDB *mongo.MongoDBHandler
	Usecase *services.UseCasesInterface
	// contains filtered or unexported fields
}

func NewServerHTTP

func NewServerHTTP(cnf config.Env, Logger *zap.Logger, UseCases *services.UseCasesInterface) *ServerHTTP

func (*ServerHTTP) StartGraphQLServer

func (s *ServerHTTP) StartGraphQLServer()

func (*ServerHTTP) StartServer

func (s *ServerHTTP) StartServer()

func (*ServerHTTP) StopServer

func (s *ServerHTTP) StopServer(ctx context.Context) error

Jump to

Keyboard shortcuts

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