Documentation
¶
Overview ¶
internal/thea/client.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
ID string `json:"id"`
FileExtension string `json:"fileExtension"`
Title string `json:"title"`
ArtifactVersion string `json:"artifactVersion"`
Summary string `json:"summary"`
UsageGuidance []string `json:"usageGuidance,omitempty"`
Owner string `json:"owner,omitempty"`
CreatedDate string `json:"createdDate,omitempty"`
LastModifiedDate string `json:"lastModifiedDate,omitempty"`
DefaultTargetPath string `json:"defaultTargetPath,omitempty"`
Tags []string `json:"tags,omitempty"`
}
Artifact represents a single artifact entry in the manifest.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to interact with the THEA framework (e.g., fetching manifests and artifacts).
func NewClient ¶
NewClient creates a new THEA client. The context here is primarily for future use if any initial setup needs it; individual methods like FetchArtifactContent will also take a context.
func (*Client) FetchArtifactContentByID ¶
func (c *Client) FetchArtifactContentByID( ctx context.Context, id string, artifactVersionHint string, ) (string, error)
FetchArtifactContentByID fetches the content of a specific artifact version. If version is empty, it might fetch the one specified in the manifest or use DefaultArtifactRef.
type Manifest ¶
type Manifest struct {
ManifestSchemaVersion string `json:"manifestSchemaVersion"`
THEAFrameworkReleaseVersion string `json:"theaFrameworkReleaseVersion"`
LastUpdated string `json:"lastUpdated"` // ISO 8601 timestamp
Artifacts []Artifact `json:"artifacts"`
}
Manifest represents the structure of the thea-manifest.json file.
type THEAServiceConfig ¶
type THEAServiceConfig struct {
ManifestURL string // Full URL to the thea-manifest.json
DefaultArtifactRef string // e.g., "main" or a specific release tag like "v0.7.0"
RawContentBaseURL string // e.g., "https://raw.githubusercontent.com/contextvibes/THEA" (without ref)
CacheDir string // Directory for caching manifests/artifacts (e.g., ~/.contextvibes/cache/thea)
CacheTTL time.Duration // Time-to-live for cached items
RequestTimeout time.Duration // Timeout for HTTP requests
}
THEAServiceConfig contains configuration specific to the THEA client. This would be part of your main AppConfig.LoadedAppConfig.THEA.ServiceConfig or similar.