Documentation ¶
Index ¶
- Constants
- func AddDbServer(ctx context.Context, ref dto.ProjectRef, projDbServer models.ProjDbServer) error
- func AddRecords(projectID, datasetID, recordsetID string, _ []map[string]interface{}) error
- func AddRowsToRecordset(params RecordsetDataRequestParams, _ []RowValues) (numberOfRecords int, err error)
- func CreateBoard(ctx context.Context, ref dto.ProjectRef, board models.Board) (*models.Board, error)
- func CreateFolder(ctx context.Context, request dto.CreateFolder) (folder *models.Folder, err error)
- func CreateProject(ctx context.Context, request dto.CreateProjectRequest) (*models.ProjectSummary, error)
- func CreateQuery(ctx context.Context, request dto.CreateQuery) (*models.QueryDefWithFolderPath, error)
- func DeleteBoard(ctx context.Context, ref dto.ProjectItemRef) error
- func DeleteDbServer(ctx context.Context, ref dto.ProjectRef, dbServer models.ServerReference) (err error)
- func DeleteEntity(ctx context.Context, ref dto.ProjectItemRef) error
- func DeleteFolder(ctx context.Context, ref dto.ProjectItemRef) error
- func DeleteQuery(ctx context.Context, ref dto.ProjectItemRef) error
- func ExecuteCommands(storeID string, request execute.Request) (response execute.Response, err error)
- func ExecuteSelect(storeID string, selectRequest SelectRequest) (response execute.Response, err error)
- func GetAllEntities(ctx context.Context, ref dto.ProjectRef) (entity models.Entities, err error)
- func GetBoard(ctx context.Context, ref dto.ProjectItemRef) (*models.Board, error)
- func GetDatasetDefinition(ctx context.Context, ref dto2.ProjectItemRef) (dataset *models.RecordsetDefinition, err error)
- func GetDbServerSummary(ctx context.Context, ref dto.ProjectRef, dbServer models.ServerReference) (*models.ProjDbServerSummary, error)
- func GetEntity(ctx context.Context, ref dto.ProjectItemRef) (entity *models.Entity, err error)
- func GetEnvironmentSummary(ctx context.Context, ref dto.ProjectItemRef) (*models.EnvironmentSummary, error)
- func GetProjectFull(ctx context.Context, ref dto.ProjectRef) (*models.DatatugProject, error)
- func GetProjectSummary(ctx context.Context, ref dto.ProjectRef) (*models.ProjectSummary, error)
- func GetProjects(ctx context.Context, storeID string) ([]models.ProjectBrief, error)
- func GetQuery(ctx context.Context, ref dto.ProjectItemRef) (query *models.QueryDefWithFolderPath, err error)
- func GetRecordset(ctx context.Context, ref dto2.ProjectItemRef) (recordset *models.Recordset, err error)
- func GetRecordsetsSummary(ctx context.Context, ref dto2.ProjectRef) (*dto2.ProjRecordsetSummary, error)
- func GetServerDatabases(request dto.GetServerDatabasesRequest) (databases []*models.DbCatalog, err error)
- func RemoveRowsFromRecordset(params RecordsetDataRequestParams, rows []RowWithIndex) (numberOfRecords int, err error)
- func SaveBoard(ctx context.Context, ref dto.ProjectRef, board models.Board) (*models.Board, error)
- func SaveEntity(ctx context.Context, ref dto.ProjectRef, entity *models.Entity) error
- func UpdateDbSchema(ctx context.Context, projectLoader ProjectLoader, ...) (project *models.DatatugProject, err error)
- func UpdateDbServer(ctx context.Context, ref dto.ProjectRef, projDbServer models.ProjDbServer) error
- func UpdateQuery(ctx context.Context, request dto.UpdateQuery) (*models.QueryDefWithFolderPath, error)
- func UpdateRowsInRecordset(params RecordsetDataRequestParams, rows []RowWithIndexAndNewValues) (numberOfRecords int, err error)
- type AgentInfo
- type ProjectLoader
- type RecordsetDataRequestParams
- type RecordsetRequestParams
- type RowValues
- type RowWithIndex
- type RowWithIndexAndNewValues
- type SelectRequest
Constants ¶
const DataTugAgentVersion = "0.0.1"
DataTugAgentVersion specifies agent version
Variables ¶
This section is empty.
Functions ¶
func AddDbServer ¶
func AddDbServer(ctx context.Context, ref dto.ProjectRef, projDbServer models.ProjDbServer) error
AddDbServer adds db server to project
func AddRecords ¶
AddRecords adds record
func AddRowsToRecordset ¶
func AddRowsToRecordset(params RecordsetDataRequestParams, _ []RowValues) (numberOfRecords int, err error)
AddRowsToRecordset adds rows to a recordset
func CreateBoard ¶
func CreateBoard(ctx context.Context, ref dto.ProjectRef, board models.Board) (*models.Board, error)
CreateBoard creates board
func CreateFolder ¶
CreateFolder creates a new folder for queries
func CreateProject ¶
func CreateProject(ctx context.Context, request dto.CreateProjectRequest) (*models.ProjectSummary, error)
CreateProject create a new DataTug project using requested store
func CreateQuery ¶
func CreateQuery(ctx context.Context, request dto.CreateQuery) (*models.QueryDefWithFolderPath, error)
CreateQuery creates a new query
func DeleteBoard ¶
func DeleteBoard(ctx context.Context, ref dto.ProjectItemRef) error
DeleteBoard deletes board
func DeleteDbServer ¶
func DeleteDbServer(ctx context.Context, ref dto.ProjectRef, dbServer models.ServerReference) (err error)
DeleteDbServer adds db server to project
func DeleteEntity ¶
func DeleteEntity(ctx context.Context, ref dto.ProjectItemRef) error
DeleteEntity deletes board
func DeleteFolder ¶
func DeleteFolder(ctx context.Context, ref dto.ProjectItemRef) error
DeleteFolder deletes queries folder
func DeleteQuery ¶
func DeleteQuery(ctx context.Context, ref dto.ProjectItemRef) error
DeleteQuery deletes query
func ExecuteCommands ¶
func ExecuteCommands(storeID string, request execute.Request) (response execute.Response, err error)
ExecuteCommands executes command
func ExecuteSelect ¶
func ExecuteSelect(storeID string, selectRequest SelectRequest) (response execute.Response, err error)
ExecuteSelect executes select command
func GetAllEntities ¶
GetAllEntities returns all entities
func GetDatasetDefinition ¶
func GetDatasetDefinition(ctx context.Context, ref dto2.ProjectItemRef) (dataset *models.RecordsetDefinition, err error)
GetDatasetDefinition returns definition of a dataset by ID
func GetDbServerSummary ¶
func GetDbServerSummary(ctx context.Context, ref dto.ProjectRef, dbServer models.ServerReference) (*models.ProjDbServerSummary, error)
GetDbServerSummary returns summary on DB server
func GetEnvironmentSummary ¶
func GetEnvironmentSummary(ctx context.Context, ref dto.ProjectItemRef) (*models.EnvironmentSummary, error)
GetEnvironmentSummary returns environment summary
func GetProjectFull ¶
func GetProjectFull(ctx context.Context, ref dto.ProjectRef) (*models.DatatugProject, error)
GetProjectFull returns full project metadata
func GetProjectSummary ¶
func GetProjectSummary(ctx context.Context, ref dto.ProjectRef) (*models.ProjectSummary, error)
GetProjectSummary returns project summary
func GetProjects ¶
GetProjects return all projects
func GetQuery ¶
func GetQuery(ctx context.Context, ref dto.ProjectItemRef) (query *models.QueryDefWithFolderPath, err error)
GetQuery returns query definition
func GetRecordset ¶
func GetRecordset(ctx context.Context, ref dto2.ProjectItemRef) (recordset *models.Recordset, err error)
GetRecordset saves board
func GetRecordsetsSummary ¶
func GetRecordsetsSummary(ctx context.Context, ref dto2.ProjectRef) (*dto2.ProjRecordsetSummary, error)
GetRecordsetsSummary returns board by ID
func GetServerDatabases ¶
func GetServerDatabases(request dto.GetServerDatabasesRequest) (databases []*models.DbCatalog, err error)
GetServerDatabases returns list of databases hosted at a server
func RemoveRowsFromRecordset ¶
func RemoveRowsFromRecordset(params RecordsetDataRequestParams, rows []RowWithIndex) (numberOfRecords int, err error)
RemoveRowsFromRecordset removes rows from a recordset
func SaveEntity ¶
SaveEntity saves board
func UpdateDbSchema ¶
func UpdateDbSchema(ctx context.Context, projectLoader ProjectLoader, projectID, environment, driver, dbModelID string, dbConnParams dbconnection.Params) (project *models.DatatugProject, err error)
UpdateDbSchema updates DB schema
func UpdateDbServer ¶
func UpdateDbServer(ctx context.Context, ref dto.ProjectRef, projDbServer models.ProjDbServer) error
UpdateDbServer adds db server to project
func UpdateQuery ¶
func UpdateQuery(ctx context.Context, request dto.UpdateQuery) (*models.QueryDefWithFolderPath, error)
UpdateQuery updates existing query
func UpdateRowsInRecordset ¶
func UpdateRowsInRecordset(params RecordsetDataRequestParams, rows []RowWithIndexAndNewValues) (numberOfRecords int, err error)
UpdateRowsInRecordset updates rows in a recordset
Types ¶
type AgentInfo ¶
type AgentInfo struct { Version string `json:"version"` UptimeMinutes float64 `json:"uptimeMinutes"` }
AgentInfo holds agent info
type ProjectLoader ¶
type ProjectLoader interface { // Loads project summary LoadProjectSummary(ctx context.Context) (projectSummary models.ProjectSummary, err error) // Loads the whole project LoadProject(ctx context.Context) (project *models.DatatugProject, err error) }
ProjectLoader defines an interface to load project info
type RecordsetDataRequestParams ¶
type RecordsetDataRequestParams struct { RecordsetRequestParams Data string `json:"data"` }
RecordsetDataRequestParams is a set of common request parameters
func (RecordsetDataRequestParams) Validate ¶
func (v RecordsetDataRequestParams) Validate() error
Validate returns error if not valid
type RecordsetRequestParams ¶
type RecordsetRequestParams struct { Project string `json:"project"` Recordset string `json:"recordset"` }
RecordsetRequestParams is a set of common request parameters
func (RecordsetRequestParams) Validate ¶
func (v RecordsetRequestParams) Validate() error
Validate returns error if not valid
type RowWithIndex ¶
RowWithIndex points to specific row with expected values
func (RowWithIndex) Validate ¶
func (v RowWithIndex) Validate() error
Validate returns error if not valid
type RowWithIndexAndNewValues ¶
type RowWithIndexAndNewValues struct { RowWithIndex NewValues map[string]interface{} `json:"newValues"` }
RowWithIndexAndNewValues points to specific row with expected values and provides new set of named values
type SelectRequest ¶
type SelectRequest struct { Project string Environment string Database string From string SQL string Where string Limit int Columns []string Parameters []models.Parameter }
SelectRequest holds request data
func (SelectRequest) Validate ¶
func (v SelectRequest) Validate() error
Validate returns error if not valid