datamodel

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataModel

type DataModel struct {
	ID          string
	Name        string
	RowCount    int64
	Type        string
	WorkspaceID string
}

type DataModelReadModel

type DataModelReadModel interface {
	ListDataModels(ctx context.Context, workspaceID string, filter *ListDataModelsFilter) ([]*DataModel, error)

	CountDataModel(ctx context.Context, workspaceID string, filter *ListDataModelsFilter) (int64, error)

	GetDataModelName(ctx context.Context, workspaceID, id string) (string, error)

	GetDataModelWithID(ctx context.Context, id string) (*DataModel, error)

	GetDataModelWithName(ctx context.Context, workspaceID, name string) (*DataModel, error)

	ListDataModelHeaders(ctx context.Context, id, name, _type string) ([]string, error)
	ListEntityDataModelHeaders(ctx context.Context, id string) ([]string, error)

	ListEntityDataModelColumnsWithRowIDs(ctx context.Context, id string, headers []string, rowIDs []string) (map[string][]string, error)

	ListDataModelRows(ctx context.Context, id, _type string, pagination *utils.Pagination, order *utils.Order, filter *ListDataModelRowsFilter) ([][]string, int64, error)

	ListAllDataModelRowIDs(ctx context.Context, id, _type string) ([]string, error)
	CountDataModelRows(ctx context.Context, id, _type string, filter *ListDataModelRowsFilter) (int64, error)
}

type GetDataModelHandler

type GetDataModelHandler interface {
	Handle(ctx context.Context, query *GetDataModelQuery) (*DataModel, []string, error)
}

func NewGetDataModelHandler

func NewGetDataModelHandler(workspaceReadModel workspacequery.WorkspaceReadModel, dataModelReadModel DataModelReadModel) GetDataModelHandler

type GetDataModelQuery

type GetDataModelQuery struct {
	WorkspaceID string `validate:"required"`
	ID          string `validate:"required"`
}

type ListAllDataModelRowIDsHandler

type ListAllDataModelRowIDsHandler interface {
	Handle(ctx context.Context, query *ListAllDataModelRowIDsQuery) ([]string, error)
}

func NewListAllDataModelRowIDsHandler

func NewListAllDataModelRowIDsHandler(workspaceReadModel workspacequery.WorkspaceReadModel, dataModelReadModel DataModelReadModel) ListAllDataModelRowIDsHandler

type ListAllDataModelRowIDsQuery

type ListAllDataModelRowIDsQuery struct {
	WorkspaceID string `validate:"required"`
	ID          string `validate:"required"`
}

type ListDataModelRowsFilter

type ListDataModelRowsFilter struct {
	SearchWord string
	InSetIDs   []string
	RowIDs     []string
}

type ListDataModelRowsHandler

type ListDataModelRowsHandler interface {
	Handle(ctx context.Context, query *ListDataModelRowsQuery) ([]string, [][]string, int64, error)
}

func NewListDataModelRowsHandler

func NewListDataModelRowsHandler(workspaceReadModel workspacequery.WorkspaceReadModel, dataModelReadModel DataModelReadModel) ListDataModelRowsHandler

type ListDataModelRowsQuery

type ListDataModelRowsQuery struct {
	WorkspaceID string `validate:"required"`
	ID          string `validate:"required"`
	Pagination  *utils.Pagination
	Filter      *ListDataModelRowsFilter
}

type ListDataModelsFilter

type ListDataModelsFilter struct {
	Types      []string
	SearchWord string
	Exact      bool
	IDs        []string
}

type ListDataModelsHandler

type ListDataModelsHandler interface {
	Handle(ctx context.Context, query *ListDataModelsQuery) ([]*DataModel, error)
}

func NewListDataModelsHandler

func NewListDataModelsHandler(workspaceReadModel workspacequery.WorkspaceReadModel, dataModelReadModel DataModelReadModel) ListDataModelsHandler

type ListDataModelsQuery

type ListDataModelsQuery struct {
	WorkspaceID string `validate:"required"`
	Filter      *ListDataModelsFilter
}

type Queries

type Queries struct {
	GetDataModel           GetDataModelHandler
	ListDataModels         ListDataModelsHandler
	ListDataModelRows      ListDataModelRowsHandler
	ListAllDataModelRowIDs ListAllDataModelRowIDsHandler
}

func NewQueries

func NewQueries(workspaceReadModel workspacequery.WorkspaceReadModel, dataModelReadModel DataModelReadModel) *Queries

Jump to

Keyboard shortcuts

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