api

package
v0.0.0-...-ce25bc5 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package api implements Pandora API

Terms Of Service:

there are no TOS at this moment, use at your own risk we take no responsibility

Schemes: http, https
Host: localhost
BasePath: /api
Version: 0.0.1
License: MIT http://opensource.org/licenses/MIT
Contact: Sergey Todyshev <stodyshev@gmail.com> http://tsvbits.com

Consumes:
- application/json
- application/graphql

Produces:
- application/json

Security:
- api_token:

SecurityDefinitions:
api_token:
     type: JWT
     name: jwt_token
     in: Authorization

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogEntry

func GetLogEntry(r *http.Request) logrus.FieldLogger

func LogEntrySetField

func LogEntrySetField(r *http.Request, key string, value interface{})

func LogEntrySetFields

func LogEntrySetFields(r *http.Request, fields map[string]interface{})

func NewHandler

func NewHandler() http.Handler

NewHandler makes http.Handler to serve HTTP API

func NewStructuredLogger

func NewStructuredLogger(logger *logrus.Logger) func(next http.Handler) http.Handler

Types

type StructuredLogger

type StructuredLogger struct {
	Logger *logrus.Logger
}

func (*StructuredLogger) NewLogEntry

func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry

type StructuredLoggerEntry

type StructuredLoggerEntry struct {
	Logger logrus.FieldLogger
}

func (*StructuredLoggerEntry) Panic

func (l *StructuredLoggerEntry) Panic(v interface{}, stack []byte)

func (*StructuredLoggerEntry) Write

func (l *StructuredLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})

Jump to

Keyboard shortcuts

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