Documentation ¶
Index ¶
- type AdditionalProcessing
- type BaseFilter
- type BoolOperator
- type CacheCloudConfig
- type CacheCredentials
- type CacheType
- type Client
- type Column
- type DashboardConfig
- type DashboardFilter
- type DashboardItem
- type DatabaseCredentials
- type DateField
- type DateOperator
- type DateRange
- type DateValue
- type Field
- type FieldFormat
- type FieldType
- type Filter
- type FilterType
- type FormattedColumn
- type Mapable
- type NullOperator
- type NumberOperator
- type Operator
- type PgError
- type QueryResult
- type QueryResults
- type QuillClientParams
- type QuillClientResponse
- type QuillConfig
- type QuillQueryParams
- type QuillQueryResult
- type QuillRequest
- type QuillRequestMetadata
- type RedisMapable
- type Request
- type RequestBody
- type Section
- type StringOperator
- type TimeUnit
- type YAxisField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalProcessing ¶
type AdditionalProcessing struct { GetSchema *bool `json:"getSchema,omitempty"` GetColumns *bool `json:"getColumns,omitempty"` GetColumnsForSchema *bool `json:"getColumnsForSchema,omitempty"` GetTables *bool `json:"getTables,omitempty"` Schema *string `json:"schema,omitempty"` SchemaNames []string `json:"schemaNames,omitempty"` Table *string `json:"table,omitempty"` FieldsToRemove []string `json:"fieldsToRemove,omitempty"` ArrayToMap *struct { ArrayName string Field string } `json:"arrayToMap,omitempty"` OverridePost *bool `json:"overridePost,omitempty"` ConvertDatatypes *bool `json:"convertDatatypes,omitempty"` LimitThousand *bool `json:"limitThousand,omitempty"` LimitBy *int `json:"limitBy,omitempty"` }
type BaseFilter ¶
type BaseFilter struct { FilterType FilterType `json:"filterType"` FieldType FieldType `json:"fieldType"` Operator Operator `json:"operator"` Field string `json:"field"` Value interface{} `json:"value"` Table *string `json:"table,omitempty"` }
func ConvertCustomFilter ¶
func ConvertCustomFilter(filter Filter) BaseFilter
type BoolOperator ¶
type BoolOperator string
const ( BOOL_EQUAL_TO BoolOperator = "equal to" BOOL_NOT_EQUAL_TO BoolOperator = "not equal to" )
type CacheCloudConfig ¶
type CacheCloudConfig struct { Type CacheType Default interface{} }
CacheCloudConfig holds the configuration for cache-related settings.
type CacheCredentials ¶
type CacheCredentials struct { Username string Password string Host string Port string CacheType string TTL *time.Duration }
CacheCredentials holds the credentials and configuration for a cache.
type CacheType ¶
type CacheType struct {
CacheQueries bool
}
CacheType holds the cache-related boolean settings.
type Client ¶
type Client struct { Name string DatabaseConnectionString string ETLDatabaseConnectionString string StagingDatabaseConnectionString string CustomerTableTitleFieldName string DatabaseType string CustomerFieldName string CustomerTableFieldName string CustomerTableName string CustomerView string CustomerFieldType string UseSSL bool ServerCA string ClientCert string ClientKey string DefaultQuery string IgnoreDarkMode bool DomainName string HideSqlEditor bool AdminCustomerID string StagingAdminCustomerID string CacheCloudConfig CacheCloudConfig }
Client represents the configuration and settings for a database client.
type DashboardConfig ¶
type DashboardConfig struct { Filters []DashboardFilter Sections map[string][]DashboardItem `json:"sections"` Name string }
type DashboardFilter ¶
type DashboardItem ¶
type DashboardItem struct { ID string `json:"_id"` ChartType string `json:"chartType"` ClientId string `json:"clientId"` Columns []Column `json:"columns"` CreatedAt string `json:"createdAt"` // or time.Time if you are going to parse it CustomerId string `json:"customerId"` DashboardName string `json:"dashboardName"` DateField DateField `json:"dateField"` Name string `json:"name"` QueryString string `json:"queryString"` Template bool `json:"template"` UpdatedAt string `json:"updatedAt"` // or time.Time if you are going to parse it XAxisField string `json:"xAxisField"` XAxisFormat string `json:"xAxisFormat"` XAxisLabel string `json:"xAxisLabel"` YAxisFields []YAxisField `json:"yAxisFields"` YAxisLabel string `json:"yAxisLabel"` }
type DatabaseCredentials ¶
type DateOperator ¶
type DateOperator string
const ( DATE_CUSTOM DateOperator = "custom" DATE_IN_THE_LAST DateOperator = "in the last" DATE_IN_THE_PREVIOUS DateOperator = "in the previous" DATE_IN_THE_CURRENT DateOperator = "in the current" DATE_EQUAL_TO DateOperator = "equal to" DATE_NOT_EQUAL_TO DateOperator = "not equal to" DATE_GREATER_THAN DateOperator = "greater than" DATE_LESS_THAN DateOperator = "less than" DATE_GREATER_THAN_OR_EQUAL_TO DateOperator = "greater than or equal to" DATE_LESS_THAN_OR_EQUAL_TO DateOperator = "less than or equal to" )
type FieldFormat ¶
type FieldFormat string
const ( WholeNumber FieldFormat = "whole_number" OneDecimalPlace FieldFormat = "one_decimal_place" TwoDecimalPlaces FieldFormat = "two_decimal_places" DollarAmount FieldFormat = "dollar_amount" MMMYYYY FieldFormat = "MMM_yyyy" MMMDDYYYY FieldFormat = "MMM_dd_yyyy" MMMDDToMMMDD FieldFormat = "MMM_dd-MMM_dd" MMMDDHHMMAPPM FieldFormat = "MMM_dd_hh:mm_ap_pm" HHAPPM FieldFormat = "hh_ap_pm" Percent FieldFormat = "percent" StringFormat FieldFormat = "string" )
type Filter ¶
type Filter struct { FilterType FilterType `json:"filterType"` Operator Operator `json:"operator"` Value interface{} `json:"value"` Field string `json:"field"` Table string `json:"table"` }
type FilterType ¶
type FilterType string
const ( STRING_FILTER FilterType = "string-filter" DATE_FILTER FilterType = "date-filter" DATE_CUSTOM_FILTER FilterType = "date-custom-filter" DATE_COMPARISON_FILTER FilterType = "date-comparison-filter" NUMERIC_FILTER FilterType = "numeric-filter" NULL_FILTER FilterType = "null-filter" STRING_IN_FILTER FilterType = "string-in-filter" BOOLEAN_FILTER FilterType = "boolean-filter" )
type FormattedColumn ¶
type FormattedColumn struct { Label string `json:"label"` Field string `json:"field,omitempty"` ChartType string `json:"chartype,omitempty"` Format FieldFormat `json:"format,omitempty"` FieldType string `json:"fieldType,omitempty"` }
type Mapable ¶
type Mapable interface { Get(key string) (string, error) Set(key string, value string, ttl *time.Duration) (string, error) }
Mapable is an interface that defines the methods for cache operations.
type NullOperator ¶
type NullOperator string
const ( IS_NOT_NULL NullOperator = "is not null" IS_NULL NullOperator = "is null" )
type NumberOperator ¶
type NumberOperator string
const ( NUMBER_EQUAL_TO NumberOperator = "equal to" NUMBER_NOT_EQUAL_TO NumberOperator = "not equal to" NUMBER_GREATER_THAN NumberOperator = "greater than" NUMBER_LESS_THAN NumberOperator = "less than" NUMBER_GREATER_THAN_OR_EQUAL_TO NumberOperator = "greater than or equal to" NUMBER_LESS_THAN_OR_EQUAL_TO NumberOperator = "less than or equal to" )
type QueryResult ¶
type QueryResults ¶
type QuillClientParams ¶
type QuillClientParams struct { PrivateKey string DatabaseConnectionString *string DatabaseConfig interface{} DatabaseType string Cache *CacheCredentials MetadataServerURL *string }
type QuillClientResponse ¶
type QuillClientResponse struct { Queries []interface{} `json:"queries"` Metadata interface{} `json:"metadata"` RunQueryConfig *AdditionalProcessing `json:"runQueryConfig,omitempty"` Error *string `json:"error,omitempty"` }
type QuillConfig ¶
type QuillConfig struct { PrivateKey string DB *DatabaseCredentials Cache *CacheCredentials }
type QuillQueryParams ¶
type QuillQueryParams struct { OrgId string Metadata QuillRequestMetadata Filters *[]Filter }
type QuillQueryResult ¶
type QuillQueryResult struct { Data interface{} `json:"data,omitempty"` Status string `json:"status"` Error *string `json:"error,omitempty"` Queries *QueryResults `json:"queries,omitempty"` }
type QuillRequest ¶
type QuillRequest struct { OrgID *string `json:"orgId"` Metadata QuillRequestMetadata `json:"metadata"` }
type QuillRequestMetadata ¶
type QuillRequestMetadata struct { Task string `json:"task,omitempty"` Queries *[]string `json:"queries,omitempty"` PreQueries *[]string `json:"preQueries,omitempty"` RunQueryConfig *AdditionalProcessing `json:"runQueryConfig,omitempty"` Query *string `json:"query,omitempty"` Id *string `json:"id,omitempty"` Filters *[]interface{} `json:"filters,omitempty"` Name *string `json:"name,omitempty"` XAxisField *string `json:"xAxisField,omitempty"` YAxisFields *[]FormattedColumn `json:"yAxisFields,omitempty"` XAxisLabel *string `json:"xAxisLabel,omitempty"` XAxisFormat *FieldFormat `json:"xAxisFormat,omitempty"` YAxisLabel *string `json:"yAxisLabel,omitempty"` ChartType *string `json:"chartType,omitempty"` DashboardName *string `json:"dashboardName,omitempty"` Columns *[]FormattedColumn `json:"columns,omitempty"` DateField *DateField `json:"dateField,omitempty"` Template *bool `json:"template,omitempty"` ClientId *string `json:"clientId,omitempty"` Deleted *bool `json:"deleted,omitempty"` DatabaseType *string `json:"databaseType,omitempty"` OrgID interface{} `json:"orgId,omitempty"` // sometimes int, sometimes string DashboardItemId *string `json:"dashboardItemId,omitempty"` Ast map[string]interface{} `json:"ast,omitempty"` PublicKey *string `json:"publicKey,omitempty"` Pivot *bool `json:"pivot,omitempty"` UseNewNodeSql *bool `json:"useNewNodeSql,omitempty"` UseUpdatedDataGathering *bool `json:"useUpdatedDataGathering,omitempty"` AdditionalProcessing map[string]interface{} `json:"additionalProcessing,omitempty"` ReportId *string `json:"reportId,omitempty"` Tables *[]string `json:"tables,omitempty"` Table *string `json:"table,omitempty"` RemoveCustomerField *bool `json:"removeCustomerField,omitempty"` GetCustomFields *bool `json:"getCustomFields,omitempty"` CustomFieldsByTable *[]map[string]interface{} `json:"customFieldsByTable,omitempty"` TemplateReportIds *[]string `json:"templateReportIds,omitempty"` ReferencedTables *[]string `json:"referencedTables,omitempty"` ReferencedColumns map[string]interface{} `json:"referencedColumns,omitempty"` }
type RedisMapable ¶
type RedisMapable interface { Get(key string) (string, error) Set(key string, value interface{}, expiration time.Duration) error }
Mapable interface represents a cache that can get and set values
type Request ¶
type Request struct {
Body RequestBody
}
type RequestBody ¶
type RequestBody struct {
Metadata QuillRequestMetadata `json:"metadata"`
}
type Section ¶
type Section struct { ID string `json:"_id"` ChartType string `json:"chartType"` ClientId string `json:"clientId"` Columns []Column `json:"columns"` CreatedAt string `json:"createdAt"` // or time.Time if you are going to parse it CustomerId string `json:"customerId"` DashboardName string `json:"dashboardName"` DateField DateField `json:"dateField"` Name string `json:"name"` QueryString string `json:"queryString"` Template bool `json:"template"` UpdatedAt string `json:"updatedAt"` // or time.Time if you are going to parse it XAxisField string `json:"xAxisField"` XAxisFormat string `json:"xAxisFormat"` XAxisLabel string `json:"xAxisLabel"` YAxisFields []YAxisField `json:"yAxisFields"` YAxisLabel string `json:"yAxisLabel"` }
type StringOperator ¶
type StringOperator string
const ( STRING_IS_EXACTLY StringOperator = "is exactly" STRING_IS_NOT_EXACTLY StringOperator = "is not exactly" STRING_CONTAINS StringOperator = "contains" STRING_IS StringOperator = "is" STRING_IS_NOT StringOperator = "is not" )
Click to show internal directories.
Click to hide internal directories.