server

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func About

func About(c *gin.Context)

func CreatePipelineReport

func CreatePipelineReport(c *gin.Context)

CreatePipelineReport insert a new report into the database

func DeletePipelineReport

func DeletePipelineReport(c *gin.Context)

DeletePipelineReport removes a pipeline report from the database

func FindAllPipelineReports

func FindAllPipelineReports(c *gin.Context)

FindAllPipelineReports returns all pipeline reports from the database

func FindPipelineReportByID

func FindPipelineReportByID(c *gin.Context)

FindPipelineReportByID returns the latest pipeline report for a specific ID

func FindSCM added in v0.5.0

func FindSCM(c *gin.Context)

func FindSCMSummary added in v0.6.0

func FindSCMSummary(c *gin.Context, scmRows []DatabaseSCMRow)

FindSCMSummary returns a summary of all git repositories detected.

func Landing

func Landing(c *gin.Context)

func Ping

func Ping(c *gin.Context)

func UpdatePipelineReport

func UpdatePipelineReport(c *gin.Context)

Types

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 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.

func (*CustomClaims) Validate

func (c *CustomClaims) Validate(ctx context.Context) error

Validate errors out if `ShouldReject` is true.

type DatabaseSCMRow added in v0.5.0

type DatabaseSCMRow struct {
	ID         uuid.UUID
	Branch     string
	URL        string
	Created_at time.Time
	Updated_at time.Time
}

DatabaseSCMRow represents a specific scm configuration from the database.

type Options

type Options struct {
	Auth   AuthOptions
	DryRun bool
}

Options holds the server options

func (*Options) Init

func (o *Options) Init()

type PipelineReportRow added in v0.5.0

type PipelineReportRow struct {
	ID         uuid.UUID
	Pipeline   reports.Report
	Created_at time.Time
	Updated_at time.Time
}

PipelineReportRow represents a specific pipeline report from the database.

type Server

type Server struct {
	Options Options
}

func (*Server) Run

func (s *Server) Run()

Jump to

Keyboard shortcuts

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