user

package
v0.0.0-...-0484061 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetUserSearch

func SetUserSearch(u UserSearcher)

Types

type User

type User struct {
	ID       string `json:"id" bson:"_id,omitempty"`
	Token    string `json:"token,omitempty"`
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
	Email    string `json:"email,omitempty"`
}

func Seach

func Seach(q string) ([]*User, error)

type UserSearcher

type UserSearcher interface {
	// Search user using "q" query (eg. Bob*) and returns list of users.
	Search(q string) ([]*User, error)
}

Jump to

Keyboard shortcuts

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