http

package
v0.0.0-...-81514d8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProjectBasePath is the base path for all project-related endpoints
	ProjectBasePath = "/projects"
	// CreateProjectPath is the endpoint to create a new project
	CreateProjectPath = "/projects/:id"
	// GetProjectPath is the endpoint to get a project by ID
	GetProjectPath = "/projects/:id"
	// GetProjectsPath is the endpoint to list all projects
	GetProjectsPath = "/projects"
	// DeleteProjectPath is the endpoint to delete a project by ID
	DeleteProjectPath = "/projects/:id"

	// TaskBasePath is the base path for all task-related endpoints
	TaskBasePath = "/tasks"
	// CreateTaskAnsiblePlaybookPath is the endpoint to create a new Ansible playbook task
	CreateTaskAnsiblePlaybookPath = "/tasks/ansible-playbook/:project_id"
	// GetTaskPath is the endpoint to get a task by ID
	GetTaskPath = "/tasks/:id"
	// GetTasksPath is the endpoint to list all tasks
	GetTasksPath = "/tasks"

	// GetHealthPath is the endpoint to check the health of the service
	GetHealthPath = "/health"
)

Route constants for API endpoints

Variables

View Source
var (
	// ErrServerStarting represents an error when starting the server
	ErrServerStarting = fmt.Errorf("error starting server")

	// ErrServerStopping represents an error when stopping the server
	ErrServerStopping = fmt.Errorf("error stopping server")
)

Functions

This section is empty.

Types

type Server

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

Server represents a HTTP server

func NewServer

func NewServer(listenAddress string, handler *echo.Echo, logger repository.Logger) *Server

NewServer creates a new server

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

Start starts the server

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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