api

package
v0.0.0-...-d4ca5b8 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRouter

func BuildRouter() chi.Router

BuildRouter - Create, configure, and handle API routes @title Baffles API @version 1.0 @description The Baffles API provides a RESTful interface exposing endpoints for discovering applications.

func GetApplication

func GetApplication(w http.ResponseWriter, r *http.Request)

GetApplication godoc @Summary Get Baffles Application @Description Get a single application by name @Produce json @Success 200 {object} api.Application @Router /api/v1/application/{application} [get]

func GetApplications

func GetApplications(w http.ResponseWriter, r *http.Request)

GetApplications godoc @Summary Get Baffles Applications @Description Get a list of applications @Produce json @Success 200 {object} api.ApplicationList @Router /api/v1/applications [get]

Types

type Application

type Application struct {
	DisplayName string     `json:"displayName"`
	Description string     `json:"description"`
	Icon        string     `json:"icon"`
	Url         string     `json:"url"`
	Category    v1.AppType `json:"category"`
}

type ApplicationList

type ApplicationList struct {
	Applications []Application `json:"applications"`
}

type RestAPI

type RestAPI struct {
	ApplicationList ApplicationList `json:"applicationList"`
	Application     Application     `json:"application"`
}

Jump to

Keyboard shortcuts

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