api

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderRequestID = "X-Request-ID"
	UserIdKey       = "UserId"
	AdminKey        = "admin"
)
View Source
const (
	HealthCheckPath = "/health-check"
	PipelinePath    = "/pipeline"
)
View Source
const (
	MessageSomethingWrong = "something went wrong"
)

Variables

This section is empty.

Functions

func AdminMiddleware

func AdminMiddleware() gin.HandlerFunc

func AuthMiddleware

func AuthMiddleware() gin.HandlerFunc

func CreateServer

func CreateServer(cfg *config.Config) (r *gin.Engine, err error)

CreateServer creates a new gin.Engine instance and configures it according to the given config. It sets up the middleware for logging, recovery, authentication, and request ID tracking. It also sets up the routes for the API using the given registry. The server is started at the port specified in the config. @title Analytics-Pipeline API @version 0.0.15 @description For the administration of analytics pipelines. @license.name Apache-2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath /

Types

This section is empty.

Jump to

Keyboard shortcuts

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