types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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 Bounds

type Bounds struct {
	Min Point `json:"min"`
	Max Point `json:"max"`
}

Bounds represents 2D bounds

type Confidence

type Confidence float64

Confidence represents a confidence level (0.0 to 1.0)

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 Duration

type Duration time.Duration

Duration represents a time duration

type Embedding

type Embedding []float32

Embedding represents a vector embedding

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 EntityID

type EntityID string

EntityID represents an entity identifier

type Environment

type Environment string

Environment represents the application environment

const (
	EnvironmentDevelopment Environment = "development"
	EnvironmentStaging     Environment = "staging"
	EnvironmentProduction  Environment = "production"
	EnvironmentTest        Environment = "test"
)

type EpisodeID

type EpisodeID string

EpisodeID represents an episode identifier

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 ID

type ID string

ID represents a unique identifier

type IndexType

type IndexType string

IndexType represents different index types

const (
	IndexTypeVector   IndexType = "vector"
	IndexTypeFullText IndexType = "fulltext"
	IndexTypeStandard IndexType = "standard"
	IndexTypeUnique   IndexType = "unique"
)

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 LogLevel

type LogLevel string

LogLevel represents logging levels

const (
	LogLevelTrace LogLevel = "trace"
	LogLevelDebug LogLevel = "debug"
	LogLevelInfo  LogLevel = "info"
	LogLevelWarn  LogLevel = "warn"
	LogLevelError LogLevel = "error"
	LogLevelFatal LogLevel = "fatal"
	LogLevelPanic LogLevel = "panic"
)

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

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Point represents a 2D point

type Priority

type Priority int

Priority represents task or operation priority

const (
	PriorityLow Priority = iota
	PriorityMedium
	PriorityHigh
	PriorityCritical
)

type Score

type Score float64

Score represents a relevance or confidence score

type SessionID

type SessionID string

SessionID represents a session identifier

type Status

type Status string

Status represents the status of an operation or resource

const (
	StatusPending    Status = "pending"
	StatusProcessing Status = "processing"
	StatusCompleted  Status = "completed"
	StatusFailed     Status = "failed"
	StatusCancelled  Status = "cancelled"
)

type TaskType

type TaskType string

TaskType represents different types of background tasks

const (
	TaskTypeIngestion          TaskType = "ingestion"
	TaskTypeEntityExtraction   TaskType = "entity_extraction"
	TaskTypeEmbedding          TaskType = "embedding"
	TaskTypeConflictResolution TaskType = "conflict_resolution"
	TaskTypeCleanup            TaskType = "cleanup"
)

type TenantID

type TenantID string

TenantID represents a tenant identifier

type TimeRange

type TimeRange struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

TimeRange represents a time range

type Timestamp

type Timestamp time.Time

Timestamp represents a point in time

type Version

type Version struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Patch int `json:"patch"`
}

Version represents a semantic version

func (Version) String

func (v Version) String() string

String returns the string representation of a version

Jump to

Keyboard shortcuts

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