rpc

package
v0.0.0-...-dd08621 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func HTTPLogger

func HTTPLogger(handler http.Handler) http.Handler

Types

type Metadata

type Metadata struct {
	UserAgent string
	ClientIP  string
}

type ResponseRecorder

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

func (*ResponseRecorder) Write

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

func (*ResponseRecorder) WriteHeader

func (rec *ResponseRecorder) WriteHeader(statusCode int)

type Server

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

func New

func New(config *config.Config, userQ userrepo.Store) (*Server, error)

func (*Server) CreateUser

func (*Server) LoginUser

func (server *Server) LoginUser(
	ctx context.Context,
	req *vulcanv1.LoginUserRequest,
) (*vulcanv1.LoginUserResponse, error)

func (*Server) UpdateUser

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

Jump to

Keyboard shortcuts

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