Documentation
¶
Index ¶
- func About(c *gin.Context)
- func CreatePipelineReport(c *gin.Context)
- func DeleteConfigCondition(c *gin.Context)
- func DeleteConfigSource(c *gin.Context)
- func DeleteConfigTarget(c *gin.Context)
- func DeletePipelineReport(c *gin.Context)
- func GetPipelineReportByID(c *gin.Context)
- func Landing(c *gin.Context)
- func ListConfigConditions(c *gin.Context)
- func ListConfigSources(c *gin.Context)
- func ListConfigTargets(c *gin.Context)
- func ListPipelineReports(c *gin.Context)
- func ListSCMs(c *gin.Context)
- func Ping(c *gin.Context)
- func SearchConfigConditions(c *gin.Context)
- func SearchConfigKinds(c *gin.Context)
- func SearchConfigSources(c *gin.Context)
- func SearchConfigTargets(c *gin.Context)
- func SearchPipelineReports(c *gin.Context)
- func UpdatePipelineReport(c *gin.Context)
- type AboutResponseModel
- type AuthOptions
- type ConditionConfigResponse
- type ConfigKindResponse
- type CreatePipelineReportResponse
- type CustomClaims
- type DefaultResponseModel
- type FindSCMSummaryResponse
- type GetPipelineReportByIDResponse
- type GetPipelineReportsResponse
- type ListSCMsResponse
- type Options
- type Server
- type SourceConfigResponse
- type TargetConfigResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func About ¶
About returns the version information of the API. @Summary About the API @Description Get version information of the API @Tags About @Success 200 {object} AboutResponseModel
func CreatePipelineReport ¶
CreatePipelineReport insert a new report into the database @Summary Create a new pipeline report @Description Create a new pipeline report in the database @Tags Pipeline Reports @Accept json @Produce json @Success 201 {object} CreatePipelineReportResponse @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/reports [post]
func DeleteConfigCondition ¶ added in v0.9.0
DeleteConfigCondition deletes a resource configuration from the database. @Summary Delete a configuration condition @Description Delete a configuration condition from the database @Tags Configuration Conditions @Param id query string true "ID of the configuration condition to delete" @Success 200 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/conditions [delete]
func DeleteConfigSource ¶ added in v0.9.0
DeleteConfigSource deletes a resource configuration from the database. @Summary Delete a configuration source @Description Delete a configuration source from the database @Tags Configuration Sources @Param id query string true "ID of the configuration source to delete" @Success 200 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/sources [delete]
func DeleteConfigTarget ¶ added in v0.9.0
DeleteConfigTarget deletes a resource configuration from the database. @Summary Delete a configuration target @Description Delete a configuration target from the database @Tags Configuration Targets @Param id query string true "ID of the configuration target to delete" @Success 200 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/targets [delete]
func DeletePipelineReport ¶
DeletePipelineReport removes a pipeline report from the database @Summary Delete a pipeline report @Description Delete a pipeline report from the database @Tags Pipeline Reports @Param id path string true "Report ID" @Success 201 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/reports/{id} [delete]
func GetPipelineReportByID ¶ added in v0.9.0
GetPipelineReportByID returns the latest pipeline report for a specific ID @Summary Get a pipeline report by ID @Description Get the latest pipeline report for a specific ID @Tags Pipeline Reports @Param id path string true "Report ID" @Success 201 {object} GetPipelineReportByIDResponse @Failure 404 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/reports/{id} [get]
func Landing ¶
Landing is the landing page handler. @Summary Landing page @Description Landing page of the API @Tags Landing @Success 200 @Router /api/ [get]
func ListConfigConditions ¶ added in v0.9.0
ListConfigConditions returns condition configurations from the database. @Summary List all configuration conditions @Description List all configuration conditions from the database @Tags Configuration Conditions @Param id query string false "ID of the configuration condition" @Param kind query string false "Kind of the configuration condition" @Param config query string false "Configuration of the condition" @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Success 200 {object} ConditionConfigResponse @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/conditions [get]
func ListConfigSources ¶ added in v0.9.0
ListConfigSources returns a resource configuration from the database. @Summary List all configuration sources @Description List all configuration sources from the database @Tags Configuration Sources @Param id query string false "ID of the configuration source" @Param kind query string false "Kind of the configuration source" @Param config query string false "Configuration of the source" @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Success 200 {object} SourceConfigResponse @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/sources [get]
func ListConfigTargets ¶ added in v0.9.0
ListConfigTargets returns target configurations from the database. @Summary List all target configurations. @Description List all configuration targets from the database @Tags Configuration Targets @Param id query string false "ID of the configuration target" @Param kind query string false "Kind of the configuration target" @Param config query string false "Configuration of the target" @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Success 200 {object} TargetConfigResponse @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/targets [get]
func ListPipelineReports ¶ added in v0.9.0
ListPipelineReports returns all pipeline reports from the database @Summary List all pipeline reports @Description List all pipeline reports from the database @Tags Pipeline Reports @Param scmid query string false "SCM ID" @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Success 200 {object} GetPipelineReportsResponse @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/reports [get]
func ListSCMs ¶ added in v0.9.0
ListSCMs returns a list of SCMs from the database. @Summary List SCMs @Description List SCMs data from the database @Tags SCMs @Param scmid query string false "ID of the SCM" @Param url query string false "URL of the SCM" @Param branch query string false "Branch of the SCM" @Param summary query bool false "Return a summary of the SCMs" @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Success 200 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/scms [get]
func Ping ¶
Ping is a simple endpoint to check if the server is running. @Summary Ping the API @Description Ping the API to check if it's running @Tags Ping @Success 200 {object} DefaultResponseModel @Router /api/ping [get]
func SearchConfigConditions ¶ added in v0.9.0
SearchConfigConditions returns condition configurations from the database. @Summary Search configuration conditions @Description Search for configuration conditions in the database @Tags Configuration Conditions @Accept json @Produce json @Success 200 {object} ConditionConfigResponse @Failure 400 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/conditions/search [post]
func SearchConfigKinds ¶ added in v0.9.0
SearchConfigKinds returns a resource configuration from the database. @Summary Search configuration by kind @Description Search for configuration by kind in the database @Tags Configuration @Accept json @Produce json @Success 200 {object} ConfigKindResponse @Failure 400 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/kinds [post]
func SearchConfigSources ¶ added in v0.9.0
SearchConfigSources returns a resource configuration from the database. @Summary Search configuration sources @Description Search for configuration sources in the database @Tags Configuration Sources @Accept json @Produce json @Success 200 {object} SourceConfigResponse @Failure 400 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/sources/search [post]
func SearchConfigTargets ¶ added in v0.9.0
SearchConfigTargets returns target configurations from the database. @Summary Search configuration targets @Description Search for configuration targets in the database @Tags Configuration Targets @Accept json @Produce json @Success 200 {object} TargetConfigResponse @Failure 400 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/config/targets/search [post]
func SearchPipelineReports ¶ added in v0.9.0
SearchPipelineReports returns all pipeline reports from the database using advanced filtering @Summary Search pipeline reports @Description Search pipeline reports in the database using advanced filtering @Param limit query string false "Limit the number of reports returned, default is 100" @Param page query string false "Page number for pagination, default is 1" @Tags Pipeline Reports @Accept json @Produce json @Success 200 {object} GetPipelineReportsResponse @Failure 400 {object} DefaultResponseModel @Failure 500 {object} DefaultResponseModel @Router /api/pipeline/reports/search [post]
func UpdatePipelineReport ¶
UpdatePipelineReport updates a pipeline report in the database Note: This endpoint is not supported yet. @Summary Update a pipeline report @Description Update a pipeline report in the database. Please note that this endpoint is not supported yet. @Tags Pipeline Reports @Param id path string true "Report ID" @Accept json @Produce json @Success 200 {object} DefaultResponseModel @Router /api/pipeline/reports/{id} [put]
Types ¶
type AboutResponseModel ¶ added in v0.9.0
type AuthOptions ¶
type AuthOptions struct {
// The issuer of our token.
Issuer string
// The audience of our token.
Audience []string
// Mode enable auth0 authentication
Mode string
}
func (*AuthOptions) Init ¶
func (a *AuthOptions) Init()
type ConditionConfigResponse ¶ added in v0.9.0
type ConditionConfigResponse struct {
// Configs is a list of configuration conditions.
Configs []model.ConfigCondition `json:"configs"`
// TotalCount is the total number of conditions for pagination.
TotalCount int `json:"total_count"`
}
ConditionConfigResponse represents a response containing configuration conditions.
type ConfigKindResponse ¶ added in v0.9.0
type ConfigKindResponse struct {
Data []string `json:"data"`
}
ConfigKindResponse represents a response containing configuration kinds.
type CreatePipelineReportResponse ¶ added in v0.9.0
type CustomClaims ¶
type CustomClaims struct {
Name string `json:"name"`
Username string `json:"username"`
ShouldReject bool `json:"shouldReject,omitempty"`
}
CustomClaims contains custom data we want from the jwt token.
type DefaultResponseModel ¶ added in v0.9.0
type FindSCMSummaryResponse ¶ added in v0.9.0
type FindSCMSummaryResponse struct {
TotalCount int `json:"total_count"`
Data map[string]database.SCMBranchDataset `json:"data"`
}
FindSCMSummaryResponse represents the response for the FindSCMSummary endpoint.
type GetPipelineReportByIDResponse ¶ added in v0.9.0
type GetPipelineReportByIDResponse struct {
Message string `json:"message"`
Data model.PipelineReport `json:"data"`
NBReportsByID int `json:"nbReportsByID"`
LatestReportByID model.PipelineReport `json:"latestReportByID"`
}
type GetPipelineReportsResponse ¶ added in v0.9.0
type GetPipelineReportsResponse struct {
Data []database.SearchLatestReportData `json:"data"`
TotalCount int `json:"total_count"`
}
type ListSCMsResponse ¶ added in v0.9.0
type ListSCMsResponse struct {
// SCMs is a list of SCMs.
SCMs []model.SCM `json:"scms"`
// TotalCount is the total number of SCMs matching the query.
TotalCount int `json:"total_count"`
}
ListSCMsResponse represents the response for the ListSCMs endpoint.
type Options ¶
type Options struct {
Auth AuthOptions
DryRun bool
}
Options holds the server options
type SourceConfigResponse ¶ added in v0.9.0
type SourceConfigResponse struct {
// Configs is a list of configuration sources.
Configs []model.ConfigSource `json:"configs"`
// TotalCount is the total number of sources for pagination.
TotalCount int `json:"total_count"`
}
SourceConfigResponse represents a response containing configuration sources.
type TargetConfigResponse ¶ added in v0.9.0
type TargetConfigResponse struct {
// Configs is a list of configuration targets.
Configs []model.ConfigTarget `json:"configs"`
// TotalCount is the total number of targets for pagination.
TotalCount int `json:"total_count"`
}
TargetConfigResponse represents a response containing configuration targets.