userutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeUserID

func MakeUserID(localpart string, server gomatrixserverlib.ServerName) string

MakeUserID generates user ID from localpart & server name

func ParseUsernameParam

func ParseUsernameParam(usernameParam string, expectedServerName *gomatrixserverlib.ServerName) (string, error)

ParseUsernameParam extracts localpart from usernameParam. usernameParam can either be a user ID or just the localpart/username. If serverName is passed, it is verified against the domain obtained from usernameParam (if present) Returns error in case of invalid usernameParam.

Types

This section is empty.

Jump to

Keyboard shortcuts

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