server

package
v0.0.0-...-f5427db Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Function to Start the Server

Types

type CryptoServiceServer

type CryptoServiceServer struct {
	pb.UnimplementedCryptoServiceServer
	// contains filtered or unexported fields
}

Struc to store the Server Instance

var Instance *CryptoServiceServer

func NewCryptoServiceServer

func NewCryptoServiceServer() *CryptoServiceServer

Function to return the Server Instance

func (*CryptoServiceServer) CreateNewCrypto

func (server *CryptoServiceServer) CreateNewCrypto(ctx context.Context, request *pb.CreateNewCryptoRequest) (*pb.CreateNewCryptoResponse, error)

Function to Insert a new Cryptocurrency in the database

func (*CryptoServiceServer) DeleteCrypto

func (server *CryptoServiceServer) DeleteCrypto(ctx context.Context, request *pb.DeleteCryptoRequest) (*pb.EmptyResponse, error)

Function to Delete a Cryptocurrency from the database

func (*CryptoServiceServer) DownvoteCrypto

func (server *CryptoServiceServer) DownvoteCrypto(ctx context.Context, request *pb.DownvoteCryptoRequest) (*pb.EmptyResponse, error)

Function to Subtract a Vote to Given Crypto

func (*CryptoServiceServer) GetCryptoById

func (server *CryptoServiceServer) GetCryptoById(ctx context.Context, request *pb.GetCryptoByIdRequest) (*pb.GetCryptoByIdResponse, error)

Function to Find a Crypto By Its ID

func (*CryptoServiceServer) ListCryptos

func (server *CryptoServiceServer) ListCryptos(ctx context.Context, request *pb.ListCryptosRequest) (*pb.ListCryptosResponse, error)

Funct to Retrieve a Crypto List

func (*CryptoServiceServer) ObserveCrypto

func (server *CryptoServiceServer) ObserveCrypto(request *pb.ObserveCryptoRequest, streaming pb.CryptoService_ObserveCryptoServer) error

Function to Stream a Crypto

func (*CryptoServiceServer) Run

func (server *CryptoServiceServer) Run() error

Function to Register the Started Server

func (*CryptoServiceServer) UpdateCrypto

func (server *CryptoServiceServer) UpdateCrypto(ctx context.Context, request *pb.UpdateCryptoRequest) (*pb.UpdateCryptoResponse, error)

Function to Update a Crypto

func (*CryptoServiceServer) UpvoteCrypto

func (server *CryptoServiceServer) UpvoteCrypto(ctx context.Context, request *pb.UpvoteCryptoRequest) (*pb.EmptyResponse, error)

Function to Add a Vote to Given Crypto

Jump to

Keyboard shortcuts

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