helpers

package
v1.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppURLs

func GetAppURLs(cfg *config.Config, logger log.Logger) (map[string]map[string]string, error)

GetAppURLs gets the edit and view urls for different file types from the target WOPI app (onlyoffice, collabora, etc) via their "/hosting/discovery" endpoint.

func HashResourceId

func HashResourceId(resourceId *providerv1beta1.ResourceId) string

HashResourceId builds a urlsafe and stable file reference that can be used for proxy routing, so that all sessions on one file end on the same office server

func RegisterAppProvider

func RegisterAppProvider(
	ctx context.Context,
	cfg *config.Config,
	logger log.Logger,
	gws pool.Selectable[gatewayv1beta1.GatewayAPIClient],
	appUrls map[string]map[string]string,
) error

RegisterAppProvider will register this service as app provider in REVA. The GatewayAPIClient is expected to be provided via `helpers.GetCS3apiClient`. The appUrls are expected to be provided via `helpers.GetAppURLs`

Note that this method doesn't provide a re-registration mechanism, so it will register the service once

func RegisterOpenCloudService

func RegisterOpenCloudService(ctx context.Context, cfg *config.Config, logger log.Logger) error

RegisterOpenCloudService will register this service. There are no explicit requirements for the context, and it will be passed without changes to the underlying RegisterService method.

Types

This section is empty.

Jump to

Keyboard shortcuts

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