Documentation ¶
Index ¶
- type ApiServer
- func (s *ApiServer) CreateRoom(ctx context.Context, req *pb.CreateRoomRequest) (*pb.CreateRoomStatus, error)
- func (s *ApiServer) ListMessages(ctx context.Context, req *pb.ListMessagesRequest) (*pb.ListMessagesResponse, error)
- func (s *ApiServer) ListRooms(ctx context.Context, req *pb.ListRoomsRequest) (*pb.ListRoomsResponse, error)
- func (s *ApiServer) SendMessage(ctx context.Context, req *pb.MessageRequest) (*pb.MessageResponse, error)
- type AuthInterceptor
- type AuthServer
- func (s *AuthServer) Login(ctx context.Context, req *pb.LoginRequest) (*pb.TokenResponse, error)
- func (s *AuthServer) Refresh(ctx context.Context, req *pb.RefreshRequest) (*pb.TokenResponse, error)
- func (s *AuthServer) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.TokenResponse, error)
- type EndpointRoles
- type Endpoints
- type Env
- type MessageServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiServer ¶
type ApiServer struct { pb.UnimplementedApiServiceServer // contains filtered or unexported fields }
func NewApiServer ¶
func NewApiServer(jwtManager service.JWTManagerProtol, roomStore repository.RoomStore, messageStore repository.MessageStore, amqpManager service.AMQPProducer) *ApiServer
func (*ApiServer) CreateRoom ¶
func (s *ApiServer) CreateRoom(ctx context.Context, req *pb.CreateRoomRequest) (*pb.CreateRoomStatus, error)
func (*ApiServer) ListMessages ¶
func (s *ApiServer) ListMessages(ctx context.Context, req *pb.ListMessagesRequest) (*pb.ListMessagesResponse, error)
func (*ApiServer) ListRooms ¶
func (s *ApiServer) ListRooms(ctx context.Context, req *pb.ListRoomsRequest) (*pb.ListRoomsResponse, error)
func (*ApiServer) SendMessage ¶
func (s *ApiServer) SendMessage(ctx context.Context, req *pb.MessageRequest) (*pb.MessageResponse, error)
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
func NewAuthInterceptor ¶
func NewAuthInterceptor(jwtManager service.JWTManagerProtol, endpointRoles EndpointRoles) *AuthInterceptor
func (*AuthInterceptor) Stream ¶
func (i *AuthInterceptor) Stream() grpc.StreamServerInterceptor
func (*AuthInterceptor) Unary ¶
func (i *AuthInterceptor) Unary() grpc.UnaryServerInterceptor
type AuthServer ¶
type AuthServer struct { pb.UnimplementedAuthServiceServer // contains filtered or unexported fields }
func NewAuthServer ¶
func NewAuthServer(userStore repository.UserStore, refreshTokenStore repository.RefreshTokenStore, jwtManager service.JWTManagerProtol) *AuthServer
func (*AuthServer) Login ¶
func (s *AuthServer) Login(ctx context.Context, req *pb.LoginRequest) (*pb.TokenResponse, error)
func (*AuthServer) Refresh ¶
func (s *AuthServer) Refresh(ctx context.Context, req *pb.RefreshRequest) (*pb.TokenResponse, error)
func (*AuthServer) Register ¶
func (s *AuthServer) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.TokenResponse, error)
type EndpointRoles ¶
func NewEndpointRoles ¶
func NewEndpointRoles(endpoints *Endpoints) EndpointRoles
type Endpoints ¶
type Endpoints struct { ApiService apiServiceEndpoints AuthService authServiceEndpoints MessageService messageServiceEndpoints }
func NewEndpoints ¶
func NewEndpoints() *Endpoints
type Env ¶
type Env struct { API_HOST string MESSAGE_HOST string POSTGRES_DB string POSTGRES_USER string POSTGRES_PASSWORD string PGADMIN_DEFAULT_EMAIL string PGADMIN_DEFAULT_PASSWORD string PGADMIN_CONFIG_SERVER_MODE string JWT_SECRET string RABBITMQ_DEFAULT_USER string RABBITMQ_DEFAULT_PASS string JWT_DURATION_MIN int REFRESH_DURATION_DAYS int }
type MessageServer ¶
type MessageServer struct { pb.UnimplementedMessageServiceServer // contains filtered or unexported fields }
func NewMessageServer ¶
func NewMessageServer(jwtManager *service.JWTManager, sessionStore repository.SessionStore) *MessageServer
func (*MessageServer) GetMessages ¶
func (s *MessageServer) GetMessages(req *emptypb.Empty, srv pb.MessageService_GetMessagesServer) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.