server

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: AGPL-3.0 Imports: 18 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 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 Options

type Options struct {
	Auth AuthOptions
}

Options holds the server options

func (*Options) Init

func (o *Options) Init()

type PipelineRow

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

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