server

package
v0.0.0-...-16561bc Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func NewServer

func NewServer(db *sql.DB) *Server

NewServer constructs the Server struct

func (*Server) AuthFuncOverride

func (s *Server) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)

AuthFuncOverride allows a given gRPC service implementation to override the global `JwtMiddleware`.

func (*Server) CreateTweet

func (s *Server) CreateTweet(ctx context.Context, request *proto.CreateTweetRequest) (*proto.CreateTweetResponse, error)

CreateTweet implements logic of creating new tweet

func (*Server) ListTweet

ListTweet implements logic of listing user's tweets

func (*Server) Login

func (s *Server) Login(_ context.Context, request *proto.LoginRequest) (*proto.LoginResponse, error)

Login implements logic of authentication

func (*Server) Register

func (s *Server) Register(_ context.Context, request *proto.RegisterRequest) (*proto.RegisterResponse, error)

Register implements logic of registration

func (*Server) Run

func (s *Server) Run(addr string) error

Run starts the grpc server

func (*Server) Subscribe

func (s *Server) Subscribe(ctx context.Context, request *proto.SubscribeRequest) (*proto.SubscribeResponse, error)

Subscribe implements logic of subscription

Jump to

Keyboard shortcuts

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