helper

package
v0.0.0-...-495e01f Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiServePackageFile

func ApiServePackageFile(ctx *context.APIContext, s io.ReadSeekCloser, u *url.URL, pf *packages_model.PackageFile, forceOpts ...*context.ServeHeaderOptions)

Serves the content of the package file If the url is set it will redirect the request, otherwise the content is copied to the response.

func LogAndProcessError

func LogAndProcessError(ctx *context.Context, status int, obj any, cb func(string))

LogAndProcessError logs an error and calls a custom callback with the processed error message. If the error is an InternalServerError the message is stripped if the user is not an admin.

func ServePackageFile

func ServePackageFile(ctx *context.Context, s io.ReadSeekCloser, u *url.URL, pf *packages_model.PackageFile, forceOpts ...*context.ServeHeaderOptions)

Serves the content of the package file If the url is set it will redirect the request, otherwise the content is copied to the response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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