gin

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAnalysisHandler

func AddAnalysisHandler(db AnalysisGetterSetter) gin.HandlerFunc

func AddPlatformHandler

func AddPlatformHandler(db PlatformSetter) gin.HandlerFunc

func AddRunHandler

func AddRunHandler(db RunSetter) gin.HandlerFunc

func AddRunQcHandler

func AddRunQcHandler(db RunQCGetterSetter) gin.HandlerFunc

func AddRunSampleSheetHandler added in v0.3.0

func AddRunSampleSheetHandler(db SampleSheetSetter) gin.HandlerFunc

func AddSampleHandler added in v0.3.0

func AddSampleHandler(db SampleSetter) gin.HandlerFunc

func AddSampleSheetHandler

func AddSampleSheetHandler(db SampleSheetSetter) func(*gin.Context)

func AllRunQcHandler added in v0.3.0

func AllRunQcHandler(db RunQCGetter) gin.HandlerFunc

func AnalysesHandler

func AnalysesHandler(db AnalysisGetter) gin.HandlerFunc

func AnalysisHandler

func AnalysisHandler(db AnalysisGetter) gin.HandlerFunc

func ApiIndexHandler

func ApiIndexHandler(c *gin.Context, routes []gin.RouteInfo)

func DashboardHandler

func DashboardHandler(db *mongo.DB) gin.HandlerFunc

func DashboardQCHandler

func DashboardQCHandler(db *mongo.DB) gin.HandlerFunc

func DashboardRunHandler

func DashboardRunHandler(db *mongo.DB) gin.HandlerFunc

func DashboardRunTable

func DashboardRunTable(db *mongo.DB) gin.HandlerFunc

func GetPlatformHandler

func GetPlatformHandler(db PlatformGetter) gin.HandlerFunc

func GlobalChartsHandler

func GlobalChartsHandler(db *mongo.DB) gin.HandlerFunc

func LoadHTMLFS

func LoadHTMLFS(e *gin.Engine, fs fs.FS, patterns ...string)

func N

func N(start, end int) chan int

func NewRouter

func NewRouter(db *mongo.DB, debug bool) http.Handler

func PlatformsHandler

func PlatformsHandler(db PlatformGetter) gin.HandlerFunc

func RunChartsHandler

func RunChartsHandler(db RunQCGetter) gin.HandlerFunc

func RunHandler

func RunHandler(db RunGetter) gin.HandlerFunc

func RunQcHandler

func RunQcHandler(db RunQCGetter) gin.HandlerFunc

func RunSampleSheetHandler added in v0.3.0

func RunSampleSheetHandler(db SampleSheetGetter) gin.HandlerFunc

func RunsHandler

func RunsHandler(db RunGetter) gin.HandlerFunc

func SampleHandler added in v0.3.0

func SampleHandler(db SampleGetter) gin.HandlerFunc

func SampleSheetHandler

func SampleSheetHandler(db SampleSheetGetter) func(*gin.Context)

func SamplesHandler added in v0.3.0

func SamplesHandler(db SampleGetter) gin.HandlerFunc

func UpdateAnalysisHandler

func UpdateAnalysisHandler(db AnalysisSetter) gin.HandlerFunc

func UpdateRunPathHandler

func UpdateRunPathHandler(db RunSetter) gin.HandlerFunc

func UpdateRunStateHandler

func UpdateRunStateHandler(db RunSetter) gin.HandlerFunc

Types

type APIDocs

type APIDocs struct {
	BaseURL   string     `yaml:"base_url"`
	Sections  []Section  `yaml:"sections"`
	Endpoints []Endpoint `yaml:"endpoints"`
}

func ParseAPIDocs

func ParseAPIDocs(doc []byte) (*APIDocs, error)

type AnalysisGetter added in v0.3.0

type AnalysisGetter interface {
	Analyses(string) ([]*cleve.Analysis, error)
	Analysis(string, string) (*cleve.Analysis, error)
}

Interface for reading analyses from the database.

type AnalysisGetterSetter added in v0.3.0

type AnalysisGetterSetter interface {
	AnalysisGetter
	AnalysisSetter
}

Interface for both getting and storing/updating analyses.

type AnalysisSetter added in v0.3.0

type AnalysisSetter interface {
	CreateAnalysis(string, *cleve.Analysis) error
	SetAnalysisState(string, string, cleve.RunState) error
	SetAnalysisSummary(string, string, *cleve.AnalysisSummary) error
}

