shareddeps

package module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: GPL-3.0 Imports: 8 Imported by: 2

README

  • Viper for configuration
  • Zap for logging
  • Gin Gonic for HTTP server
  • go-playground/validator for validation

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Server *gin.Engine

Functions

func AddAuth added in v0.3.0

func AddAuth(
	policyAdapter persist.Adapter,
	authentication Authentication,
)

AddAuth adds authentication and authorization middleware to the server. Must be called after Init and before Start.

func Init

func Init[T config.HasBaseConfig](
	cfg T,
	serviceName, version string, defaultValues ...config.DefaultValue,
)

GetConfig is the main function for consumers to load and get their configuration. It takes a pointer to any struct type that defines the configuration schema. The struct should have appropriate mapstructure and validate tags. Must be called before Init.

func Start

func Start()

Types

type Authentication added in v0.2.0

type Authentication struct {
	BasicAuthenticator middleware.BasicAuthenticator
}

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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