server

package
v1.0.1 Latest Latest
Warning

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

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

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

func (i *Implementation) DeleteIncidentUpdate(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
	incidentUpdateOrder apiServerDefinition.IncidentUpdateOrderPathParameter,
) error

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

func (i *Implementation) GetComponent(
	ctx echo.Context,
	componentID apiServerDefinition.ComponentIdPathParameter,
	params apiServerDefinition.GetComponentParams,
) error

GetComponent retrieves a specific component by ID.

func (*Implementation) GetComponents

func (i *Implementation) GetComponents(ctx echo.Context, params apiServerDefinition.GetComponentsParams) error

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

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

GetIncident retrieves a specific incident by ID.

func (*Implementation) GetIncidentUpdate

func (i *Implementation) GetIncidentUpdate(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
	incidentUpdateOrder apiServerDefinition.IncidentUpdateOrderPathParameter,
) error

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

func (i *Implementation) GetIncidents(ctx echo.Context, params apiServerDefinition.GetIncidentsParams) error

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

func (i *Implementation) UpdateIncidentUpdate(
	ctx echo.Context,
	incidentID apiServerDefinition.IncidentIdPathParameter,
	incidentUpdateOrder apiServerDefinition.IncidentUpdateOrderPathParameter,
) error

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