status

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSourceChunksHandler

func GetSourceChunksHandler(
	db *gorm.DB,
	id string,
) ([]model.Chunk, *handler.Error)

GetSourceChunksHandler godoc @Summary Get all chunk details of a data source @Tags Data Source @Accept json @Produce json @Param id path string true "Source ID" @Success 200 {array} model.Chunk @Failure 500 {object} handler.HTTPError @Router /source/{id}/chunks [get]

func GetSourceItemsHandler

func GetSourceItemsHandler(
	db *gorm.DB,
	id string,
	chunkID string,
) ([]model.Item, *handler.Error)

GetSourceItemsHandler godoc @Summary Get all item details of a data source @Tags Data Source @Accept json @Produce json @Param id path string true "Source ID" @Param chunk_id query string false "Chunk ID" @Success 200 {array} model.Item @Failure 500 {object} handler.HTTPError @Router /source/{id}/items [get]

Types

type ChunksByState

type ChunksByState struct {
	Count int64           `json:"count"` // number of chunks in this state
	State model.WorkState `json:"state"` // the state of the chunks
}

type ItemSummary

type ItemSummary struct {
	NumOfItems int64 `json:"numOfItems"` // number of items in the source
}

type SourceStatusSummary

type SourceStatusSummary struct {
	ChunkSummary []ChunksByState `json:"chunkSummary"` // summary of the chunks
	ItemSummary  ItemSummary     `json:"itemSummary"`  // summary of the items
	Source       model.Source    `json:"source"`       // the source
}

func GetSourceSummaryHandler

func GetSourceSummaryHandler(
	db *gorm.DB,
	id string,
) (*SourceStatusSummary, *handler.Error)

GetSourceSummaryHandler godoc @Summary Get the data preparation summary of a data source @Tags Data Source @Accept json @Produce json @Param id path string true "Source ID" @Success 200 {object} ChunksByState @Failure 500 {object} handler.HTTPError @Router /source/{id}/summary [get]

Jump to

Keyboard shortcuts

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