Documentation ¶
Index ¶
- func New(config *Config) *grpc.Server
- type Config
- type Server
- func (s *Server) Delete(ctx context.Context, in *pb.DeleteRequest) (*pb.DeleteResponse, error)
- func (s *Server) Login(ctx context.Context, in *pb.LoginRequest) (*pb.TokenResponse, error)
- func (s *Server) Logout(ctx context.Context, in *pb.LogoutRequest) (*pb.LogoutResponse, error)
- func (s *Server) Refresh(ctx context.Context, in *pb.RefreshTokenRequest) (*pb.TokenResponse, error)
- func (s *Server) Register(ctx context.Context, in *pb.RegisterRequest) (*pb.RegisterResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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)
Click to show internal directories.
Click to hide internal directories.