Documentation
¶
Index ¶
- func ExtractDateString(raw json.RawMessage) string
- type APIClient
- func (c *APIClient) DeletePipeline(ctx context.Context, project, pipeline string) error
- func (c *APIClient) DisablePipeline(ctx context.Context, project, pipeline string) error
- func (c *APIClient) EnablePipeline(ctx context.Context, project, pipeline string) error
- func (c *APIClient) GetAgentMessageStatus(ctx context.Context, agentID, threadID, messageID int) (*AgentMessage, error)
- func (c *APIClient) GetAsset(ctx context.Context, project, pipeline, asset string) (*Asset, error)
- func (c *APIClient) GetGlossaryEntity(ctx context.Context, project, entityName string) (json.RawMessage, error)
- func (c *APIClient) GetInstance(ctx context.Context, project, pipeline, runID, assetName string) (json.RawMessage, error)
- func (c *APIClient) GetInstanceLogs(ctx context.Context, project, pipeline, runID, stepID string, tryNumber int) (json.RawMessage, error)
- func (c *APIClient) GetLatestRun(ctx context.Context, project, pipeline string) (*PipelineRun, error)
- func (c *APIClient) GetPipeline(ctx context.Context, project, name string) (*Pipeline, error)
- func (c *APIClient) GetPipelineErrors(ctx context.Context) ([]json.RawMessage, error)
- func (c *APIClient) GetRun(ctx context.Context, project, pipeline, runID string) (*PipelineRun, error)
- func (c *APIClient) ListAgentMessages(ctx context.Context, agentID, threadID int, limit, offset int) ([]AgentMessage, error)
- func (c *APIClient) ListAgentThreads(ctx context.Context, agentID int, limit, offset int) ([]AgentThread, error)
- func (c *APIClient) ListAgents(ctx context.Context) ([]Agent, error)
- func (c *APIClient) ListAssets(ctx context.Context, project, pipeline string) ([]Asset, error)
- func (c *APIClient) ListGlossaryEntities(ctx context.Context) (json.RawMessage, error)
- func (c *APIClient) ListInstances(ctx context.Context, project, pipeline, runID string) (json.RawMessage, error)
- func (c *APIClient) ListInstancesParsed(ctx context.Context, project, pipeline, runID string) (*AssetInstanceResponse, error)
- func (c *APIClient) ListPipelines(ctx context.Context) ([]Pipeline, error)
- func (c *APIClient) ListProjects(ctx context.Context) ([]Project, error)
- func (c *APIClient) ListRuns(ctx context.Context, project, pipeline string, limit, offset int) ([]PipelineRun, error)
- func (c *APIClient) MarkRunStatus(ctx context.Context, project, pipeline, runID, status string) error
- func (c *APIClient) RerunRun(ctx context.Context, project, pipeline, runID string, onlyFailed bool) error
- func (c *APIClient) SendAgentMessage(ctx context.Context, agentID int, message string, threadID *int) (json.RawMessage, error)
- func (c *APIClient) TriggerRun(ctx context.Context, project, pipeline, startDate, endDate string) error
- type APIError
- type Agent
- type AgentMessage
- type AgentThread
- type Asset
- type AssetInstance
- type AssetInstanceCheck
- type AssetInstanceChecks
- type AssetInstanceInfo
- type AssetInstanceResponse
- type AssetInstanceSteps
- type BruinCloudConfig
- type Client
- type Config
- type GlossaryEntity
- type LogEntry
- type Pipeline
- type PipelineRun
- type PipelineValidationError
- type Project
- type Repo
- type SendAgentMessageResponse
- type StepInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDateString ¶ added in v0.11.496
func ExtractDateString(raw json.RawMessage) string
ExtractDateString extracts a date string from the API's date JSON format. API dates come as {"date": "2026-03-06 20:22:29.753319", "timezone_type": 1, "timezone": "+00:00"}.
Types ¶
type APIClient ¶ added in v0.11.496
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is the HTTP client for the Bruin Cloud API.
func NewAPIClient ¶ added in v0.11.496
NewAPIClient creates a new API client with the given API key.
func (*APIClient) DeletePipeline ¶ added in v0.11.496
func (*APIClient) DisablePipeline ¶ added in v0.11.496
func (*APIClient) EnablePipeline ¶ added in v0.11.496
func (*APIClient) GetAgentMessageStatus ¶ added in v0.11.496
func (*APIClient) GetGlossaryEntity ¶ added in v0.11.496
func (*APIClient) GetInstance ¶ added in v0.11.496
func (*APIClient) GetInstanceLogs ¶ added in v0.11.496
func (*APIClient) GetLatestRun ¶ added in v0.11.496
func (*APIClient) GetPipeline ¶ added in v0.11.496
func (*APIClient) GetPipelineErrors ¶ added in v0.11.496
func (*APIClient) ListAgentMessages ¶ added in v0.11.496
func (*APIClient) ListAgentThreads ¶ added in v0.11.496
func (*APIClient) ListAgents ¶ added in v0.11.496
func (*APIClient) ListAssets ¶ added in v0.11.496
func (*APIClient) ListGlossaryEntities ¶ added in v0.11.496
func (*APIClient) ListInstances ¶ added in v0.11.496
func (*APIClient) ListInstancesParsed ¶ added in v0.11.496
func (*APIClient) ListPipelines ¶ added in v0.11.496
func (*APIClient) ListProjects ¶ added in v0.11.496
func (*APIClient) MarkRunStatus ¶ added in v0.11.496
func (*APIClient) SendAgentMessage ¶ added in v0.11.496
type APIError ¶ added in v0.11.496
type APIError struct {
Message string `json:"message"`
Errors map[string][]string `json:"errors,omitempty"`
StatusCode int `json:"-"`
}
APIError represents an error response from the API.
type Agent ¶ added in v0.11.496
type Agent struct {
ID int `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
}
Agent represents a Bruin Cloud agent.
type AgentMessage ¶ added in v0.11.496
type AgentMessage struct {
ID int `json:"id"`
Status string `json:"status"`
OutputMessage *string `json:"output_message"`
AgentLogs json.RawMessage `json:"agent_logs"`
QueryLogs json.RawMessage `json:"query_logs"`
OutputAttachments json.RawMessage `json:"output_attachments"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
AgentMessage represents a message in an agent thread.
type AgentThread ¶ added in v0.11.496
type AgentThread struct {
ID int `json:"id"`
AgentID int `json:"agent_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
AgentThread represents a thread for an agent.
type Asset ¶ added in v0.11.496
type Asset struct {
Project string `json:"project"`
Pipeline string `json:"pipeline"`
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
URI string `json:"uri"`
Description *string `json:"description"`
Content *string `json:"content"`
Upstreams json.RawMessage `json:"upstreams"`
Downstream json.RawMessage `json:"downstream"`
Columns json.RawMessage `json:"columns"`
CustomChecks json.RawMessage `json:"custom_checks"`
Owner json.RawMessage `json:"owner"`
Materialization json.RawMessage `json:"materialization"`
Instance *string `json:"instance"`
Tags json.RawMessage `json:"tags"`
Connection *string `json:"connection"`
Image *string `json:"image"`
Parameters json.RawMessage `json:"parameters"`
Metadata json.RawMessage `json:"metadata"`
MarkdownDescription *string `json:"markdown_description"`
QualityScore int `json:"quality_score"`
MaxPossibleQualityScore int `json:"max_possible_quality_score"`
QualityScorePercentage int `json:"quality_score_percentage"`
}
Asset represents a pipeline asset.
type AssetInstance ¶ added in v0.11.496
type AssetInstance struct {
json.RawMessage
}
AssetInstance represents an asset instance within a pipeline run. The API returns dynamic JSON, so we use json.RawMessage for the full response.
type AssetInstanceCheck ¶ added in v0.11.496
type AssetInstanceCheck struct {
Name string `json:"name"`
Instance StepInstance `json:"instance"`
}
AssetInstanceCheck represents a named check with its step instance.
type AssetInstanceChecks ¶ added in v0.11.496
type AssetInstanceChecks struct {
Column []AssetInstanceCheck `json:"column"`
Custom []AssetInstanceCheck `json:"custom"`
}
AssetInstanceChecks represents checks for an asset instance.
type AssetInstanceInfo ¶ added in v0.11.496
type AssetInstanceInfo struct {
Asset string `json:"asset"`
Type string `json:"type"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
WallTimeDuration float64 `json:"wallTimeDuration"`
TotalExecutionDuration float64 `json:"totalExecutionDuration"`
Status string `json:"status"`
IsFinished bool `json:"isFinished"`
Steps AssetInstanceSteps `json:"steps"`
StepIDs []string `json:"stepIds"`
}
AssetInstanceInfo represents detailed information about an asset instance.
type AssetInstanceResponse ¶ added in v0.11.496
type AssetInstanceResponse struct {
Message string `json:"message"`
AssetInstances map[string]AssetInstanceInfo `json:"asset_instances"`
RunID string `json:"run_id"`
}
AssetInstanceResponse represents the parsed response from the asset instances endpoint.
type AssetInstanceSteps ¶ added in v0.11.496
type AssetInstanceSteps struct {
Main []StepInstance `json:"main"`
Checks AssetInstanceChecks `json:"checks"`
}
AssetInstanceSteps represents the steps of an asset instance.
type BruinCloudConfig ¶
type BruinCloudConfig interface {
GetIngestrURI() string
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetIngestrURI ¶
type GlossaryEntity ¶ added in v0.11.496
type GlossaryEntity struct {
json.RawMessage
}
GlossaryEntity represents a glossary entity. The API returns dynamic JSON structures, so we use json.RawMessage.
type LogEntry ¶ added in v0.11.496
type LogEntry struct {
json.RawMessage
}
LogEntry represents a log entry for an asset instance.
type Pipeline ¶ added in v0.11.496
type Pipeline struct {
Name string `json:"name"`
Description *string `json:"description"`
Schedule *string `json:"schedule"`
Assets json.RawMessage `json:"assets"`
Owner json.RawMessage `json:"owner"`
StartDate string `json:"start_date"`
Project string `json:"project"`
DefaultConnections json.RawMessage `json:"default_connections"`
Commit *string `json:"commit"`
Variables json.RawMessage `json:"variables"`
OxrScheduling *bool `json:"oxrScheduling"`
}
Pipeline represents a Bruin Cloud pipeline.
type PipelineRun ¶ added in v0.11.496
type PipelineRun struct {
Project string `json:"project"`
Pipeline string `json:"pipeline"`
RunID string `json:"run_id"`
DataIntervalStart json.RawMessage `json:"data_interval_start"`
DataIntervalEnd json.RawMessage `json:"data_interval_end"`
StartDate json.RawMessage `json:"start_date"`
EndDate json.RawMessage `json:"end_date"`
WallTimeDuration *float64 `json:"wall_time_duration"`
WallTimeDurationHumanized *string `json:"wall_time_duration_humanized"`
TotalExecutionDuration *float64 `json:"total_execution_duration"`
Status string `json:"status"`
UnknownInstanceCount int `json:"unknown_instance_count"`
Note *string `json:"note"`
}
PipelineRun represents a pipeline run.
type PipelineValidationError ¶ added in v0.11.496
type PipelineValidationError struct {
json.RawMessage
}
PipelineValidationError represents a pipeline validation error. The API returns dynamic JSON structures.
type Project ¶ added in v0.11.496
type Project struct {
ID string `json:"id"`
Name string `json:"name"`
Repo Repo `json:"repo"`
Rollouts json.RawMessage `json:"rollouts"`
}
Project represents a Bruin Cloud project.
type SendAgentMessageResponse ¶ added in v0.11.496
type SendAgentMessageResponse struct {
ThreadID int `json:"thread_id"`
MessageID int `json:"message_id"`
}
SendAgentMessageResponse represents the response from sending a message to an agent.
type StepInstance ¶ added in v0.11.496
type StepInstance struct {
Name string `json:"name"`
StepID string `json:"stepId"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Duration float64 `json:"duration"`
TryNumber int `json:"tryNumber"`
Status string `json:"status"`
IsFinished bool `json:"isFinished"`
}
StepInstance represents a step or check instance.