Interface for storing/updating analyses in the database.

type ChartConfig

type ChartConfig struct {
	ChartType string
	ChartData string
}

func GetChartConfig

func GetChartConfig(c *gin.Context) ChartConfig

func (ChartConfig) UrlParams

func (c ChartConfig) UrlParams() string

type Endpoint

type Endpoint struct {
	Method      string        `yaml:"method"`
	Path        string        `yaml:"path"`
	Description template.HTML `yaml:"description"`
	Section     string        `yaml:"section"`
	Params      []Param       `yaml:"params"`
	QueryParams []QueryParam  `yaml:"query_params"`
	Headers     []Param       `yaml:"headers"`
}

type Param

type Param struct {
	Key         string        `yaml:"key"`
	Description template.HTML `yaml:"description"`
	Type        string        `yaml:"type"`
	Default     string        `yaml:"default"`
	Required    bool          `yaml:"required"`
	Examples    []string      `yaml:"examples"`
}

type PlatformGetter added in v0.3.0

type PlatformGetter interface {
	Platform(string) (*cleve.Platform, error)
	Platforms() ([]*cleve.Platform, error)
}

Interface for reading platform information from the database.

type PlatformSetter added in v0.3.0

type PlatformSetter interface {
	CreatePlatform(*cleve.Platform) error
}

Interface for storing platforms in the database.

type QueryParam

type QueryParam struct {
	Key         string        `yaml:"key"`
	Description template.HTML `yaml:"description"`
	Type        string        `yaml:"type"`
	Multiple    bool          `yaml:"multiple"`
}

type RunChartConfig

type RunChartConfig struct {
	ChartType string
	XData     string
	YData     string
	ColorBy   string
}

func GetRunChartConfig

func GetRunChartConfig(c *gin.Context) RunChartConfig

func (RunChartConfig) UrlParams

func (c RunChartConfig) UrlParams() string

type RunGetter added in v0.3.0

type RunGetter interface {
	Run(string, bool) (*cleve.Run, error)
	Runs(cleve.RunFilter) (cleve.RunResult, error)
}

Interface for reading runs from the database.

type RunQCGetter added in v0.3.0

type RunQCGetter interface {
	Runs(cleve.RunFilter) (cleve.RunResult, error)
	RunQC(string) (*cleve.InteropQC, error)
	RunQCs(cleve.QcFilter) (cleve.QcResult, error)
}

Interface for reading run QC data from the database.

type RunQCGetterSetter added in v0.3.0

type RunQCGetterSetter interface {
	RunQCGetter
	RunQCSetter
}

Interface for both getting and storing run QC data.

type RunQCSetter added in v0.3.0

type RunQCSetter interface {
	Run(string, bool) (*cleve.Run, error)
	CreateRunQC(string, *cleve.InteropQC) error
}

Interface for storing run QC data in the database.

type RunSetter added in v0.3.0

type RunSetter interface {
	CreateRun(*cleve.Run) error
	CreateSampleSheet(cleve.SampleSheet, ...mongo.SampleSheetOption) (*cleve.UpdateResult, error)
	SetRunState(string, cleve.RunState) error
	SetRunPath(string, string) error
}

Interface for storing/updating runs in the database.

type SampleGetter added in v0.3.0

type SampleGetter interface {
	Sample(string) (*cleve.Sample, error)
	Samples(filter *cleve.SampleFilter) (*cleve.SampleResult, error)
}

Interface for reading samples from the database.

type SampleSetter added in v0.3.0

type SampleSetter interface {
	CreateSample(*cleve.Sample) error
	CreateSamples([]*cleve.Sample) error
}

Interface for storing/updating samples in the database.

type SampleSheetGetter added in v0.3.0

type SampleSheetGetter interface {
	SampleSheet(...mongo.SampleSheetOption) (cleve.SampleSheet, error)
}

Interface for reading samplesheets from the database.

type SampleSheetSetter added in v0.3.0

type SampleSheetSetter interface {
	CreateSampleSheet(cleve.SampleSheet, ...mongo.SampleSheetOption) (*cleve.UpdateResult, error)
}

Interface for storing samplesheets in the database.

type Section

type Section struct {
	Name        string        `yaml:"name"`
	Description template.HTML `yaml:"description"`
}

Jump to

Keyboard shortcuts

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