server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidPhaseGeneration means the given generation is invalid.
	// This can be seen as 400 - Bad request.
	ErrInvalidPhaseGeneration = errors.New("invalid phase generation")

	// ErrPhaseGenerationNotFound means the given generation was not found.
	// this can be seen as 404 - Not found.
	ErrPhaseGenerationNotFound = errors.New("phase generation not found")
)

Functions

This section is empty.

Types

type Implementation

type Implementation struct {
	// contains filtered or unexported fields
}

Implementation holds all functions definded by the [api.ServerInterface] and other needed components.

func New

func New(dbCon *gorm.DB, logger *zerolog.Logger) *Implementation

New creates a new Implementation Object with the setted dbCon.

func (*Implementation) CreateComponent

func (i *Implementation) CreateComponent(ctx echo.Context) error

CreateComponent handles creation of components.

func (*Implementation) CreateImpactType

func (i *Implementation) CreateImpactType(ctx echo.Context) error

CreateImpactType handles creation of impact types.

func (*Implementation) CreateIncident

func (i *Implementation) CreateIncident(ctx echo.Context) error

CreateIncident handles creation of incidents.

func (*Implementation) CreateIncidentUpdate

func (i *Implementation) CreateIncidentUpdate(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
) error

CreateIncidentUpdate handles updates to an update for one incident.

func (*Implementation) CreatePhaseList

func (i *Implementation) CreatePhaseList(ctx echo.Context) error

CreatePhaseList handles creation of phase lists.

func (*Implementation) CreateSeverity

func (i *Implementation) CreateSeverity(ctx echo.Context) error

CreateSeverity handles creation of severities.

func (*Implementation) DeleteComponent

func (i *Implementation) DeleteComponent(
	ctx echo.Context,
	componentID apiServerDefinition.ComponentIdPathParameter,
) error

DeleteComponent handles deletion of components.

func (*Implementation) DeleteImpactType

func (i *Implementation) DeleteImpactType(
	ctx echo.Context,
	impactTypeID apiServerDefinition.ImpactTypeIdPathParameter,
) error

DeleteImpactType handles deletion of impact types.

func (*Implementation) DeleteIncident

func (i *Implementation) DeleteIncident(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
) error

DeleteIncident handles deletion of incidents.

func (*Implementation) DeleteIncidentUpdate

DeleteIncidentUpdate handles deletion of an update for one incident.

func (*Implementation) DeleteSeverity

func (i *Implementation) DeleteSeverity(
	ctx echo.Context,
	severityName apiServerDefinition.SeverityNamePathParameter,
) error

DeleteSeverity handles deletion of severities.

func (*Implementation) GetComponent

GetComponent retrieves a specific component by ID.

func (*Implementation) GetComponents

GetComponents retrieves a list of all components.

func (*Implementation) GetImpactType

func (i *Implementation) GetImpactType(
	ctx echo.Context,
	impactTypeID apiServerDefinition.ImpactTypeIdPathParameter,
) error

GetImpactType retrieves a specific impact type by ID.

func (*Implementation) GetImpactTypes

func (i *Implementation) GetImpactTypes(ctx echo.Context) error

GetImpactTypes retrieves a list of all impact types.

func (*Implementation) GetIncident

GetIncident retrieves a specific incident by ID.

func (*Implementation) GetIncidentUpdate

GetIncidentUpdate retrieves a specific update for one incident.

func (*Implementation) GetIncidentUpdates

func (i *Implementation) GetIncidentUpdates(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
) error

GetIncidentUpdates retrieves a list of all updates for one incident.

func (*Implementation) GetIncidents

GetIncidents retrieves a list of all active incidents between a start and end.

func (*Implementation) GetPhaseList

func (i *Implementation) GetPhaseList(
	ctx echo.Context,
	params apiServerDefinition.GetPhaseListParams,
) error

GetPhaseList retrieves a list of all phases.

func (*Implementation) GetSeverities

func (i *Implementation) GetSeverities(ctx echo.Context) error

GetSeverities retrieves a list of all severities.

func (*Implementation) GetSeverity

func (i *Implementation) GetSeverity(
	ctx echo.Context,
	severityName apiServerDefinition.SeverityNamePathParameter,
) error

GetSeverity retrieves a specific incident by it's name.

func (*Implementation) UpdateComponent

func (i *Implementation) UpdateComponent(
	ctx echo.Context,
	componentID apiServerDefinition.ComponentIdPathParameter,
) error

UpdateComponent handles updates of components.

func (*Implementation) UpdateImpactType

func (i *Implementation) UpdateImpactType(
	ctx echo.Context,
	impactTypeID apiServerDefinition.ImpactTypeIdPathParameter,
) error

UpdateImpactType handles updates of impact types.

func (*Implementation) UpdateIncident

func (i *Implementation) UpdateIncident(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
) error

UpdateIncident handles updates of incidents.

func (*Implementation) UpdateIncidentUpdate

UpdateIncidentUpdate handles updates of updates for one incident.

func (*Implementation) UpdateSeverity

func (i *Implementation) UpdateSeverity(
	ctx echo.Context,
	severityName apiServerDefinition.SeverityNamePathParameter,
) error

UpdateSeverity handles updates of severities.

Jump to

Keyboard shortcuts

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