helpers

package
v0.0.0-...-ebba861 Latest Latest
Warning

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

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

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