presentation

package
v0.0.0-...-4605876 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SmartdukaServiceAllowedHeaders = []string{
	"Accept",
	"Accept-Charset",
	"Accept-Language",
	"Accept-Encoding",
	"Origin",
	"Host",
	"User-Agent",
	"Content-Length",
	"Content-Type",
	"Authorization",
	"X-Authorization",
}

SmartdukaServiceAllowedHeaders is a list of CORS allowed headers for the clinical service

View Source
var SmartdukaServiceAllowedOrigins = []string{
	"http://localhost:8080",
}

SmartdukaServiceAllowedOrigins is a list of CORS origins allowed to interact with this service

Functions

func GQLHandler

func GQLHandler(ctx context.Context,
	usecase usecases.Smartduka,
) gin.HandlerFunc

GQLHandler sets up a GraphQL resolver

func HealthStatusCheck

func HealthStatusCheck(w gin.ResponseWriter, r *http.Request)

HealthStatusCheck endpoint to check if the server is working.

func PlaygroundHandler

func PlaygroundHandler() gin.HandlerFunc

Defining the Playground handler

func PrepareServer

func PrepareServer(
	ctx context.Context,
	port int,
	allowedOrigins []string,
) *http.Server

PrepareServer sets up the HTTP server

func StartGinRouter

func StartGinRouter(ctx context.Context) (*gin.Engine, error)

StartGinRouter sets up the GIN router

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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