api

package
v0.0.0-...-8ecd7f4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 97 Imported by: 2

Documentation

Overview

Package api implements the REST api for tsuru.

It provides the REST api for managing users, teams, apps and services.

Index

Constants

View Source
const Version = "1.20.4"

Variables

This section is empty.

Functions

func InitializeDBServices

func InitializeDBServices() error

func InputFields

func InputFields(r *http.Request, exclude ...string) url.Values

func InputValue

func InputValue(r *http.Request, field string) string

func InputValues

func InputValues(r *http.Request, field string) ([]string, bool)

func ParseInput

func ParseInput(r *http.Request, dst interface{}) error

func ParseJSON

func ParseJSON(r *http.Request, dst interface{}) error

func RegisterHandler

func RegisterHandler(path string, method string, h http.Handler)

RegisterHandler inserts a handler on a list of handlers for version 1.0

func RegisterHandlerVersion

func RegisterHandlerVersion(version, path, method string, h http.Handler)

RegisterHandlerVersion inserts a handler on a list of handlers

func RunServer

func RunServer(dry bool) http.Handler

RunServer starts tsuru API server. The dry parameter indicates whether the server should run in dry mode, not starting the HTTP listener (for testing purposes).

Types

type AuthorizationRequiredHandler

type AuthorizationRequiredHandler func(http.ResponseWriter, *http.Request, auth.Token) error

func (AuthorizationRequiredHandler) ServeHTTP

type Handler

type Handler func(http.ResponseWriter, *http.Request) error

func (Handler) ServeHTTP

func (fn Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TsuruHandler

type TsuruHandler struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package testing provides test helpers for various actions.
Package testing provides test helpers for various actions.

Jump to

Keyboard shortcuts

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