Documentation
¶
Index ¶
- type APIError
- type APIResponse
- type Bounds
- type Confidence
- type ConfigKey
- type ContentType
- type DatabaseType
- type DistanceMetric
- type Duration
- type Embedding
- type EmbeddingModel
- type EntityID
- type Environment
- type EpisodeID
- type HTTPMethod
- type Health
- type ID
- type IndexType
- type LLMProvider
- type LogLevel
- type Metadata
- type Metrics
- type Pagination
- type Point
- type Priority
- type Score
- type SessionID
- type Status
- type TaskType
- type TenantID
- type TimeRange
- type Timestamp
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { Code string `json:"code"` Message string `json:"message"` Details Metadata `json:"details,omitempty"` }
APIError represents an API error response
type APIResponse ¶
type APIResponse struct { Success bool `json:"success"` Data interface{} `json:"data,omitempty"` Error *APIError `json:"error,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Timestamp time.Time `json:"timestamp"` }
APIResponse represents a standard API response
func NewAPIErrorResponse ¶
func NewAPIErrorResponse(code, message string) *APIResponse
NewAPIErrorResponse creates a new API error response
func NewAPIResponse ¶
func NewAPIResponse(data interface{}) *APIResponse
NewAPIResponse creates a new API response
type ConfigKey ¶
type ConfigKey string
ConfigKey represents configuration keys
const ( ConfigKeyDatabaseURL ConfigKey = "database.url" ConfigKeyRedisURL ConfigKey = "redis.url" ConfigKeyLLMAPIKey ConfigKey = "llm.api_key" ConfigKeyJWTSecret ConfigKey = "auth.jwt_secret" ConfigKeyLogLevel ConfigKey = "logging.level" ConfigKeyServerPort ConfigKey = "server.port" ConfigKeyEnvironment ConfigKey = "app.environment" )
type ContentType ¶
type ContentType string
ContentType represents MIME content types
const ( ContentTypeJSON ContentType = "application/json" ContentTypeXML ContentType = "application/xml" ContentTypeText ContentType = "text/plain" ContentTypeHTML ContentType = "text/html" )
type DatabaseType ¶
type DatabaseType string
DatabaseType represents different database types
const ( DatabaseTypeSurrealDB DatabaseType = "surrealdb" DatabaseTypeRedis DatabaseType = "redis" DatabaseTypePostgreSQL DatabaseType = "postgresql" DatabaseTypeMongoDB DatabaseType = "mongodb" )
type DistanceMetric ¶
type DistanceMetric string
DistanceMetric represents vector distance metrics
const ( DistanceMetricCosine DistanceMetric = "cosine" DistanceMetricEuclidean DistanceMetric = "euclidean" DistanceMetricManhattan DistanceMetric = "manhattan" DistanceMetricHamming DistanceMetric = "hamming" DistanceMetricMinkowski DistanceMetric = "minkowski" )
type EmbeddingModel ¶
type EmbeddingModel string
EmbeddingModel represents different embedding models
const ( EmbeddingModelOpenAISmall EmbeddingModel = "text-embedding-3-small" EmbeddingModelOpenAILarge EmbeddingModel = "text-embedding-3-large" EmbeddingModelOpenAIAda002 EmbeddingModel = "text-embedding-ada-002" )
type Environment ¶
type Environment string
Environment represents the application environment
const ( EnvironmentDevelopment Environment = "development" EnvironmentStaging Environment = "staging" EnvironmentProduction Environment = "production" EnvironmentTest Environment = "test" )
type HTTPMethod ¶
type HTTPMethod string
HTTPMethod represents HTTP methods
const ( HTTPMethodGET HTTPMethod = "GET" HTTPMethodPOST HTTPMethod = "POST" HTTPMethodPUT HTTPMethod = "PUT" HTTPMethodPATCH HTTPMethod = "PATCH" HTTPMethodDELETE HTTPMethod = "DELETE" HTTPMethodHEAD HTTPMethod = "HEAD" HTTPMethodOPTIONS HTTPMethod = "OPTIONS" )
type Health ¶
type Health struct { Status Status `json:"status"` Timestamp time.Time `json:"timestamp"` Services map[string]Status `json:"services"` Version Version `json:"version"` }
Health represents system health status
type LLMProvider ¶
type LLMProvider string
LLMProvider represents different LLM service providers
const ( LLMProviderOpenAI LLMProvider = "openai" LLMProviderAnthropic LLMProvider = "anthropic" LLMProviderLocal LLMProvider = "local" LLMProviderMock LLMProvider = "mock" )
type Metadata ¶
type Metadata map[string]interface{}
Metadata represents arbitrary key-value metadata
type Metrics ¶
type Metrics struct { Timestamp time.Time `json:"timestamp"` Values map[string]interface{} `json:"values"` }
Metrics represents system metrics
type Pagination ¶
type Pagination struct { Limit int `json:"limit" validate:"min=1,max=100"` Offset int `json:"offset" validate:"min=0"` }
Pagination represents pagination parameters