api

package
v0.0.0-...-6ed9475 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Redirect

func Redirect(c *gin.Context, conn etcd.Connection)

func RunApi

func RunApi(c Config, conn etcd.Connection)

func Shorten

func Shorten(c *gin.Context, conn etcd.Connection)

Types

type Config

type Config struct {
	HTTPPort     string `toml:"api_port"`
	WriteTimeout string `toml:"write_timeout"`
	ReadTimeout  string `toml:"read_timeout"`
}

type ShortenPayload

type ShortenPayload struct {
	Link string `form:"link" binding:"required"`
}

Jump to

Keyboard shortcuts

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