api

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dashboard

func Dashboard(apiImplementation dashboardmodels.APIInterface, options dashboardmodels.APIOptions) error

func GetUserForRecipeId added in v0.9.9

func GetUserForRecipeId(userId string, recipeId string) (user dashboardmodels.UserType, recipe string)

This function tries to fetch a user for the given user id and recipe id. The input recipe id should be one of the primary recipes (emailpassword, thirdparty, passwordless) but the returned recipe will be the exact recipe that matched for the user (including thirdpartyemailpassword and thirdpartypasswordless).

When fetching a user we need to check for multiple recipes per input recipe id, for example a user created using email and password could be present for the EmailPassword recipe and the ThirdPartyEmailPassword recipe so we need to check for both.

If this function returns an empty user struct, it should be treated as if the user does not exist

func IsValidRecipeId added in v0.9.9

func IsValidRecipeId(recipeId string) bool

func MakeAPIImplementation

func MakeAPIImplementation() dashboardmodels.APIInterface

func UsersCountGet

func UsersCountGet(apiImplementation dashboardmodels.APIInterface, options dashboardmodels.APIOptions) (usersCountGetResponse, error)

func ValidateKey

func ValidateKey(apiImplementation dashboardmodels.APIInterface, options dashboardmodels.APIOptions) error

Types

type User added in v0.9.9

type User struct {
	Id          string                     `json:"id"`
	TimeJoined  float64                    `json:"timeJoined"`
	FirstName   string                     `json:"firstName,omitempty"`
	LastName    string                     `json:"lastName,omitempty"`
	Email       string                     `json:"email,omitempty"`
	PhoneNumber string                     `json:"phoneNumber,omitempty"`
	ThirdParty  dashboardmodels.ThirdParty `json:"thirdParty,omitempty"`
}

type Users added in v0.9.9

type Users struct {
	RecipeId string `json:"recipeId"`
	User     User   `json:"user"`
}

type UsersGetResponse added in v0.9.9

type UsersGetResponse struct {
	Status              string  `json:"status"`
	NextPaginationToken *string `json:"nextPaginationToken,omitempty"`
	Users               []Users `json:"users"`
}

func UsersGet

func UsersGet(apiImplementation dashboardmodels.APIInterface, options dashboardmodels.APIOptions) (UsersGetResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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