grpcserver

package
v0.0.0-...-ae3587a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcServer

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

GrpcServer represents the gRPC Server containing the db connection and port

func NewGrpcServer

func NewGrpcServer(grpcPort string, userNamesWriter *kafka.Writer, s3Config *config.S3Config, imageUploadBucket string, postgresConfig *config.PostgresConfig, esHosts []string, recognitionServiceAddress string) *GrpcServer

NewGrpcServer returns initilized gRPC Server

func (*GrpcServer) DataPointCountForUserId

func (s *GrpcServer) DataPointCountForUserId(ctx context.Context, request *proto.UserIdRequest) (*proto.UserDataPointCount, error)

DataPointCountForUserId counts all tables for the given user id

func (*GrpcServer) FindCitiesForUserId

func (s *GrpcServer) FindCitiesForUserId(ctx context.Context, request *proto.UserIdRequest) (*proto.FoundCities, error)

FindCitiesForUserId in elasticsearch

func (*GrpcServer) GetAllUsersLikeUsername

func (s *GrpcServer) GetAllUsersLikeUsername(_ context.Context, username *proto.UserNameRequest) (*proto.UserSearchResponse, error)

GetAllUsersLikeUsername returns a List of users that are like the given username

func (*GrpcServer) GetInstaPostsWithUserId

func (s *GrpcServer) GetInstaPostsWithUserId(_ context.Context, request *proto.UserIdRequest) (*proto.InstaPostsResponse, error)

GetInstaPostsWithUserId returns all Instagram Posts of a User

func (*GrpcServer) GetTaggedPostsWithUserId

func (s *GrpcServer) GetTaggedPostsWithUserId(_ context.Context, request *proto.UserIdRequest) (*proto.InstaPostsResponse, error)

GetTaggedPostsWithUserId returns all Posts the given User is tagged on

func (*GrpcServer) GetUserWithUserId

func (s *GrpcServer) GetUserWithUserId(_ context.Context, username *proto.UserIdRequest) (*proto.User, error)

GetUserWithUserId returns one User with the given username

func (*GrpcServer) GetUserWithUsername

func (s *GrpcServer) GetUserWithUsername(_ context.Context, username *proto.UserNameRequest) (*proto.User, error)

GetUserWithUsername returns one User that equals the given username

func (*GrpcServer) Listen

func (s *GrpcServer) Listen()

Listen blocks, while listening for grpc requests on the port specified in the GrpcServer struct

func (*GrpcServer) SearchSimilarFaces

func (s *GrpcServer) SearchSimilarFaces(ctx context.Context, request *proto.FaceSearchRequest) (*proto.FaceSearchResponse, error)

SearchSimilarFaces to the given base64 encoded image

func (*GrpcServer) SearchUsersWithWeightedPosts

func (s *GrpcServer) SearchUsersWithWeightedPosts(ctx context.Context, weightedPosts *proto.WeightedPosts) (*proto.WeightedUsers, error)

SearchUsersWithWeightedPosts searches for users by their occurence in posts, taking the weights into account

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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