protobuf

package
v0.0.0-...-32a768c Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogInterceptor

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

---------------------------------------------------------------------------------------------------------------------- Middleware ----------------------------------------------------------------------------------------------------------------------

Types

type MongoItem

type MongoItem struct {
	ID primitive.ObjectID `json:"_id" bson:"_id"`
}

type Server

type Server struct {
	Port     string
	DbClient *mongo.Client
}

=========================================================

gRPC server init functions

=========================================================

func (*Server) Create

func (o *Server) Create(ctx context.Context, in *CreateUserRequest) (*CreateUserResponse, error)

---------------------------------------------------------------------------------------------------------------------- Create ----------------------------------------------------------------------------------------------------------------------

func (*Server) DbConnect

func (o *Server) DbConnect() error

---------------------------------------------------------------------------------------------------------------------- Подключение/Отключение к БД ----------------------------------------------------------------------------------------------------------------------

func (*Server) DbDisconnect

func (o *Server) DbDisconnect()

func (*Server) Delete

func (o *Server) Delete(ctx context.Context, in *DeleteUserRequest) (*DeleteUserResponse, error)

---------------------------------------------------------------------------------------------------------------------- Delete ----------------------------------------------------------------------------------------------------------------------

func (*Server) Find

func (o *Server) Find(ctx context.Context, in *FindUserRequest) (*FindUserResponse, error)

---------------------------------------------------------------------------------------------------------------------- Find ----------------------------------------------------------------------------------------------------------------------

func (*Server) Get

func (o *Server) Get(ctx context.Context, in *GetUserRequest) (*GetUserResponse, error)

---------------------------------------------------------------------------------------------------------------------- Get ----------------------------------------------------------------------------------------------------------------------

func (*Server) LogOut

func (o *Server) LogOut(ctx context.Context, in *LogOutRequest) (*LogOutResponse, error)

---------------------------------------------------------------------------------------------------------------------- LogOut ----------------------------------------------------------------------------------------------------------------------

func (*Server) SignIn

func (o *Server) SignIn(ctx context.Context, in *SignInRequest) (*SignInResponse, error)

---------------------------------------------------------------------------------------------------------------------- SignIn ----------------------------------------------------------------------------------------------------------------------

func (*Server) SignUp

func (o *Server) SignUp(ctx context.Context, in *SignUpRequest) (*SignUpResponse, error)

---------------------------------------------------------------------------------------------------------------------- SignUp ----------------------------------------------------------------------------------------------------------------------

func (*Server) Update

func (o *Server) Update(ctx context.Context, in *UpdateUserRequest) (*UpdateUserResponse, error)

---------------------------------------------------------------------------------------------------------------------- Update ----------------------------------------------------------------------------------------------------------------------

Jump to

Keyboard shortcuts

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