Documentation
¶
Index ¶
- Constants
- type ArchiveDashboardResponse
- type BillingPeriod
- type CancelResponse
- type ContractSubmission
- type ContractSubmissionInput
- type ContractSubmissionResult
- type CreateDashboardRequest
- type CreateFolderRequest
- type CreateQueryRequest
- type CreateQueryResponse
- type CreateVisualizationRequest
- type CreateVisualizationResponse
- type DashboardResponse
- type DatasetColumn
- type DatasetOwner
- type DatasetResponse
- type DeleteFolderResponse
- type DeleteMaterializedViewResponse
- type DeleteScheduleResponse
- type DeleteVisualizationResponse
- type ExecuteRequest
- type ExecuteResponse
- type ExecuteSQLRequest
- type ExecutionError
- type Folder
- type FolderErrorDetails
- type FolderItem
- type FolderSummary
- type GetFolderOptions
- type GetFolderResponse
- type GetMaterializedViewResponse
- type GetQueryResponse
- type GetVisualizationResponse
- type ListContractSubmissionsOptions
- type ListContractSubmissionsResponse
- type ListDatasetsResponse
- type ListFoldersOptions
- type ListFoldersResponse
- type ListMaterializedViewsResponse
- type ListQueriesResponse
- type ListSchedulesOptions
- type ListSchedulesResponse
- type ListVisualizationsResponse
- type MaterializedViewListElement
- type MaterializedViewSchedule
- type MoveContentRequest
- type MoveContentResponse
- type MoveFolderRequest
- type ParamWidgetInput
- type ParamWidgetOutput
- type PipelineExecuteRequest
- type PipelineExecuteResponse
- type PipelineNodeExecution
- type PipelineQueryExecutionStatus
- type PipelineStatusResponse
- type QueryOverview
- type QueryParameter
- type RefreshMaterializedViewRequest
- type RefreshMaterializedViewResponse
- type Result
- type ResultMetadata
- type ResultOptions
- type ResultPageOption
- type ResultsResponse
- type Schedule
- type SearchDatasetMetadata
- type SearchDatasetResult
- type SearchDatasetsByContractAddressRequest
- type SearchDatasetsPagination
- type SearchDatasetsRequest
- type SearchDatasetsResponse
- type SetScheduleRequest
- type SetScheduleResponse
- type StatusResponse
- type SubmitContractsRequest
- type SubmitContractsResponse
- type TextWidgetInput
- type TextWidgetOutput
- type UpdateDashboardRequest
- type UpdateFolderRequest
- 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 UpsertMaterializedViewRequest
- type UpsertMaterializedViewResponse
- type UsageRequest
- type UsageResponse
- type VisualizationSummary
- type VisualizationWidgetInput
- type VisualizationWidgetOutput
- type WhoAmIResponse
- type WidgetPosition
Constants ¶
const LimitRows = 32_000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveDashboardResponse ¶ added in v0.4.8
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 ContractSubmission ¶ added in v0.6.0
type ContractSubmission struct {
ID string `json:"id"`
BlockchainName string `json:"blockchain_name"`
Address string `json:"address"`
ProjectName string `json:"project_name"`
ContractName string `json:"contract_name"`
Status string `json:"status"`
SubmissionType string `json:"submission_type"`
Comment *string `json:"comment,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
IdempotencyKey *string `json:"idempotency_key,omitempty"`
}
ContractSubmission is a contract decoding submission as returned by GET /v1/contracts/submissions.
type ContractSubmissionInput ¶ added in v0.6.0
type ContractSubmissionInput struct {
BlockchainName string `json:"blockchain_name"`
Address string `json:"address"`
ProjectName string `json:"project_name"`
ContractName string `json:"contract_name"`
// ABI is the contract ABI, either as its JSON array of fragments or as a JSON
// string containing that array.
ABI json.RawMessage `json:"abi"`
HasMultipleInstances bool `json:"has_multiple_instances"`
IsCreatedByFactory bool `json:"is_created_by_factory"`
IsManualABI bool `json:"is_manual_abi"`
IsProxy bool `json:"is_proxy"`
// SubmissionType is one of new (default), upgrade, rename, delete, other.
// Upgrades, renames, deletions and other always go to manual review.
SubmissionType *string `json:"submission_type,omitempty"`
// ResubmissionReason is required for delete and other.
ResubmissionReason *string `json:"resubmission_reason,omitempty"`
// OldProjectName and OldContractName are required for rename and name the
// contract as it is decoded today.
OldProjectName *string `json:"old_project_name,omitempty"`
OldContractName *string `json:"old_contract_name,omitempty"`
// IdempotencyKey is a client-chosen key, unique per account, that makes the
// item safe to retry: a key already used returns the existing submission.
IdempotencyKey *string `json:"idempotency_key,omitempty"`
}
ContractSubmissionInput is one contract to submit for decoding. It mirrors the form at https://dune.com/contracts/new.
type ContractSubmissionResult ¶ added in v0.6.0
type ContractSubmissionResult struct {
Index int `json:"index"`
SubmissionID *string `json:"submission_id,omitempty"`
Status *string `json:"status,omitempty"`
Replayed bool `json:"replayed,omitempty"`
Error *string `json:"error,omitempty"`
}
ContractSubmissionResult is the per-item outcome of a submission batch, matched to the request by Index. On success SubmissionID and Status are set; on failure Error describes what to fix.
type CreateDashboardRequest ¶ added in v0.4.8
type CreateDashboardRequest struct {
Name string `json:"name"`
IsPrivate *bool `json:"is_private,omitempty"`
VisualizationIDs []int64 `json:"visualization_ids,omitempty"`
TextWidgets []TextWidgetInput `json:"text_widgets,omitempty"`
ColumnsPerRow *int32 `json:"columns_per_row,omitempty"`
}
type CreateFolderRequest ¶ added in v0.7.0
type CreateFolderRequest struct {
Name string `json:"name"`
// ParentFolderID creates the folder inside another folder; nil creates it at the library root.
ParentFolderID *string `json:"parent_folder_id,omitempty"`
Description *string `json:"description,omitempty"`
// Icon defaults to "folder".
Icon *string `json:"icon,omitempty"`
// Color is a preset (green, yellow, red, blue-light, gray, orange, blue, pink, mauve, amber)
// or a hex value such as #E5477D. Defaults to "gray".
Color *string `json:"color,omitempty"`
}
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 DashboardResponse ¶ added in v0.4.8
type DashboardResponse struct {
DashboardID int64 `json:"dashboard_id"`
Name string `json:"name"`
Slug string `json:"slug"`
IsPrivate bool `json:"is_private"`
Tags []string `json:"tags"`
DashboardURL string `json:"dashboard_url"`
VisualizationWidgets []VisualizationWidgetOutput `json:"visualization_widgets"`
TextWidgets []TextWidgetOutput `json:"text_widgets"`
ParamWidgets []ParamWidgetOutput `json:"param_widgets"`
}
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 DeleteFolderResponse ¶ added in v0.7.0
type DeleteFolderResponse struct {
FolderID string `json:"folder_id"`
Path string `json:"path"`
// DeletedFolderCount counts the folder itself and every subfolder deleted with it.
DeletedFolderCount int `json:"deleted_folder_count"`
ArchivedQueryCount int `json:"archived_query_count"`
ArchivedDashboardCount int `json:"archived_dashboard_count"`
}
type DeleteMaterializedViewResponse ¶ added in v0.5.0
type DeleteMaterializedViewResponse struct {
Message string `json:"message"`
}
type DeleteScheduleResponse ¶ added in v0.7.0
type DeleteScheduleResponse struct {
// Deleted is false when there was no schedule.
Deleted bool `json:"deleted"`
}
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 Folder ¶ added in v0.7.0
type Folder struct {
FolderID string `json:"folder_id"`
Name string `json:"name"`
// Path is the full path from the library root, such as /Research/RWA.
Path string `json:"path"`
// ParentFolderID is nil for a folder at the library root.
ParentFolderID *string `json:"parent_folder_id"`
Description *string `json:"description"`
Icon string `json:"icon"`
Color string `json:"color"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Folder is a folder in a team's or a user's library.
type FolderErrorDetails ¶ added in v0.7.0
type FolderErrorDetails struct {
ExistingFolderID *string `json:"existing_folder_id,omitempty"`
SubfolderCount *int `json:"subfolder_count,omitempty"`
QueryCount *int `json:"query_count,omitempty"`
DashboardCount *int `json:"dashboard_count,omitempty"`
}
FolderErrorDetails is the details object of a folder endpoint error. Decode it from APIError.Details: folder_already_exists sets ExistingFolderID, and folder_not_empty sets the counts a recursive delete would remove.
type FolderItem ¶ added in v0.7.0
type FolderItem struct {
// Type is "query" or "dashboard".
Type string `json:"type"`
// ID is the query ID or the dashboard ID, depending on Type.
ID int64 `json:"id"`
Name string `json:"name"`
IsPrivate bool `json:"is_private"`
UpdatedAt time.Time `json:"updated_at"`
}
FolderItem is a query or a dashboard inside a folder.
type FolderSummary ¶ added in v0.7.0
type FolderSummary struct {
FolderID string `json:"folder_id"`
Name string `json:"name"`
Path string `json:"path"`
// ItemCount counts the queries and dashboards directly inside the folder.
ItemCount int `json:"item_count"`
}
FolderSummary is a folder as listed under its parent.
type GetFolderOptions ¶ added in v0.7.0
type GetFolderOptions struct {
// Limit is the maximum number of items to return (default 50, max 100).
Limit int
Offset int
}
GetFolderOptions pages through the items of GET /v1/folders/{folder_id}.
func (GetFolderOptions) ToURLValues ¶ added in v0.7.0
func (o GetFolderOptions) ToURLValues() url.Values
ToURLValues encodes the set options as query parameters.
type GetFolderResponse ¶ added in v0.7.0
type GetFolderResponse struct {
Folder Folder `json:"folder"`
Subfolders []FolderSummary `json:"subfolders"`
// HasMoreSubfolders is true when there are more than 100 subfolders; page through them
// with ListFolders and ParentFolderID.
HasMoreSubfolders bool `json:"has_more_subfolders"`
Items []FolderItem `json:"items"`
TotalItems int `json:"total_items"`
// NextOffset is set when more items exist; pass it back as Offset.
NextOffset *int `json:"next_offset,omitempty"`
}
type GetMaterializedViewResponse ¶ added in v0.5.0
type GetMaterializedViewResponse struct {
// ID and the owner fields are only populated for Dune-team API keys.
ID string `json:"id,omitempty"`
SQLID string `json:"sql_id"`
OwnerUserID *int `json:"owner_user_id,omitempty"`
OwnerTeamID *int `json:"owner_team_id,omitempty"`
QueryID int `json:"query_id"`
IsPrivate bool `json:"is_private"`
LastExecutionIDs []string `json:"last_execution_ids"`
TableSizeBytes int64 `json:"table_size_bytes"`
// Schedule is nil when the materialized view has no scheduled refresh.
Schedule *MaterializedViewSchedule `json:"schedule,omitempty"`
}
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 ListContractSubmissionsOptions ¶ added in v0.6.0
type ListContractSubmissionsOptions struct {
// Limit is the maximum number of submissions to return (default 50, max 250).
Limit int
// Cursor is next_cursor from a previous response, to fetch the next page.
Cursor string
BlockchainName string
Address string
ProjectName string
ContractName string
// Status is one of pending, approved, rejected, processed, in_progress,
// cancelled, needs_manual_review.
Status string
}
ListContractSubmissionsOptions are the filters and paging for GET /v1/contracts/submissions. Zero values are omitted.
func (ListContractSubmissionsOptions) ToURLValues ¶ added in v0.6.0
func (o ListContractSubmissionsOptions) ToURLValues() url.Values
ToURLValues encodes the set options as query parameters.
type ListContractSubmissionsResponse ¶ added in v0.6.0
type ListContractSubmissionsResponse struct {
Submissions []ContractSubmission `json:"submissions"`
Total int `json:"total"`
// NextCursor is present when more results exist; pass it back as Cursor.
NextCursor *string `json:"next_cursor,omitempty"`
}
ListContractSubmissionsResponse is the response of GET /v1/contracts/submissions.
func (ListContractSubmissionsResponse) HasError ¶ added in v0.6.0
func (l ListContractSubmissionsResponse) HasError() error
HasError reports whether the response is missing its submissions array.
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 ListFoldersOptions ¶ added in v0.7.0
type ListFoldersOptions struct {
// ParentFolderID lists the subfolders of this folder; empty lists the library root.
ParentFolderID string
// NameContains is a case-insensitive substring filter on the folder name.
NameContains string
// Limit is the maximum number of folders to return (default 50, max 100).
Limit int
Offset int
}
ListFoldersOptions are the filters and paging for GET /v1/folders. Zero values are omitted.
func (ListFoldersOptions) ToURLValues ¶ added in v0.7.0
func (o ListFoldersOptions) ToURLValues() url.Values
ToURLValues encodes the set options as query parameters.
type ListFoldersResponse ¶ added in v0.7.0
type ListFoldersResponse struct {
Folders []FolderSummary `json:"folders"`
// NextOffset is set when more folders exist; pass it back as Offset.
NextOffset *int `json:"next_offset,omitempty"`
}
type ListMaterializedViewsResponse ¶ added in v0.5.0
type ListMaterializedViewsResponse struct {
MaterializedViews []*MaterializedViewListElement `json:"materialized_views"`
// NextOffset is 0 when there are no further pages.
NextOffset int32 `json:"next_offset"`
}
type ListQueriesResponse ¶ added in v0.7.0
type ListQueriesResponse struct {
Queries []QueryOverview `json:"queries"`
// Total is the number of queries across all pages.
Total int `json:"total"`
}
ListQueriesResponse is the response of GET /v1/queries.
type ListSchedulesOptions ¶ added in v0.7.0
type ListSchedulesOptions struct {
// Limit is the maximum number of schedules to return (default 20, max 100).
Limit int
Offset int
}
ListSchedulesOptions pages through GET /v1/schedules. Zero values are omitted.
func (ListSchedulesOptions) ToURLValues ¶ added in v0.7.0
func (o ListSchedulesOptions) ToURLValues() url.Values
ToURLValues encodes the set options as query parameters.
type ListSchedulesResponse ¶ added in v0.7.0
type ListVisualizationsResponse ¶ added in v0.4.7
type ListVisualizationsResponse struct {
Results []VisualizationSummary `json:"results"`
TotalCount int32 `json:"total_count"`
}
type MaterializedViewListElement ¶ added in v0.5.0
type MaterializedViewSchedule ¶ added in v0.5.0
type MoveContentRequest ¶ added in v0.7.0
type MoveContentRequest struct {
// QueryIDs and DashboardIDs hold at most 100 IDs each.
QueryIDs []int64 `json:"query_ids,omitempty"`
DashboardIDs []int64 `json:"dashboard_ids,omitempty"`
// TargetFolderID is the destination folder; nil takes the content out of folders.
// It is always sent, as null when nil.
TargetFolderID *string `json:"target_folder_id"`
}
MoveContentRequest is the body of POST /v1/content/move.
type MoveContentResponse ¶ added in v0.7.0
type MoveFolderRequest ¶ added in v0.7.0
type MoveFolderRequest struct {
// ParentFolderID is the new parent folder; nil moves the folder to the library root.
// It is always sent, as null when nil.
ParentFolderID *string `json:"parent_folder_id"`
}
MoveFolderRequest is the body of POST /v1/folders/{folder_id}/move.
type ParamWidgetInput ¶ added in v0.4.8
type ParamWidgetInput struct {
Key string `json:"key"`
QueryID int64 `json:"query_id"`
VisualizationWidgetID int64 `json:"visualization_widget_id"`
Position *WidgetPosition `json:"position,omitempty"`
}
type ParamWidgetOutput ¶ added in v0.4.8
type ParamWidgetOutput struct {
WidgetID string `json:"widget_id"`
Key string `json:"key"`
QueryID int64 `json:"query_id"`
VisualizationWidgetID int64 `json:"visualization_widget_id"`
Position WidgetPosition `json:"position"`
}
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 QueryOverview ¶ added in v0.7.0
type QueryOverview struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags"`
Owner string `json:"owner"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
QueryOverview is a query as listed by ListQueries.
type QueryParameter ¶ added in v0.4.0
type RefreshMaterializedViewRequest ¶ added in v0.5.0
type RefreshMaterializedViewRequest struct {
Performance string `json:"performance,omitempty"`
}
type RefreshMaterializedViewResponse ¶ added in v0.5.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
// Columns returns only these columns, in this order.
Columns []string
// Filters keeps the rows that match a SQL WHERE-like expression, e.g. `"amount" > 0`.
Filters string
// SortBy orders the rows by these SQL ORDER BY expressions, in priority order,
// e.g. `"block_time" DESC`.
SortBy []string
// SampleCount returns a uniform random sample of this many rows in a single response.
// The API does not paginate a sample, so Page is ignored when it is set.
SampleCount uint32
}
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 Schedule ¶ added in v0.7.0
type Schedule struct {
// Type is "query", "dashboard", or "materialized_view". Materialized view refreshes are
// managed with the materialized view methods.
Type string `json:"type"`
// QueryID is set for query and materialized view schedules.
QueryID *int64 `json:"query_id,omitempty"`
// DashboardID is set for dashboard schedules.
DashboardID *int64 `json:"dashboard_id,omitempty"`
// CronExpression is a 5-part cron expression in UTC.
CronExpression string `json:"cron_expression"`
// Performance is the engine tier each run uses: small, medium, or large.
Performance string `json:"performance"`
NextExecutionTime *time.Time `json:"next_execution_time,omitempty"`
// ExpiresAt is nil when the schedule does not expire.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
Schedule runs a saved query, refreshes a dashboard, or refreshes a materialized view on a cron schedule. A query or a dashboard has at most one schedule.
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 SetScheduleRequest ¶ added in v0.7.0
type SetScheduleRequest struct {
// CronExpression is a 5-part cron expression in UTC. Supported: every 15, 20 or 30
// minutes ("*/15 * * * *"), hourly ("0 * * * *"), every 2, 3, 4, 6, 8 or 12 hours
// ("0 */6 * * *"), daily ("M H * * *") and weekly ("M H * * D"), where M is 0 or 30.
CronExpression string `json:"cron_expression"`
// Performance is small, medium, or large, and must be available on your plan.
// Every run is charged credits at this tier.
Performance string `json:"performance"`
// ExpiresAt stops the schedule after this time; nil means no expiration.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
SetScheduleRequest replaces all the settings of a query or dashboard schedule.
type SetScheduleResponse ¶ added in v0.7.0
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 SubmitContractsRequest ¶ added in v0.6.0
type SubmitContractsRequest struct {
// Submissions holds between 1 and 100 contracts.
Submissions []ContractSubmissionInput `json:"submissions"`
}
SubmitContractsRequest is the body of POST /v1/contracts/decode.
type SubmitContractsResponse ¶ added in v0.6.0
type SubmitContractsResponse struct {
Results []ContractSubmissionResult `json:"results"`
}
SubmitContractsResponse is the response of POST /v1/contracts/decode.
func (SubmitContractsResponse) HasError ¶ added in v0.6.0
func (s SubmitContractsResponse) HasError() error
HasError reports whether the response is missing its results array.
type TextWidgetInput ¶ added in v0.4.8
type TextWidgetInput struct {
Text string `json:"text"`
Position *WidgetPosition `json:"position,omitempty"`
}
type TextWidgetOutput ¶ added in v0.4.8
type TextWidgetOutput struct {
WidgetID int64 `json:"widget_id"`
Text string `json:"text"`
Position WidgetPosition `json:"position"`
}
type UpdateDashboardRequest ¶ added in v0.4.8
type UpdateDashboardRequest struct {
Name *string `json:"name,omitempty"`
Slug *string `json:"slug,omitempty"`
IsPrivate *bool `json:"is_private,omitempty"`
Tags *[]string `json:"tags,omitempty"`
VisualizationWidgets *[]VisualizationWidgetInput `json:"visualization_widgets,omitempty"`
TextWidgets *[]TextWidgetInput `json:"text_widgets,omitempty"`
ParamWidgets *[]ParamWidgetInput `json:"param_widgets,omitempty"`
ColumnsPerRow *int32 `json:"columns_per_row,omitempty"`
}
type UpdateFolderRequest ¶ added in v0.7.0
type UpdateFolderRequest struct {
Name *string `json:"name,omitempty"`
// Description set to an empty string clears it.
Description *string `json:"description,omitempty"`
Icon *string `json:"icon,omitempty"`
Color *string `json:"color,omitempty"`
}
UpdateFolderRequest changes the fields that are set and keeps the others.
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"`
}
func (UpdateQueryRequest) MarshalJSON ¶ added in v0.7.0
func (r UpdateQueryRequest) MarshalJSON() ([]byte, error)
MarshalJSON leaves out a nil Tags or Parameters, which keeps the current value, and sends an empty one, which clears it.
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 UpsertMaterializedViewRequest ¶ added in v0.5.0
type UpsertMaterializedViewResponse ¶ added in v0.5.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 VisualizationWidgetInput ¶ added in v0.4.8
type VisualizationWidgetInput struct {
VisualizationID int64 `json:"visualization_id"`
Position *WidgetPosition `json:"position,omitempty"`
}
type VisualizationWidgetOutput ¶ added in v0.4.8
type VisualizationWidgetOutput struct {
WidgetID int64 `json:"widget_id"`
VisualizationID int64 `json:"visualization_id"`
Position WidgetPosition `json:"position"`
}
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.