models

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	ID                   int              `json:"id"`
	CollectionID         int              `json:"collection_id"`
	DatabaseID           int              `json:"database_id"`
	TableID              int              `json:"table_id"`
	CreatorID            int              `json:"creator_id"`
	Name                 string           `json:"name"`
	QueryAverageDuration int              `json:"query_average_duration"`
	Description          string           `json:"description"`
	Display              string           `json:"display"`
	CreatedAt            MetabaseTime     `json:"created_at"`
	UpdatedAt            MetabaseTime     `json:"updated_at"`
	DatasetQuery         CardDatasetQuery `json:"dataset_query"`
	Archived             bool             `json:"archived"`
}

type CardDatasetQuery

type CardDatasetQuery struct {
	Type  string `json:"type"`
	Query struct {
		SourceTable int           `json:"source-table"`
		Filter      []interface{} `json:"filter"`
	} `json:"query"`
	Native   NativeDatasetQuery `json:"native"`
	Database int                `json:"database"`
}

type CardResultMetadata

type CardResultMetadata struct {
	ID            int          `json:"id"`
	Name          string       `json:"name"`
	DisplayName   string       `json:"display_name"`
	BaseType      string       `json:"base_type"`
	EffectiveType string       `json:"effective_type"`
	SemanticType  string       `json:"semantic_type"`
	Description   string       `json:"description"`
	Unit          string       `json:"unit"`
	FieldRef      []string     `json:"field_ref"`
	CreatedAt     MetabaseTime `json:"created_at"`
	UpdatedAt     MetabaseTime `json:"updated_at"`
}

type Collection

type Collection struct {
	ID          int          `json:"id"`
	Name        string       `json:"name"`
	Color       string       `json:"color"`
	Description string       `json:"description"`
	CreatedAt   MetabaseTime `json:"created_at"`
	UpdatedAt   MetabaseTime `json:"updated_at"`
}

type Dashboard

type Dashboard struct {
	ID           int          `json:"id"`
	CreatorID    int          `json:"creator_id"`
	CollectionID int          `json:"collection_id"`
	Name         string       `json:"name"`
	Description  string       `json:"description"`
	CreatedAt    MetabaseTime `json:"created_at"`
	UpdatedAt    MetabaseTime `json:"updated_at"`
	OrderedCards []struct {
		CardID int  `json:"card_id"`
		Card   Card `json:"card"`
	} `json:"ordered_cards"`
	LastEditInfo struct {
		Id        string    `json:"id"`
		Email     string    `json:"email"`
		Timestamp time.Time `json:"timestamp"`
	}
}

type Database

type Database struct {
	ID                       int          `json:"id"`
	DbID                     int          `json:"db_id"`
	Name                     string       `json:"name"`
	Features                 []string     `json:"features"`
	Description              string       `json:"description"`
	Timezone                 string       `json:"timezone"`
	Engine                   string       `json:"engine"`
	MetadataSyncSchedule     string       `json:"metadata_sync_schedule"`
	CacheFieldValuesSchedule string       `json:"cache_field_values_schedule"`
	AutoRunQueries           bool         `json:"auto_run_queries"`
	IsFullSync               bool         `json:"is_full_sync"`
	IsSample                 bool         `json:"is_sample"`
	IsOnDemand               bool         `json:"is_on_demand"`
	CreatedAt                MetabaseTime `json:"created_at"`
	UpdatedAt                MetabaseTime `json:"updated_at"`
	Details                  struct {
		Db                string      `json:"db"`
		Host              string      `json:"host"`
		Port              int         `json:"port"`
		Dbname            string      `json:"dbname"`
		User              string      `json:"user"`
		Password          string      `json:"password"`
		SSL               bool        `json:"ssl"`
		AdditionalOptions interface{} `json:"additional-options"`
		TunnelEnabled     bool        `json:"tunnel-enabled"`
		ProjectID         string      `json:"project-id"`
		DatasetID         string      `json:"dataset-id"`
	} `json:"details"`
}

type MetabaseTime

type MetabaseTime time.Time

func (MetabaseTime) ToPB

func (mt MetabaseTime) ToPB() *timestamppb.Timestamp

func (*MetabaseTime) UnmarshalJSON

func (mt *MetabaseTime) UnmarshalJSON(b []byte) error

type NativeDatasetQuery

type NativeDatasetQuery struct {
	Query        string                      `json:"query"`
	TemplateTags map[string]QueryTemplateTag `json:"template-tags"`
}

type QueryTemplateTag

type QueryTemplateTag struct {
	ID          string `json:"id"`
	Type        string `json:"type"`
	Name        string `json:"name"`
	DisplayName string `json:"display-name"`
}

type Table

type Table struct {
	ID          int          `json:"id"`
	DbID        int          `json:"db_id"`
	Name        string       `json:"name"`
	DisplayName string       `json:"display_name"`
	Description string       `json:"description"`
	FieldOrder  string       `json:"field_order"`
	EntityType  string       `json:"entity_type"`
	Schema      string       `json:"schema"`
	Active      bool         `json:"active"`
	CreatedAt   MetabaseTime `json:"created_at"`
	UpdatedAt   MetabaseTime `json:"updated_at"`
	Db          Database     `json:"db"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL