dto

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess      = 0
	ExitGeneralError = 1
	ExitUsageError   = 2
	ExitAPIError     = 64
	ExitAuthError    = 65
	ExitServiceDown  = 69
	ExitConfigError  = 78
)

Exit codes for programmatic error handling

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIError

type CLIError struct {
	Code    string      `json:"code"`
	Message string      `json:"message"`
	Details interface{} `json:"details,omitempty"`
}

type CLIMeta

type CLIMeta struct {
	Service    string `json:"service,omitempty"`
	Endpoint   string `json:"endpoint,omitempty"`
	DurationMs int64  `json:"duration_ms,omitempty"`
}

type CLIResponse

type CLIResponse struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data"`
	Error   *CLIError   `json:"error"`
}

CLIResponse is the standard envelope for all CLI output. AI agents can rely on this consistent structure.

type Config

type Config struct {
	DataStream DataStreamConfig `json:"datastream"`
	FluxRPC    FluxRPCConfig    `json:"fluxrpc"`
	RugCheck   RugCheckConfig   `json:"rugcheck"`
	Output     OutputConfig     `json:"output"`
}

func DefaultConfig

func DefaultConfig() Config

type DataStreamConfig

type DataStreamConfig struct {
	APIKey  string `json:"api_key,omitempty"`
	BaseURL string `json:"base_url,omitempty"`
}

type FluxRPCConfig

type FluxRPCConfig struct {
	APIKey  string `json:"api_key,omitempty"`
	BaseURL string `json:"base_url,omitempty"`
	Region  string `json:"region,omitempty"` // "eu" or "us" — overrides base_url
}

type OutputConfig

type OutputConfig struct {
	Format string `json:"format,omitempty"`
}

type RugCheckConfig

type RugCheckConfig struct {
	APIKey  string `json:"api_key,omitempty"`
	BaseURL string `json:"base_url,omitempty"`
}

Jump to

Keyboard shortcuts

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