Documentation
¶
Index ¶
- Constants
- type BillingPeriod
- type CancelResponse
- type CreateQueryRequest
- type CreateQueryResponse
- type CreateVisualizationRequest
- type CreateVisualizationResponse
- type DatasetColumn
- type DatasetOwner
- type DatasetResponse
- type DeleteVisualizationResponse
- type ExecuteRequest
- type ExecuteResponse
- type ExecuteSQLRequest
- type ExecutionError
- type GetQueryResponse
- type GetVisualizationResponse
- type ListDatasetsResponse
- type ListVisualizationsResponse
- type PipelineExecuteRequest
- type PipelineExecuteResponse
- type PipelineNodeExecution
- type PipelineQueryExecutionStatus
- type PipelineStatusResponse
- type QueryParameter
- type Result
- type ResultMetadata
- type ResultOptions
- type ResultPageOption
- type ResultsResponse
- type SearchDatasetMetadata
- type SearchDatasetResult
- type SearchDatasetsByContractAddressRequest
- type SearchDatasetsPagination
- type SearchDatasetsRequest
- type SearchDatasetsResponse
- type StatusResponse
- type UpdateQueryRequest
- type UpdateQueryResponse
- type UpdateVisualizationRequest
- type UpdateVisualizationResponse
- type UploadsCSVRequest
- type UploadsCSVResponse
- type UploadsClearResponse
- type UploadsColumn
- type UploadsCreateRequest
- type UploadsCreateResponse
- type UploadsDeleteResponse
- type UploadsInsertResponse
- type UploadsListElement
- type UploadsListResponse
- type UploadsOwner
- type UsageRequest
- type UsageResponse
- type VisualizationSummary
- type WhoAmIResponse
Constants ¶
View Source
const LimitRows = 32_000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillingPeriod ¶ added in v0.3.0
type CancelResponse ¶
type CancelResponse struct {
Success bool `json:"success"`
}
func (CancelResponse) HasError ¶
func (r CancelResponse) HasError() error
type CreateQueryRequest ¶ added in v0.4.0
type CreateQueryResponse ¶ added in v0.4.0
type CreateQueryResponse struct {
QueryID int `json:"query_id"`
}
type CreateVisualizationRequest ¶ added in v0.4.6
type CreateVisualizationResponse ¶ added in v0.4.6
type CreateVisualizationResponse struct {
ID int64 `json:"id"`
}
type DatasetColumn ¶ added in v0.3.0
type DatasetOwner ¶ added in v0.3.0
type DatasetResponse ¶ added in v0.3.0
type DatasetResponse struct {
Type string `json:"type"`
FullName string `json:"full_name"`
IsPrivate bool `json:"is_private"`
Columns []DatasetColumn `json:"columns"`
Owner *DatasetOwner `json:"owner"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
func (DatasetResponse) HasError ¶ added in v0.3.0
func (d DatasetResponse) HasError() error
type DeleteVisualizationResponse ¶ added in v0.4.7
type DeleteVisualizationResponse struct {
OK bool `json:"ok"`
}
type ExecuteRequest ¶
type ExecuteResponse ¶
type ExecuteResponse struct {
ExecutionID string `json:"execution_id,omitempty"`
State string `json:"state,omitempty"`
}
func (ExecuteResponse) HasError ¶
func (e ExecuteResponse) HasError() error
type ExecuteSQLRequest ¶ added in v0.3.0
type ExecutionError ¶ added in v0.3.0
type GetQueryResponse ¶ added in v0.4.0
type GetQueryResponse struct {
QueryID int `json:"query_id"`
Name string `json:"name"`
Description string `json:"description"`
QuerySQL string `json:"query_sql"`
Owner string `json:"owner"`
IsPrivate bool `json:"is_private"`
IsArchived bool `json:"is_archived"`
IsUnsaved bool `json:"is_unsaved"`
IsTemp bool `json:"is_temp"`
Version int `json:"version"`
QueryEngine string `json:"query_engine"`
Tags []string `json:"tags"`
Parameters []QueryParameter `json:"parameters"`
}
type GetVisualizationResponse ¶ added in v0.4.7
type ListDatasetsResponse ¶ added in v0.3.0
type ListDatasetsResponse struct {
Datasets []DatasetResponse `json:"datasets"`
Total int `json:"total"`
}
func (ListDatasetsResponse) HasError ¶ added in v0.3.0
func (l ListDatasetsResponse) HasError() error
type ListVisualizationsResponse ¶ added in v0.4.7
type ListVisualizationsResponse struct {
Results []VisualizationSummary `json:"results"`
TotalCount int32 `json:"total_count"`
}
type PipelineExecuteRequest ¶ added in v0.3.0
type PipelineExecuteResponse ¶ added in v0.3.0
type PipelineExecuteResponse struct {
PipelineExecutionID string `json:"pipeline_execution_id,omitempty"`
}
type PipelineNodeExecution ¶ added in v0.3.0
type PipelineNodeExecution struct {
ID int `json:"id,omitempty"`
QueryExecutionStatus PipelineQueryExecutionStatus `json:"query_execution_status,omitempty"`
}
type PipelineQueryExecutionStatus ¶ added in v0.3.0
type PipelineStatusResponse ¶ added in v0.3.0
type PipelineStatusResponse struct {
Status string `json:"status,omitempty"`
NodeExecutions []PipelineNodeExecution `json:"node_executions,omitempty"`
}
type QueryParameter ¶ added in v0.4.0
type Result ¶
type Result struct {
Metadata ResultMetadata `json:"metadata,omitempty"`
Rows []map[string]any `json:"rows,omitempty"`
}
type ResultMetadata ¶
type ResultMetadata struct {
ColumnNames []string `json:"column_names,omitempty"`
ResultSetBytes int64 `json:"result_set_bytes,omitempty"`
RowCount int `json:"row_count,omitempty"`
TotalResultSetBytes int64 `json:"total_result_set_bytes,omitempty"`
TotalRowCount int `json:"total_row_count,omitempty"`
DatapointCount int `json:"datapoint_count,omitempty"`
}
type ResultOptions ¶
type ResultOptions struct {
// request a specific page of rows
Page *ResultPageOption
}
ResultOptions is a struct that contains options for getting a result
func (ResultOptions) ToURLValues ¶
func (r ResultOptions) ToURLValues() url.Values
type ResultPageOption ¶
type ResultPageOption struct {
// we can have more than 2^32 rows, so we need to use int64 for the offset
Offset uint64
// assume server can't return more than 2^32 rows
Limit uint32
}
To paginate a large result set
type ResultsResponse ¶
type ResultsResponse struct {
QueryID int64 `json:"query_id"`
State string `json:"state"`
SubmittedAt time.Time `json:"submitted_at"`
ExpiresAt time.Time `json:"expires_at"`
ExecutionStartedAt *time.Time `json:"execution_started_at,omitempty"`
ExecutionEndedAt *time.Time `json:"execution_ended_at,omitempty"`
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
Error *ExecutionError `json:"error,omitempty"`
Result Result `json:"result,omitempty"`
NextOffset *uint64 `json:"next_offset,omitempty"`
NextURI *string `json:"next_uri,omitempty"`
IsExecutionFinished bool `json:"is_execution_finished,omitempty"`
}
func (*ResultsResponse) AddPageResult ¶
func (r *ResultsResponse) AddPageResult(pageResp *ResultsResponse)
func (ResultsResponse) HasError ¶
func (r ResultsResponse) HasError() error
func (ResultsResponse) IsEmpty ¶
func (r ResultsResponse) IsEmpty() bool
type SearchDatasetMetadata ¶ added in v0.4.1
type SearchDatasetMetadata struct {
PageRankScore *float64 `json:"page_rank_score,omitempty"`
Description *string `json:"description,omitempty"`
AbiType *string `json:"abi_type,omitempty"`
ContractName *string `json:"contract_name,omitempty"`
ProjectName *string `json:"project_name,omitempty"`
SpellType *string `json:"spell_type,omitempty"`
SpellMetadata json.RawMessage `json:"spell_metadata,omitempty"`
}
type SearchDatasetResult ¶ added in v0.4.1
type SearchDatasetResult struct {
FullName string `json:"full_name"`
Category string `json:"category"`
DatasetType *string `json:"dataset_type,omitempty"`
Blockchains []string `json:"blockchains,omitempty"`
Visibility *string `json:"visibility,omitempty"`
OwnerScope *string `json:"owner_scope,omitempty"`
Description *string `json:"description,omitempty"`
Schema json.RawMessage `json:"schema,omitempty"`
Metadata *SearchDatasetMetadata `json:"metadata,omitempty"`
}
type SearchDatasetsByContractAddressRequest ¶ added in v0.4.3
type SearchDatasetsPagination ¶ added in v0.4.1
type SearchDatasetsRequest ¶ added in v0.4.1
type SearchDatasetsRequest struct {
Query *string `json:"query,omitempty"`
Categories []string `json:"categories,omitempty"`
Blockchains []string `json:"blockchains,omitempty"`
DatasetTypes []string `json:"dataset_types,omitempty"`
Schemas []string `json:"schemas,omitempty"`
OwnerScope *string `json:"owner_scope,omitempty"`
IncludePrivate *bool `json:"include_private,omitempty"`
IncludeSchema *bool `json:"include_schema,omitempty"`
IncludeMetadata *bool `json:"include_metadata,omitempty"`
Limit *int32 `json:"limit,omitempty"`
Offset *int32 `json:"offset,omitempty"`
}
type SearchDatasetsResponse ¶ added in v0.4.1
type SearchDatasetsResponse struct {
Total int32 `json:"total"`
Results []SearchDatasetResult `json:"results"`
Pagination SearchDatasetsPagination `json:"pagination"`
}
type StatusResponse ¶
type StatusResponse struct {
ExecutionID string `json:"execution_id,omitempty"`
QueryID int `json:"query_id,omitempty"`
State string `json:"state,omitempty"`
SubmittedAt time.Time `json:"submitted_at,omitempty"`
ExecutionStartedAt *time.Time `json:"execution_started_at,omitempty"`
ExecutionEndedAt *time.Time `json:"execution_ended_at,omitempty"`
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
Error *ExecutionError `json:"error,omitempty"`
ResultMetadata *ResultMetadata `json:"result_metadata,omitempty"`
}
func (StatusResponse) HasError ¶
func (s StatusResponse) HasError() error
type UpdateQueryRequest ¶ added in v0.4.0
type UpdateQueryRequest struct {
Name *string `json:"name,omitempty"`
QuerySQL *string `json:"query_sql,omitempty"`
Description *string `json:"description,omitempty"`
IsPrivate *bool `json:"is_private,omitempty"`
IsArchived *bool `json:"is_archived,omitempty"`
Tags []string `json:"tags,omitempty"`
Parameters []QueryParameter `json:"parameters,omitempty"`
}
type UpdateQueryResponse ¶ added in v0.4.0
type UpdateQueryResponse struct {
QueryID int `json:"query_id"`
}
type UpdateVisualizationRequest ¶ added in v0.4.7
type UpdateVisualizationResponse ¶ added in v0.4.7
type UpdateVisualizationResponse struct {
ID int64 `json:"id"`
}
type UploadsCSVRequest ¶ added in v0.3.0
type UploadsCSVResponse ¶ added in v0.3.0
type UploadsClearResponse ¶ added in v0.3.0
type UploadsClearResponse struct {
Message string `json:"message"`
}
type UploadsColumn ¶ added in v0.3.0
type UploadsCreateRequest ¶ added in v0.3.0
type UploadsCreateRequest struct {
Namespace string `json:"namespace"`
TableName string `json:"table_name"`
Schema []UploadsColumn `json:"schema"`
Description string `json:"description,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
}
type UploadsCreateResponse ¶ added in v0.3.0
type UploadsDeleteResponse ¶ added in v0.3.0
type UploadsDeleteResponse struct {
Message string `json:"message"`
}
type UploadsInsertResponse ¶ added in v0.3.0
type UploadsListElement ¶ added in v0.3.0
type UploadsListElement struct {
FullName string `json:"full_name"`
IsPrivate bool `json:"is_private"`
TableSizeBytes string `json:"table_size_bytes"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PurgedAt *time.Time `json:"purged_at,omitempty"`
Owner UploadsOwner `json:"owner"`
Columns []UploadsColumn `json:"columns"`
}
type UploadsListResponse ¶ added in v0.3.0
type UploadsListResponse struct {
Tables []UploadsListElement `json:"tables"`
}
type UploadsOwner ¶ added in v0.3.0
type UsageRequest ¶ added in v0.3.0
type UsageResponse ¶ added in v0.3.0
type UsageResponse struct {
PrivateQueries int `json:"private_queries"`
PrivateDashboards int `json:"private_dashboards"`
BytesUsed int64 `json:"bytes_used"`
BytesAllowed int64 `json:"bytes_allowed"`
BillingPeriods []BillingPeriod `json:"billing_periods"`
}
type VisualizationSummary ¶ added in v0.4.7
type WhoAmIResponse ¶ added in v0.4.4
type WhoAmIResponse struct {
CustomerID string `json:"customer_id"` // e.g. "user_123" or "team_456"
CreatedBy int `json:"created_by"` // integer user ID of the key creator
APIKeyID string `json:"api_key_id"` // ULID of the API key
Handle string `json:"handle"` // username or team handle
}
WhoAmIResponse represents the response from the /api/whoami endpoint. It identifies the user or team associated with the current API key.
Click to show internal directories.
Click to hide internal directories.