gapi

package
v0.0.0-...-31933a3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcLogger

func GrpcLogger(ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (resp interface{}, err error)

func HttpLogger

func HttpLogger(handler http.Handler) http.Handler

Types

type Metadata

type Metadata struct {
	UserAgent string
	ClientIP  string
}

type RepsonseRecorder

type RepsonseRecorder struct {
	http.ResponseWriter
	StatusCode int
	Body       []byte
}

func (*RepsonseRecorder) Write

func (rec *RepsonseRecorder) Write(body []byte) (int, error)

func (*RepsonseRecorder) WriteHeader

func (rec *RepsonseRecorder) WriteHeader(statusCode int)

type Server

type Server struct {
	pb.UnimplementedSimpleBankServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config util.Config, store db.Store, taskDistributor worker.TaskDistributor) (*Server, error)

func (*Server) CreateAccount

func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRequest) (*pb.CreateAccountResponse, error)

func (*Server) CreateTransfer

func (server *Server) CreateTransfer(ctx context.Context, req *pb.CreateTransferRequest) (*pb.CreateTransferResponse, error)

func (*Server) CreateUser

func (server *Server) CreateUser(ctx context.Context, req *pb.CreatUserRequest) (*pb.CreatUserResponse, error)

func (*Server) ListAccounts

func (server *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)

func (*Server) LoginUser

func (server *Server) LoginUser(ctx context.Context, req *pb.LoginRequest) (*pb.LoginResponse, error)

func (*Server) UpdateUser

func (server *Server) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) (*pb.UpdateUserResponse, error)

func (*Server) VerifyEmails

func (server *Server) VerifyEmails(ctx context.Context, req *pb.VerifyEmailsRequest) (*pb.VerifyEmailsResponse, error)

Jump to

Keyboard shortcuts

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