api

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package api contains API models and definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDetail

type ErrorDetail struct {
	Message  string `json:"message,omitempty"`
	Location string `json:"location,omitempty"`
	Value    any    `json:"value,omitempty"`

} // @name ErrorDetail

ErrorDetail represents a single error detail in the error response model.

type ErrorModel

type ErrorModel struct {
	// Type is a URI reference that identifies the problem type.
	// example: "https://example.com/probs/out-of-credit"
	Type string `json:"type,omitempty"`

	// Title is a short, human-readable summary of the problem type.
	// example: "Bad Request"
	Title string `json:"title,omitempty"`

	// Status is the HTTP status code generated by the origin server for this occurrence of the problem.
	// example: 400
	Status int `json:"status,omitempty"`

	// Detail is a human-readable explanation specific to this occurrence of the problem.
	// example: "Your request parameters didn't validate."
	Detail string `json:"detail,omitempty"`

	// Instance is a URI reference that identifies the specific occurrence of the problem.
	Instance string `json:"instance,omitempty"`

	// Errors provides additional error details.
	Errors []*ErrorDetail `json:"errors,omitempty"`

} // @name ErrorModel

ErrorModel represents a standardized error response model. RFC 9457 Problem Details for HTTP APIs.

Directories

Path Synopsis
v1
Package v1 provides the API server for the application.
Package v1 provides the API server for the application.
auth
Package auth provides the authentication api for the opampcommander application
Package auth provides the authentication api for the opampcommander application
command
Package command provides the command api model for opampcommander.
Package command provides the command api model for opampcommander.
version
Package version provides api model for version information.
Package version provides api model for version information.

Jump to

Keyboard shortcuts

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