common

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorHandler emperror.Handler

Log is a logrus.FieldLogger nolint: gochecknoglobals

Functions

func ARKMiddleware

func ARKMiddleware(db *gorm.DB, logger logrus.FieldLogger) gin.HandlerFunc

ARKMiddleware is a middleware for initializing a CommonCluster and an ARKService from the request parameters for later use

func ErrorResponse

func ErrorResponse(c *gin.Context, err error)

ErrorResponse aborts the http request with a JSON error response with a status code and error

func GetARKService

func GetARKService(req *http.Request) *ark.Service

GetARKService return the current ark.Service model

func GetBucketLocation

func GetBucketLocation(cloud string, bucketName string, secretId string, organizationID uint, logger logrus.FieldLogger) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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