Version: v0.0.0-...-2c2f346 Latest Latest

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0




View Source
const NON_EXISTENT_ACCOUNT_ID uint32 = 10000


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

func NewClient

func NewClient(conn *grpc.ClientConn, timeout time.Duration) *Client

NewClient instantiates a new instance of the service's client

func (*Client) ArchiveAccount

func (c *Client) ArchiveAccount(ctx context.Context, accountId uint32) error

ArchiveAccount archives an account

func (*Client) AuthenticateAccount

func (c *Client) AuthenticateAccount(ctx context.Context, email, password string) (string, error)

AuthenticateAccount attempts to authenticate an account via the auto generate grpc client

func (*Client) CreateAccount

func (c *Client) CreateAccount(ctx context.Context, email, password string) (uint32, error)

CreateAccount creates an account via the grpc client

func (*Client) GetAccount

func (c *Client) GetAccount(ctx context.Context, accountId uint32) (*proto.Account, error)

GetAccount obtains an account from the authentication service by account Id

func (*Client) LockAccount

func (c *Client) LockAccount(ctx context.Context, accountId uint32) error

LockAccount locks an account

func (*Client) LogoutAccount

func (c *Client) LogoutAccount(ctx context.Context, accountId uint32) error

LogoutAccount logs out an account

func (*Client) UnlockAccount

func (c *Client) UnlockAccount(ctx context.Context, accountId uint32) error

UnlockAccount unlocks an account

func (*Client) UpdateAccount

func (c *Client) UpdateAccount(ctx context.Context, accountId uint32, email string) error

UpdateAccount updates an account

Jump to

Keyboard shortcuts

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