api

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilesHandler

func FilesHandler(c *gin.Context)

func HealthCheckHandler added in v0.1.5

func HealthCheckHandler(c *gin.Context)

func PingDB added in v0.1.5

func PingDB(ctx context.Context, db *sql.DB) error

Temporary implementation until lib/pq PR is merged. See https://github.com/lib/pq/pull/737

func PingHttp added in v0.1.5

func PingHttp(ctx context.Context, url string) error

func SetupRoutes

func SetupRoutes(router *gin.Engine)

Types

type FileBackendRequest

type FileBackendRequest struct {
	SHA1     string `json:"sha1"`
	Name     string `json:"name"`
	ClientIP string `json:"clientip,omitempty"`
}

type FileBackendResponse

type FileBackendResponse struct {
	Url           string `json:"url"`
	IsAlternative bool   `json:"alternative"`
}

Jump to

Keyboard shortcuts

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