models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNameFromKey

func GetNameFromKey(key string) string

Types

type DataSet

type DataSet struct {
	Name        string       `toml:"name"`
	DBType      types.DBType `toml:"type"`
	Description string       `toml:"description"`
	DataSource  string       `toml:"data_source"`
}

func (*DataSet) GetCurrent

func (d *DataSet) GetCurrent() string

func (*DataSet) GetKey

func (d *DataSet) GetKey() string

type DataSource

type DataSource struct {
	Database      string               `toml:"database"`
	Name          string               `toml:"name"`
	Alias         string               `toml:"alias"`
	Type          types.DataSourceType `toml:"type"`
	Description   string               `toml:"description"`
	DimensionJoin DimensionJoins       `toml:"dimension_join"`
	MergeJoin     MergeJoin            `toml:"merge_join"`
}

func (*DataSource) GetDependencyTree

func (d *DataSource) GetDependencyTree() (Graph, error)

func (*DataSource) GetGetDependencyKey

func (d *DataSource) GetGetDependencyKey() []string

func (*DataSource) GetKey

func (d *DataSource) GetKey() string

func (*DataSource) IsDimension

func (d *DataSource) IsDimension() bool

func (*DataSource) IsFact

func (d *DataSource) IsFact() bool

func (*DataSource) IsValid

func (d *DataSource) IsValid() error

type DataSources

type DataSources []*DataSource

func (DataSources) KeyIndex

func (d DataSources) KeyIndex() map[string]*DataSource

type Dimension

type Dimension struct {
	DataSource  string              `toml:"data_source"`
	Name        string              `toml:"name"`
	FieldName   string              `toml:"field_name"`
	Type        types.DimensionType `toml:"type"`
	ValueType   types.ValueType     `toml:"value_type"`
	Dependency  []string            `toml:"dependency"`
	Description string              `toml:"description"`
}

func (*Dimension) GetDependency

func (d *Dimension) GetDependency() []string

func (*Dimension) GetKey

func (d *Dimension) GetKey() string

type DimensionJoins

type DimensionJoins []*JoinPair

func (DimensionJoins) GetDependencyTree

func (d DimensionJoins) GetDependencyTree(source string) (Graph, error)

func (DimensionJoins) IsValid

func (d DimensionJoins) IsValid() error

type Graph

type Graph map[string][]string

func (Graph) GetTree

func (g Graph) GetTree(current string) Graph

type IModel

type IModel interface {
	GetKey() string
}

type Join

type Join struct {
	DataSource string   `toml:"data_source"`
	Dimension  []string `toml:"dimension"`
	JoinType   string   `toml:"join_type"`
}

type JoinPair

type JoinPair []*Join

func (JoinPair) Get1

func (j JoinPair) Get1() *Join

func (JoinPair) Get2

func (j JoinPair) Get2() *Join

func (JoinPair) GetJoinType

func (j JoinPair) GetJoinType() string

func (JoinPair) IsValid

func (j JoinPair) IsValid() error

type MergeJoin

type MergeJoin []*Join

func (MergeJoin) GetDependencyTree

func (m MergeJoin) GetDependencyTree(source string) (Graph, error)

func (MergeJoin) IsValid

func (m MergeJoin) IsValid(source string) error

type Metric

type Metric struct {
	DataSource  string           `toml:"data_source"`
	Name        string           `toml:"name"`
	FieldName   string           `toml:"field_name"`
	Type        types.MetricType `toml:"type"`
	ValueType   types.ValueType  `toml:"value_type"`
	Description string           `toml:"description"`
	Dependency  []string         `toml:"dependency"`
	Filter      *types.Filter    `toml:"filter"`
}

func (*Metric) GetDependency

func (m *Metric) GetDependency() []string

func (*Metric) GetKey

func (m *Metric) GetKey() string

Jump to

Keyboard shortcuts

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