handlers

package
v0.0.0-...-7d27a18 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(fx.Invoke(registerRoutes), fx.Provide(NewGinHTTPServer))

Module for go fx

Functions

func CreateURLHandler

func CreateURLHandler(c *gin.Context, s shortener.Shortener)

func GetURLHandler

func GetURLHandler(c *gin.Context, s shortener.Shortener)

func NewGinHTTPServer

func NewGinHTTPServer(lc fx.Lifecycle) *gin.Engine

Types

type UrlCreationRequest

type UrlCreationRequest struct {
	Url string `json:"url"`
}

type UrlCreationResponse

type UrlCreationResponse struct {
	Code string `json:"code"`
}

type UrlGetRequest

type UrlGetRequest struct {
	Code string `uri:"code" binding:"required"`
}

Jump to

Keyboard shortcuts

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