Documentation
¶
Index ¶
- func ExtractDateString(raw json.RawMessage) string
- type APIClient
- func (c *APIClient) AddAgentConnection(ctx context.Context, agentID int, connType, name string, config map[string]any) ([]AgentConnection, error)
- func (c *APIClient) CreateAgent(ctx context.Context, name, description, systemPrompt, visibility string) (*Agent, error)
- func (c *APIClient) CreateConnection(ctx context.Context, name, connType string, credentials map[string]any) error
- func (c *APIClient) CreateDashboard(ctx context.Context, title, visibility string, agentID int, ...) (*Dashboard, error)
- func (c *APIClient) CreateScheduledAgent(ctx context.Context, fields map[string]any) (*ScheduledAgent, error)
- func (c *APIClient) DeleteConnection(ctx context.Context, name string) error
- 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) GetAgent(ctx context.Context, agentID int) (*Agent, error)
- func (c *APIClient) GetAgentMessageStatus(ctx context.Context, agentID, threadID, messageID int) (*AgentMessage, error)
- func (c *APIClient) GetAgentPrompt(ctx context.Context, agentID int) (*AgentPrompt, error)
- func (c *APIClient) GetAsset(ctx context.Context, project, pipeline, asset string) (*Asset, error)
- func (c *APIClient) GetBackfillRuns(ctx context.Context, multipleActionID string, limit, offset int) ([]BackfillRun, error)
- func (c *APIClient) GetCostExplorer(ctx context.Context, req CostExplorerRequest) (*CostExplorerResponse, error)
- func (c *APIClient) GetCostExplorerSchema(ctx context.Context, platform string) (*CostExplorerSchema, error)
- func (c *APIClient) GetDashboard(ctx context.Context, dashboardID int) (*Dashboard, 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) GetScheduledAgent(ctx context.Context, scheduledAgentID int) (*ScheduledAgent, error)
- func (c *APIClient) ListAgentConnections(ctx context.Context, agentID int) ([]AgentConnection, 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) ListAuditLogs(ctx context.Context, opts AuditLogListOptions) ([]AuditLog, error)
- func (c *APIClient) ListBackfills(ctx context.Context, project, pipeline string, limit int) ([]Backfill, error)
- func (c *APIClient) ListConnections(ctx context.Context) ([]Connection, error)
- func (c *APIClient) ListDashboards(ctx context.Context) ([]Dashboard, 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) ListScheduledAgents(ctx context.Context) ([]ScheduledAgent, 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) SetAgentPrompt(ctx context.Context, agentID int, systemPrompt string) (*AgentPrompt, error)
- func (c *APIClient) SetTeam(team string)
- func (c *APIClient) TriggerRun(ctx context.Context, project, pipeline, startDate, endDate string, ...) (*TriggerRunResult, error)
- func (c *APIClient) UpdateAgent(ctx context.Context, agentID int, fields map[string]any) (*Agent, error)
- func (c *APIClient) UpdateDashboard(ctx context.Context, dashboardID int, fields map[string]any) (*Dashboard, error)
- func (c *APIClient) UpdateScheduledAgent(ctx context.Context, scheduledAgentID int, fields map[string]any) (*ScheduledAgent, error)
- type APIError
- type Agent
- type AgentConnection
- type AgentMessage
- type AgentPrompt
- type AgentThread
- type Asset
- type AssetInstance
- type AssetInstanceCheck
- type AssetInstanceChecks
- type AssetInstanceInfo
- type AssetInstanceResponse
- type AssetInstanceSteps
- type AuditLog
- type AuditLogListOptions
- type Backfill
- type BackfillRun
- type BruinCloudConfig
- type Client
- type Config
- type Connection
- type CostDimension
- type CostExplorerRequest
- type CostExplorerResponse
- type CostExplorerSchema
- type CostFilter
- type CostFilterField
- type Dashboard
- type GlossaryEntity
- type LogEntry
- type Pipeline
- type PipelineRun
- type PipelineValidationError
- type Project
- type Repo
- type ScheduledAgent
- type SendAgentMessageResponse
- type StepInstance
- type TriggerRunOptions
- type TriggerRunResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDateString ¶ added in v0.11.494
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.494
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is the HTTP client for the Bruin Cloud API.
func NewAPIClient ¶ added in v0.11.494
NewAPIClient creates a new API client with the given API key.
func (*APIClient) AddAgentConnection ¶ added in v0.11.705
func (c *APIClient) AddAgentConnection(ctx context.Context, agentID int, connType, name string, config map[string]any) ([]AgentConnection, error)
AddAgentConnection adds a connection (type + name + config) to the agent's connection set and returns the resulting connections — names/types only, never credentials. The config carries the credential values and is sent to the server, not logged.
func (*APIClient) CreateAgent ¶ added in v0.11.665
func (c *APIClient) CreateAgent(ctx context.Context, name, description, systemPrompt, visibility string) (*Agent, error)
CreateAgent creates a new agent. Optional fields are omitted when empty so the server applies its defaults (null description/prompt, "team" visibility).
func (*APIClient) CreateConnection ¶ added in v0.11.635
func (*APIClient) CreateDashboard ¶ added in v0.11.668
func (c *APIClient) CreateDashboard(ctx context.Context, title, visibility string, agentID int, state map[string]any) (*Dashboard, error)
CreateDashboard creates a dashboard from a definition. The server writes the definition to the draft only (never published). Empty optional fields are omitted so the server applies its defaults.
func (*APIClient) CreateScheduledAgent ¶ added in v0.11.682
func (c *APIClient) CreateScheduledAgent(ctx context.Context, fields map[string]any) (*ScheduledAgent, error)
CreateScheduledAgent creates a scheduled agent from a plan. The server stores it as an inactive draft (a human activates it from the UI); fields is the request body and must include agent_id.
func (*APIClient) DeleteConnection ¶ added in v0.11.635
func (*APIClient) DeletePipeline ¶ added in v0.11.494
func (*APIClient) DisablePipeline ¶ added in v0.11.494
func (*APIClient) EnablePipeline ¶ added in v0.11.494
func (*APIClient) GetAgentMessageStatus ¶ added in v0.11.494
func (*APIClient) GetAgentPrompt ¶ added in v0.11.661
func (*APIClient) GetBackfillRuns ¶ added in v0.11.700
func (c *APIClient) GetBackfillRuns(ctx context.Context, multipleActionID string, limit, offset int) ([]BackfillRun, error)
GetBackfillRuns returns the individual runs that make up a single backfill.
func (*APIClient) GetCostExplorer ¶ added in v0.11.697
func (c *APIClient) GetCostExplorer(ctx context.Context, req CostExplorerRequest) (*CostExplorerResponse, error)
GetCostExplorer returns a page of warehouse cost breakdown rows.
func (*APIClient) GetCostExplorerSchema ¶ added in v0.11.697
func (c *APIClient) GetCostExplorerSchema(ctx context.Context, platform string) (*CostExplorerSchema, error)
GetCostExplorerSchema lists the dimensions, filter fields, and time buckets the cost explorer supports.
func (*APIClient) GetDashboard ¶ added in v0.11.667
func (*APIClient) GetGlossaryEntity ¶ added in v0.11.494
func (*APIClient) GetInstance ¶ added in v0.11.494
func (*APIClient) GetInstanceLogs ¶ added in v0.11.494
func (*APIClient) GetLatestRun ¶ added in v0.11.494
func (*APIClient) GetPipeline ¶ added in v0.11.494
func (*APIClient) GetPipelineErrors ¶ added in v0.11.494
func (*APIClient) GetScheduledAgent ¶ added in v0.11.682
func (*APIClient) ListAgentConnections ¶ added in v0.11.701
func (c *APIClient) ListAgentConnections(ctx context.Context, agentID int) ([]AgentConnection, error)
ListAgentConnections returns the connection names and types available to the agent (from its dev-env secret) — names/types only, never credentials. Use it to pick a connection the agent can actually query.
func (*APIClient) ListAgentMessages ¶ added in v0.11.494
func (*APIClient) ListAgentThreads ¶ added in v0.11.494
func (*APIClient) ListAgents ¶ added in v0.11.494
func (*APIClient) ListAssets ¶ added in v0.11.494
func (*APIClient) ListAuditLogs ¶ added in v0.11.705
func (c *APIClient) ListAuditLogs(ctx context.Context, opts AuditLogListOptions) ([]AuditLog, error)
ListAuditLogs returns a page of the team's audit trail, most recent first. The endpoint is read-only and accepts only a personal (user-scoped) token.
func (*APIClient) ListBackfills ¶ added in v0.11.700
func (c *APIClient) ListBackfills(ctx context.Context, project, pipeline string, limit int) ([]Backfill, error)
ListBackfills returns the most recent backfills, optionally filtered by project and pipeline.
func (*APIClient) ListConnections ¶ added in v0.11.635
func (c *APIClient) ListConnections(ctx context.Context) ([]Connection, error)
func (*APIClient) ListDashboards ¶ added in v0.11.667
func (*APIClient) ListGlossaryEntities ¶ added in v0.11.494
func (*APIClient) ListInstances ¶ added in v0.11.494
func (*APIClient) ListInstancesParsed ¶ added in v0.11.494
func (*APIClient) ListPipelines ¶ added in v0.11.494
func (*APIClient) ListProjects ¶ added in v0.11.494
func (*APIClient) ListScheduledAgents ¶ added in v0.11.682
func (c *APIClient) ListScheduledAgents(ctx context.Context) ([]ScheduledAgent, error)
func (*APIClient) MarkRunStatus ¶ added in v0.11.494
func (*APIClient) SendAgentMessage ¶ added in v0.11.494
func (*APIClient) SetAgentPrompt ¶ added in v0.11.661
func (*APIClient) SetTeam ¶ added in v0.11.710
SetTeam makes requests act on the given team (company prefix) via the X-Bruin-Team header, instead of the token owner's current team.
func (*APIClient) TriggerRun ¶ added in v0.11.494
func (c *APIClient) TriggerRun(ctx context.Context, project, pipeline, startDate, endDate string, opts TriggerRunOptions) (*TriggerRunResult, error)
TriggerRun triggers a pipeline run for the given date range.
func (*APIClient) UpdateAgent ¶ added in v0.11.667
func (c *APIClient) UpdateAgent(ctx context.Context, agentID int, fields map[string]any) (*Agent, error)
UpdateAgent patches an agent with the given fields. The caller decides which fields to include (based on which flags were set), so an explicit empty value is sent and can clear a field.
func (*APIClient) UpdateDashboard ¶ added in v0.11.679
func (c *APIClient) UpdateDashboard(ctx context.Context, dashboardID int, fields map[string]any) (*Dashboard, error)
UpdateDashboard applies a partial update to a dashboard. Only the fields present are changed; the definition (state) is written to the draft only (never published), same as create. Changing visibility requires manage-access on the server side.
func (*APIClient) UpdateScheduledAgent ¶ added in v0.11.682
func (c *APIClient) UpdateScheduledAgent(ctx context.Context, scheduledAgentID int, fields map[string]any) (*ScheduledAgent, error)
UpdateScheduledAgent applies a partial update to a scheduled agent's plan. Only the fields present are changed; activation is not updatable via the API.
type APIError ¶ added in v0.11.494
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.494
type Agent struct {
ID int `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
Visibility string `json:"visibility"`
}
Agent represents a Bruin Cloud agent.
type AgentConnection ¶ added in v0.11.701
AgentConnection is one connection available to an agent — name and type only (no credential values).
type AgentMessage ¶ added in v0.11.494
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 AgentPrompt ¶ added in v0.11.661
type AgentPrompt struct {
ID int `json:"id"`
Name string `json:"name"`
SystemPrompt *string `json:"system_prompt"`
}
AgentPrompt represents an agent's system prompt.
type AgentThread ¶ added in v0.11.494
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.494
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.494
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.494
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.494
type AssetInstanceChecks struct {
Column []AssetInstanceCheck `json:"column"`
Custom []AssetInstanceCheck `json:"custom"`
}
AssetInstanceChecks represents checks for an asset instance.
type AssetInstanceInfo ¶ added in v0.11.494
type AssetInstanceInfo struct {
Asset string `json:"asset"`
Type string `json:"type"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
WallTimeDuration float64 `json:"wall_time_duration"`
TotalExecutionDuration float64 `json:"total_execution_duration"`
Status string `json:"status"`
IsFinished bool `json:"is_finished"`
Steps AssetInstanceSteps `json:"steps"`
StepIDs []string `json:"step_ids"`
}
AssetInstanceInfo represents detailed information about an asset instance.
type AssetInstanceResponse ¶ added in v0.11.494
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.494
type AssetInstanceSteps struct {
Main []StepInstance `json:"main"`
Checks AssetInstanceChecks `json:"checks"`
}
AssetInstanceSteps represents the steps of an asset instance.
type AuditLog ¶ added in v0.11.705
type AuditLog struct {
Type string `json:"type"`
UserIdentifier string `json:"user_identifier"`
IPAddress *string `json:"ip_address"`
CreatedAt string `json:"created_at"`
URL *string `json:"url"`
Source *string `json:"source"`
Metadata json.RawMessage `json:"metadata"`
}
AuditLog is one entry in a team's audit trail as returned by GET /audit-logs. Metadata is event-specific and left raw.
type AuditLogListOptions ¶ added in v0.11.705
type AuditLogListOptions struct {
Types []string
UserIDs []string
StartDate string
EndDate string
Limit int
Offset int
}
AuditLogListOptions are the optional filters for ListAuditLogs. Zero values are omitted from the request.
type Backfill ¶ added in v0.11.700
type Backfill struct {
ID string `json:"id"`
Project string `json:"project"`
Pipeline string `json:"pipeline"`
IntervalStart string `json:"interval_start"`
IntervalEnd string `json:"interval_end"`
CreatedAt string `json:"created_at"`
Runs []BackfillRun `json:"runs"`
}
Backfill represents a group of runs created by a single split trigger, identified by its multiple_action_id.
type BackfillRun ¶ added in v0.11.700
type BackfillRun struct {
Project string `json:"project"`
Pipeline string `json:"pipeline"`
RunID string `json:"run_id"`
IntervalStart string `json:"interval_start"`
IntervalEnd string `json:"interval_end"`
CreatedAt string `json:"created_at"`
Note *string `json:"note"`
}
BackfillRun represents a single run within a backfill.
type BruinCloudConfig ¶
type BruinCloudConfig interface {
GetIngestrURI() string
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetIngestrURI ¶
type Connection ¶ added in v0.11.635
Connection represents a Bruin Cloud connection (name and type only).
type CostDimension ¶ added in v0.11.697
CostDimension is a group-by dimension the cost explorer supports.
type CostExplorerRequest ¶ added in v0.11.697
type CostExplorerRequest struct {
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Platform string `json:"platform,omitempty"`
Dimension string `json:"dimension,omitempty"`
TimeDimension string `json:"time_dimension,omitempty"`
Filters []CostFilter `json:"filters,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
CostExplorerRequest is the body sent to the cost explorer endpoint.
type CostExplorerResponse ¶ added in v0.11.697
type CostExplorerResponse struct {
Platform string `json:"platform"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Dimension *string `json:"dimension"`
TimeDimension *string `json:"time_dimension"`
TotalRows int `json:"total_rows"`
ReturnedRows int `json:"returned_rows"`
Offset int `json:"offset"`
Truncated bool `json:"truncated"`
NextOffset *int `json:"next_offset,omitempty"`
Rows []map[string]any `json:"rows"`
}
CostExplorerResponse is a page of cost breakdown rows.
type CostExplorerSchema ¶ added in v0.11.697
type CostExplorerSchema struct {
Platform string `json:"platform"`
AvailablePlatforms []string `json:"available_platforms"`
Dimensions []CostDimension `json:"dimensions"`
Filters []CostFilterField `json:"filters"`
TimeDimensions []string `json:"time_dimensions"`
}
CostExplorerSchema lists the dimensions, filter fields, and time buckets the cost explorer supports.
type CostFilter ¶ added in v0.11.697
type CostFilter struct {
Field string `json:"field"`
Op string `json:"op"`
Value any `json:"value"`
}
CostFilter is a single {field, op, value} cost explorer filter.
type CostFilterField ¶ added in v0.11.697
type CostFilterField struct {
Field string `json:"field"`
Op string `json:"op"`
Multiple bool `json:"multiple"`
}
CostFilterField is a filter field the cost explorer supports.
type Dashboard ¶ added in v0.11.667
type Dashboard struct {
ID int `json:"id"`
Title *string `json:"title"`
Visibility string `json:"visibility"`
UpdatedAt *string `json:"updated_at"`
URL string `json:"url"`
AgentID *int `json:"agent_id"`
State json.RawMessage `json:"state,omitempty"`
}
Dashboard represents a Bruin Cloud dashboard. State is only populated by the single-dashboard endpoint and carries the published definition as raw JSON.
type GlossaryEntity ¶ added in v0.11.494
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.494
type LogEntry struct {
json.RawMessage
}
LogEntry represents a log entry for an asset instance.
type Pipeline ¶ added in v0.11.494
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"`
Status *string `json:"status"`
}
Pipeline represents a Bruin Cloud pipeline.
type PipelineRun ¶ added in v0.11.494
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.494
type PipelineValidationError struct {
json.RawMessage
}
PipelineValidationError represents a pipeline validation error. The API returns dynamic JSON structures.
type Project ¶ added in v0.11.494
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 ScheduledAgent ¶ added in v0.11.682
type ScheduledAgent struct {
ID int `json:"id"`
Title *string `json:"title"`
IsActive bool `json:"is_active"`
ScheduleCron *string `json:"schedule_cron"`
ScheduleTimezone *string `json:"schedule_timezone"`
NextRunAt *string `json:"next_run_at"`
LastRunAt *string `json:"last_run_at"`
Instructions *string `json:"instructions"`
OutputFormatting *string `json:"output_formatting"`
VerifiedSqls json.RawMessage `json:"verified_sqls,omitempty"`
Memory json.RawMessage `json:"memory,omitempty"`
MonitorsDashboard json.RawMessage `json:"monitors_dashboard,omitempty"`
RecentExecutions json.RawMessage `json:"recent_executions,omitempty"`
}
ScheduledAgent represents a Bruin Cloud scheduled agent — a cron-based recurring agent task. The nested plan fields (verified SQLs, memory, ...) are kept as raw JSON so `--output json` round-trips the full server response faithfully.
type SendAgentMessageResponse ¶ added in v0.11.494
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.494
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.
type TriggerRunOptions ¶ added in v0.11.631
type TriggerRunOptions struct {
Assets []string
Downstream bool
FullRefresh bool
Split string
ChunkSize int
Variables map[string]any
Note string
Tags []string
}
TriggerRunOptions holds the optional parameters the trigger endpoint accepts.
type TriggerRunResult ¶ added in v0.11.700
type TriggerRunResult struct {
Message string `json:"message"`
Project string `json:"project"`
Pipeline string `json:"pipeline"`
RunID string `json:"run_id"`
MultipleActionID string `json:"multiple_action_id"`
Split string `json:"split"`
ChunkSize int `json:"chunk_size"`
URL string `json:"url"`
}
TriggerRunResult holds the response from the trigger endpoint. A normal run returns RunID; a backfill (triggered with a split) returns MultipleActionID and a URL to track the backfill in the dashboard.