web

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey added in v1.6.0

func GenerateKey(URL string) string

func GetClusterDashName

func GetClusterDashName(shortName string) (string, error)

Convert cluster shortName into standard name format Ex. cluster01produseast1 becomes cluster01-prod-useast1

func HTTPCache added in v1.6.0

func HTTPCache(client *cache.Cache[string], appConfig *config.AppConfig, tags []string) echo.MiddlewareFunc

func Livez

func Livez(c echo.Context) error

Livez checks if the apiserver is up

func Metrics

func Metrics() echo.HandlerFunc

func NewRouter

func NewRouter() *echo.Echo

NewRouter func

func RateLimiter added in v1.0.0

func RateLimiter(appConfig *config.AppConfig) echo.MiddlewareFunc

RateLimiter returns a middleware.RateLimiterWithConfig

func Version

func Version(version string) echo.HandlerFunc

Version return an handler that returns the version of the app

Types

type Response added in v1.6.0

type Response struct {
	// Value is the cached response value.
	Value []byte

	// Header is the cached response header.
	Header http.Header
}

func StringToResponse added in v1.6.0

func StringToResponse(s string) Response

func (Response) String added in v1.6.0

func (r Response) String() string

type StatusSessions

type StatusSessions struct {
	SQS       *sqs.Config
	Db        database.Db
	AppConfig *config.AppConfig
	Metrics   monitoring.MetricsI
}

StatusSessions is used to keep the same objects and state for the database and sqs that are used for the rest of the calls inside the project

func (*StatusSessions) Readyz

func (s *StatusSessions) Readyz(c echo.Context) error

Readyz checks if the services that the apiserver uses are healthy

type Validator

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

Validator func

func NewValidator

func NewValidator() *Validator

NewValidator func

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Validate func

Directories

Path Synopsis
handler
v1
v2

Jump to

Keyboard shortcuts

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