infra

package
v0.0.0-...-9165fae Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CobraInitialization

func CobraInitialization()

func DatabaseConfig

func DatabaseConfig(cmd *cobra.Command)

func LoggerConfig

func LoggerConfig(rootCmd *cobra.Command)

func ServerConfig

func ServerConfig(cmd *cobra.Command)

func SetCors

func SetCors(engine *gin.Engine, allowedOrigins string)

SetCors is a helper to set current engine cors

Types

type GinServer

type GinServer struct {
	Router *gin.Engine
	// contains filtered or unexported fields
}

GinServer : the struct gathering all the server details

func NewServer

func NewServer(port int, mode GinServerMode) GinServer

NewServer

func (GinServer) Start

func (s GinServer) Start()

Start the server

type GinServerMode

type GinServerMode int
const (
	DebugMode GinServerMode = iota
	ReleaseMode
	TestMode
)

Jump to

Keyboard shortcuts

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