user

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAPI added in v1.2.0

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

UserAPI - A representation of the user namespace for the MTGJSON API

func New

func New(baseUrl string, client *client.HTTPClient) *UserAPI

New Create a new instance of the UserAPI struct

func (*UserAPI) BaseURL added in v1.2.0

func (api *UserAPI) BaseURL() string

BaseURL - Returns the baseUrl with its associating endpoint attached to it, used for making HTTP requests

func (*UserAPI) Client added in v1.2.0

func (api *UserAPI) Client() *client.HTTPClient

Client - Returns a pointer to the client.HTTPClient structure that is used for HTTP requests

func (*UserAPI) DeactivateUser added in v1.2.0

func (api *UserAPI) DeactivateUser(email string) (*apiModels.APIResponse, error)

DeactivateUser Completely removes the requested user account, both from Auth0 and from MongoDB

func (*UserAPI) GetUser added in v1.2.0

func (api *UserAPI) GetUser(email string) (*userModel.User, error)

GetUser Fetch a user based on their email address. Returns ErrNoUser if the user cannot be found and ErrInvalidEmail if an empty string or invalid email address is passed in the parameter

Jump to

Keyboard shortcuts

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