api

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 35 Imported by: 10

Documentation

Overview

Package api provides implementation of aptly REST API

Index

Constants

This section is empty.

Variables

View Source
var MetricsCollectorRegistrar = metricsCollectorRegistrar{/* contains filtered or unexported fields */}

Functions

func AbortWithJSONError added in v1.6.0

func AbortWithJSONError(c *gin.Context, code int, err error) *gin.Error

func JSONLogger added in v1.6.0

func JSONLogger() gin.HandlerFunc

JSONLogger is a gin middleware that takes an instance of Logger and uses it for writing access logs that include error messages if there are any.

func Router

func Router(c *ctx.AptlyContext) http.Handler

Router returns prebuilt with routes http.Handler

Types

type Error added in v1.6.0

type Error struct {
	Error string `json:"error"`
}

Jump to

Keyboard shortcuts

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