Documentation ¶
Index ¶
- type Client
- type GrpcClient
- func (c *GrpcClient) AddReceipt(ctx context.Context, userId string, qr string) (statusMessage string, e error)
- func (c *GrpcClient) GetLoginLink(ctx context.Context, telegramId int) (string, error)
- func (c *GrpcClient) GetReceiptReport(ctx context.Context, userId string, qr string) ([]byte, string, error)
- func (c *GrpcClient) GetUser(ctx context.Context, telegramId int) (*User, error)
- func (c *GrpcClient) GetUsers(ctx context.Context) ([]User, error)
- func (c *GrpcClient) RegisterUser(ctx context.Context, telegramId int, phone string) error
- func (c *GrpcClient) VerifyPhone(ctx context.Context, telegramId int, code string) error
- type User
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 is service client for backend.
func (Client) AddReceipt ¶
AddReceipt adds receipt for user.
func (Client) GetLoginLink ¶
GetLoginLink returns URL for automatic login.
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
func NewGrpcClient ¶
func NewGrpcClient(backendUrl string, creds credentials.TransportCredentials) *GrpcClient
NewGrpcClient creates instance of grpcClient.
func (*GrpcClient) AddReceipt ¶
func (c *GrpcClient) AddReceipt(ctx context.Context, userId string, qr string) (statusMessage string, e error)
AddReceipt adds new receipt by bar code.
func (*GrpcClient) GetLoginLink ¶
GetLoginLink returns link to login for telegram user.
func (*GrpcClient) GetReceiptReport ¶
func (c *GrpcClient) GetReceiptReport(ctx context.Context, userId string, qr string) ([]byte, string, error)
GetReceiptReport return receipt details as file.
func (*GrpcClient) GetUsers ¶
func (c *GrpcClient) GetUsers(ctx context.Context) ([]User, error)
GetUsers returns all users.
func (*GrpcClient) RegisterUser ¶
func (*GrpcClient) VerifyPhone ¶
Click to show internal directories.
Click to hide internal directories.