nextcloud

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNextcloudServerMock

func GetNextcloudServerMock(called *[]string) http.Handler

GetNextcloudServerMock returns a handler that pretends to be a remote Nextcloud server

func New

func New(m map[string]interface{}) (user.Manager, error)

New returns a user manager implementation that reads a json file to provide user metadata.

func NewUserManager

func NewUserManager(c *UserManagerConfig, hc *http.Client) (user.Manager, error)

NewUserManager returns a new Nextcloud-based UserManager

func TestingHTTPClient

func TestingHTTPClient(handler http.Handler) (*http.Client, func())

TestingHTTPClient thanks to https://itnext.io/how-to-stub-requests-to-remote-hosts-with-go-6c2c1db32bf2 Ideally, this function would live in tests/helpers, but if we put it there, it gets excluded by .dockerignore, and the Docker build fails (see https://github.com/cs3org/reva/issues/1999) So putting it here for now - open to suggestions if someone knows a better way to inject this.

Types

type Action

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

Action describes a REST request to forward to the Nextcloud backend

type Response

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

Response contains data for the Nextcloud mock server to respond and to switch to a new server state

type UserManagerConfig

type UserManagerConfig struct {
	EndPoint string `mapstructure:"endpoint" docs:";The Nextcloud backend endpoint for user management"`
}

UserManagerConfig contains config for a Nextcloud-based UserManager

Jump to

Keyboard shortcuts

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