consolebff

package
v0.0.0-...-6591273 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package consolebff provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.3 DO NOT EDIT.

Index

Constants

View Source
const EventTypeCompliant = "compliant"

EventTypeCompliant when a rule is evaluated compliant on an asset

View Source
const EventTypeCreateOrUpdate = "createOrUpdate"

EventTypeCreateOrUpdate when an asset is created or updated

View Source
const EventTypeDeadline = "deadline"

EventTypeDeadline when the freshness SLO threshold is reached

View Source
const EventTypeDelete = "delete"

EventTypeDelete when an asset is deleted

View Source
const EventTypeExport = "export"

EventTypeExport a scheduled export is launched

View Source
const EventTypeNotCompliant = "notCompliant"

EventTypeNotCompliant when a rule is evaluated not compliant on an asset

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Env

type Env struct {
	KConfiguration string `envconfig:"k_configuration"`
	KRevision      string `envconfig:"k_revision"`
	KService       string `envconfig:"k_service"`
}

Env list environment variables

type Global

type Global struct {
	CommonEv glo.CommonEntryValues
	// contains filtered or unexported fields
}

Global structure for global variables to optimize the performances in serverless mode

type Handler

type Handler struct{}

Handler handle

func NewHandler

func NewHandler() *Handler

NewHandler initiate a new handler

func (*Handler) V1GetAssetTimeline

func (h *Handler) V1GetAssetTimeline(ctx echo.Context, date string, dayCount int, params models.V1GetAssetTimelineParams) error

V1GetAssetTimeline get an asset timeline

func (*Handler) V1ListAssetNames

func (h *Handler) V1ListAssetNames(ctx echo.Context, date string, dayCount int, params models.V1ListAssetNamesParams) error

V1ListAssetNames List assetnames

type ServerInterface

type ServerInterface interface {
	// v1ListAssetNames
	// (GET /consolebff/v1/assetnames/{date}/days/{dayCount})
	V1ListAssetNames(ctx echo.Context, date EndDate, dayCount DayCount, params V1ListAssetNamesParams) error
	// v1GetAssetTimeline
	// (GET /consolebff/v1/timelines/{date}/days/{dayCount}/asset)
	V1GetAssetTimeline(ctx echo.Context, date EndDate, dayCount DayCount, params V1GetAssetTimelineParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) V1GetAssetTimeline

func (w *ServerInterfaceWrapper) V1GetAssetTimeline(ctx echo.Context) error

V1GetAssetTimeline converts echo context to params.

func (*ServerInterfaceWrapper) V1ListAssetNames

func (w *ServerInterfaceWrapper) V1ListAssetNames(ctx echo.Context) error

V1ListAssetNames converts echo context to params.

type ServiceEnv

type ServiceEnv struct {
	Environment                     string `envconfig:"environment" default:"dev"`
	DataSetName                     string `envconfig:"dataset_name" default:"ram"`
	DeadlineRealtimeDefaultSeconds  int    `envconfig:"deadline_realtime_default_seconds" default:"327"`
	DeadlineScheduledDefaultSeconds int    `envconfig:"deadline_scheduled_default_seconds" default:"926"`
	DeadlinePodsDefaultSeconds      int    `envconfig:"deadline_pods_default_seconds" default:"2621"`
	LogOnlySeveritylevels           string `envconfig:"log_only_severity_levels" default:"WARNING NOTICE CRITICAL"`
	ProjectID                       string `envconfig:"project_id" required:"true"`
	StartProfiler                   bool   `envconfig:"start_profiler" default:"false"`
	TableNameAssets                 string `envconfig:"table_name_assets" default:"assets"`
	TableNameComplianceStatus       string `envconfig:"table_name_compliance_status" default:"complianceStatus"`
}

ServiceEnv list environment variables prefixed with the name of the microservice

Directories

Path Synopsis
Package models provides primitives to interact with the openapi HTTP API.
Package models provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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