command

package
v0.1.2-debug-auth Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 8 Imported by: 0

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} Audit @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