interfaces

package
v6.10.9-aug.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package interfaces defines the core interfaces and shared structures for the CLI Proxy API server. These interfaces provide a common contract for different components of the application, such as AI service clients, API handlers, and data models.

Package interfaces defines the core interfaces and shared structures for the CLI Proxy API server. These interfaces provide a common contract for different components of the application, such as AI service clients, API handlers, and data models.

Package interfaces defines the core interfaces and shared structures for the CLI Proxy API server. These interfaces provide a common contract for different components of the application, such as AI service clients, API handlers, and data models.

Package interfaces provides type aliases for backwards compatibility with translator functions. It defines common interface types used throughout the CLI Proxy API for request and response transformation operations, maintaining compatibility with the SDK translator package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

type APIHandler interface {
	// HandlerType returns the type identifier for this API handler.
	// This is used to determine which request/response translators to use.
	HandlerType() string

	// Models returns a list of supported models for this API handler.
	// Each model is represented as a map containing model metadata.
	Models() []map[string]any
}

APIHandler defines the interface that all API handlers must implement. This interface provides methods for identifying handler types and retrieving supported models for different AI service endpoints.

type ErrorMessage

type ErrorMessage struct {
	// StatusCode is the HTTP status code returned by the API.
	StatusCode int

	// Error is the underlying error that occurred.
	Error error

	// Addon contains additional headers to be added to the response.
	Addon http.Header
}

ErrorMessage encapsulates an error with an associated HTTP status code. This structure is used to provide detailed error information including both the HTTP status and the underlying error.

type GCPProject

type GCPProject struct {
	// Projects is a list of Google Cloud projects accessible by the user.
	Projects []GCPProjectProjects `json:"projects"`
}

GCPProject represents the response structure for a Google Cloud project list request. This structure is used when fetching available projects for a Google Cloud account.

type GCPProjectProjects

type GCPProjectProjects struct {
	// ProjectNumber is the unique numeric identifier for the project.
	ProjectNumber string `json:"projectNumber"`

	// ProjectID is the unique string identifier for the project.
	ProjectID string `json:"projectId"`

	// LifecycleState indicates the current state of the project (e.g., "ACTIVE").
	LifecycleState string `json:"lifecycleState"`

	// Name is the human-readable name of the project.
	Name string `json:"name"`

	// Labels contains metadata labels associated with the project.
	Labels gCPProjectLabels `json:"labels"`

	// CreateTime is the timestamp when the project was created.
	CreateTime time.Time `json:"createTime"`
}

GCPProjectProjects contains details about a single Google Cloud project. This includes identifying information, metadata, and configuration details.

type TranslateRequestFunc

type TranslateRequestFunc = sdktranslator.RequestTransform

TranslateRequestFunc and related types are backwards compatible aliases for translator function types.

type TranslateResponse

type TranslateResponse = sdktranslator.ResponseTransform

Jump to

Keyboard shortcuts

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