web

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIService

func NewAPIService(webservice []*restful.WebService) *restful.WebService

NewAPIService creates a new WebService that serves the OpenAPI/Swagger specification It takes a list of WebServices and generates the API documentation

func NewCoreService

func NewCoreService(workdir string, client ctrlclient.Client, restconfig *rest.Config) *restful.WebService

NewCoreService creates and configures a new RESTful web service for managing inventories and playbooks. It sets up routes for CRUD operations on inventories and playbooks, including pagination, sorting, and filtering.

func NewSchemaService

func NewSchemaService(rootPath string, workdir string, client ctrlclient.Client) *restful.WebService

NewSchemaService creates a new WebService that serves schema files from the specified root path. It sets up a route that handles GET requests to /resources/schema/{subpath} and serves files from the rootPath directory. The {subpath:*} parameter allows for matching any path under /resources/schema/.

func NewSwaggerUIService

func NewSwaggerUIService() *restful.WebService

NewSwaggerUIService creates a new WebService that serves the Swagger UI interface It mounts the embedded swagger-ui files and handles requests to display the API documentation

func NewUIService

func NewUIService(path string) *restful.WebService

NewUIService creates a new WebService that serves the static web UI and handles SPA routing. - Serves "/" with index.html - Serves static assets (e.g., .js, .css, .png) from the embedded web directory - Forwards all other non-API paths to index.html for SPA client-side routing

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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