command

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package command provides the command controller for the opampcommander.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a struct that implements the command controller.

func NewController

func NewController(
	commandUsecase applicationport.CommandLookUpUsecase,
	logger *slog.Logger,
) *Controller

NewController creates a new instance of Controller.

func (*Controller) Get

func (c *Controller) Get(ctx *gin.Context)

Get retrieves a command by its ID.

@Summary Get Command @Tags command @Description Retrieve a command by its ID. @Accept json @Produce json @Param id path string true "Command ID" @Success 200 {object} CommandAudit @Failure 400 {object} map[string]any "Invalid command ID" @Failure 500 {object} map[string]any "Failed to get command" @Router /api/v1/commands/{id} [get].

func (*Controller) List

func (c *Controller) List(ctx *gin.Context)

List retrieves a list of commands.

@Summary List Commands @Tags command @Description Retrieve a list of commands. @Accept json @Produce json @Success 200 {array} CommandAudit @Failure 500 {object} map[string]any "Failed to list commands" @Router /api/v1/commands [get].

func (*Controller) RoutesInfo

func (c *Controller) RoutesInfo() gin.RoutesInfo

RoutesInfo returns the routes information for the command controller.

Jump to

Keyboard shortcuts

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