server

package
v0.0.0-...-78d802f Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) *grpc.Server

Types

type Config

type Config struct {
	// Need to add additional services as needed, such as an auth service
	Logger     *log.Logger
	Store      store.Store
	CacheStore store.CacheStore
	JWTService *jwt.Service
}

Config contains what we want to pass to each handler, including db, cache, etc...

type Server

type Server struct {
	*Config
	pb.UnimplementedAuthenticateServer
}

Server is the base grpc server

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, in *pb.DeleteRequest) (*pb.DeleteResponse, error)

func (*Server) Login

func (s *Server) Login(ctx context.Context, in *pb.LoginRequest) (*pb.TokenResponse, error)

func (*Server) Logout

func (s *Server) Logout(ctx context.Context, in *pb.LogoutRequest) (*pb.LogoutResponse, error)

func (*Server) Refresh

func (s *Server) Refresh(ctx context.Context, in *pb.RefreshTokenRequest) (*pb.TokenResponse, error)

func (*Server) Register

func (s *Server) Register(ctx context.Context, in *pb.RegisterRequest) (*pb.RegisterResponse, error)

Jump to

Keyboard shortcuts

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