client

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client act as our model

func NewClient

func NewClient(url string) (*Client, error)

NewClient creates a new client instance

func (*Client) Close

func (c *Client) Close()

Close closes connection pool

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, ID string) (bool, error)

DeleteUser ...

func (*Client) GetAllUsers

func (c *Client) GetAllUsers(ctx context.Context, ID string) ([]domain.User, error)

GetAllUsers ...

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, ID string) (*domain.User, error)

GetUser ...

func (*Client) GetUserByEmailAddress

func (c *Client) GetUserByEmailAddress(ctx context.Context, email string) (*domain.User, error)

GetUserByEmailAddress ...

func (*Client) GetUserByUserName

func (c *Client) GetUserByUserName(ctx context.Context, username string) (*domain.User, error)

GetUserByUserName ...

func (*Client) LoginUser

func (c *Client) LoginUser(ctx context.Context, username, password string) (*pb.UserLoginResponse, error)

LoginUser used to login a user

func (*Client) RegisterUser

func (c *Client) RegisterUser(ctx context.Context, username, password, firstname, lastname, email, gender string) (string, error)

RegisterUser used to register a user

Jump to

Keyboard shortcuts

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