web

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLink(f lib.File, dat map[string]interface{}, cfg TServContext, t *testing.T, isShare, reqPreview bool)

func DavHandler added in v0.8.6

func DavHandler(fb *lib.FileBrowser)

func Handler

func Handler(m *fb.FileBrowser) http.Handler

Handler returns a function compatible with web.HandleFunc.

func ProcessParams added in v0.8.3

func ProcessParams(c *fb.Context) (isShares bool)

set router, and all other params to the context, returns true in case request are about shares

func ServeDav added in v0.8.3

func ServeDav(c *lib.Context, w http.ResponseWriter, r *http.Request)

ServeHTTP determines if the request is for this plugin, and if all prerequisites are met.

func SetupHandler added in v0.8.6

func SetupHandler(cfg *config.GlobalConfig) http.Handler

func ValidateListingResp added in v0.8.6

func ValidateListingResp(rs *http.Response, t *testing.T, count int) *lib.File

Types

type Claims added in v0.8.6

type Claims struct {
	fb.UserModel
	jwt.StandardClaims
}

claims is the JWT claims.

type ModifyRequest added in v0.8.6

type ModifyRequest struct {
	What  string `json:"what"`  // Answer to: what data type?
	Which string `json:"which"` // Answer to: which field?
}

type ModifyUserRequest added in v0.8.6

type ModifyUserRequest struct {
	ModifyRequest
	Data *fb.UserModel `json:"data"`
}

type TServContext added in v0.8.6

type TServContext struct {
	*config.TContext
}

func (*TServContext) BuildUrl added in v0.8.6

func (tc *TServContext) BuildUrl(r int, params map[string]interface{}, isShare bool) *url.URL

func (*TServContext) InitServ added in v0.8.6

func (tc *TServContext) InitServ(t *testing.T)

run internal server for testing and set specific variables at TContext

func (*TServContext) MakeRequest added in v0.8.6

func (tc *TServContext) MakeRequest(r int, params map[string]interface{}, usr *config.UserConfig, t *testing.T, isShare bool) (*http.Request, *http.Response, *http.Transport)
func (tc *TServContext) ValidateDownloadLink(l string, t *testing.T) bool

Jump to

Keyboard shortcuts

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