auth

package
v0.0.0-...-8d07d21 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirebaseAppWrapper

type FirebaseAppWrapper struct {
	App *firebase.App
}

FirebaseAppWrapper is for injecting the firebase functionality in the client

type FirebaseInteraction

type FirebaseInteraction interface {
}

FirebaseInteraction controls interaction with firebase

type MongoDBClientWrapper

type MongoDBClientWrapper struct {
	Client *mongo.Client
}

MongoDBClientWrapper is for injecting the mongoDB functionality in the client

func (*MongoDBClientWrapper) Count

func (c *MongoDBClientWrapper) Count(ctx context.Context, field, value string) (int64, error)

Count counts the records having the field - value pair

type MongoDBInteraction

type MongoDBInteraction interface {
	Count(ctx context.Context, field string, value string) (int64, error)
}

MongoDBInteraction controls interaction with mongoDB

type Server

type Server struct {
	FirebaseApp FirebaseInteraction
	MongoClient MongoDBInteraction
	AuthClient  *auth.Client
}

Server is struct for the auth grpc server

func (*Server) CheckUserState

func (s *Server) CheckUserState(ctx context.Context, req *pb.Empty) (*pb.CheckStateResponse, error)

CheckUserState is the rpc to check whether the user has been init

func (*Server) CheckUsernameAvailability

CheckUsernameAvailability is the rpc to check the username

Jump to

Keyboard shortcuts

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