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

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