client

package
v0.0.0-...-8b05c01 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreditCardServer

type CreditCardServer struct {
	creditpb.UnimplementedCreditCardServiceServer
	DB *gorm.DB
}

CreditCardServer - the grpc server of credit cards

func (*CreditCardServer) CreateCreditCard

func (cs *CreditCardServer) CreateCreditCard(ctx context.Context,
	in *creditpb.CreditCard) (*creditpb.CreditCard, error)

CreateCreditCard - the gRPC service that is used to create credit cards

func (*CreditCardServer) CreateCreditCardApplication

func (cs *CreditCardServer) CreateCreditCardApplication(ctx context.Context,
	in *creditpb.CreditCardApplication) (*creditpb.CreditCardApplication, error)

CreateCreditCardApplication - the service that creates the credit card application with models.CreditCardApplication and returns a creditpb.CreditCardApplication as a response

func (*CreditCardServer) CreditCards

CreditCards - the service that gets a list of credit cards by interacting with models.CreditCards and returns a creditpb.ListCreditCards as a response

func (*CreditCardServer) GetCreditCardApplicationByName

func (cs *CreditCardServer) GetCreditCardApplicationByName(ctx context.Context,
	in *creditpb.CreditCardApplication) (*creditpb.CreditCardApplication, error)

GetCreditCardApplicationByName - the service that gets the credit card from models.CreditCardApplication and returns a creditpb.CreditCardApplication as a response

func (*CreditCardServer) GetCreditCardByUserName

func (cs *CreditCardServer) GetCreditCardByUserName(ctx context.Context,
	in *creditpb.CreditCard) (*creditpb.CreditCard, error)

GetCreditCardByUserName - the service that gets the credit card by userName with models.CreditCards and returns a creditpb.CreditCard as a response

type UserServer

type UserServer struct {
	userpb.UnimplementedUserServiceServer
	DB *gorm.DB
}

UserServer - the grpc server of users

func (*UserServer) CreateUser

func (us *UserServer) CreateUser(ctx context.Context, in *userpb.User) (*userpb.User, error)

CreateUser - the service that creates a user in the Users table and returns userpb.User

func (*UserServer) DeleteUser

func (us *UserServer) DeleteUser(ctx context.Context, in *userpb.User) (*userpb.Message, error)

DeleteUser - the service that deletes a user by its name in the Users table and returns userpb.User

func (*UserServer) GetUserByID

func (us *UserServer) GetUserByID(ctx context.Context, in *userpb.User) (*userpb.User, error)

GetUserByID - the service that gets the user by ID in the Users table and returns userpb.User

func (*UserServer) GetUserByName

func (us *UserServer) GetUserByName(ctx context.Context, in *userpb.User) (*userpb.User, error)

GetUserByName - the service that gets the user by name in the Users table and returns userpb.User

func (*UserServer) ListUsers

func (us *UserServer) ListUsers(ctx context.Context, in *userpb.User) (*userpb.ListUser, error)

ListUsers - the service that lists the users in the Users table and returns userpb.User

func (*UserServer) SayHello

func (us *UserServer) SayHello(ctx context.Context, in *userpb.User) (*userpb.Message, error)

SayHello - the service that prints a given name in the output

func (*UserServer) UpdateUserByID

func (us *UserServer) UpdateUserByID(ctx context.Context, in *userpb.User) (*userpb.User, error)

UpdateUserByID - the service that updates a user by its ID in the Users table and returns userpb.User

func (*UserServer) UpdateUserByName

func (us *UserServer) UpdateUserByName(ctx context.Context, in *userpb.User) (*userpb.User, error)

UpdateUserByName - the service that updates a user by its name in the Users table and returns userpb.User

Jump to

Keyboard shortcuts

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