server

package
v0.0.0-...-16b7ef6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountServiceServer

func NewAccountServiceServer(db *dgo.Dgraph) pb.AccountServiceServer

NewAccountServiceServer create instance of AccountService

func NewInterestServiceServer

func NewInterestServiceServer(db *dgo.Dgraph) pb.InterestServiceServer

NewInterestServiceServer create instance of InterestService

func NewPlaceServiceServer

func NewPlaceServiceServer(db *dgo.Dgraph) pb.PlaceServiceServer

NewPlaceServiceServer create instance of PlaceService

Types

type AccountService

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

AccountService implements the pb AccountServiceServer interface

func (*AccountService) CreateAccount

func (a *AccountService) CreateAccount(context.Context, *pb.Account) (*pb.Account, error)

CreateAccount used to create new user account

func (*AccountService) DeleteAccount

func (a *AccountService) DeleteAccount(context.Context, *pb.AccountRequest) (*empty.Empty, error)

DeleteAccount used to delete user account

func (*AccountService) GetAccount

GetAccount used to get single account

func (*AccountService) UpdateAccount

func (a *AccountService) UpdateAccount(context.Context, *pb.Account) (*pb.AccountResponse, error)

UpdateAccount used to update user account info

type AuthService

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

AuthService implement AuthServiceServer

func NewAuthService

func NewAuthService(db *dgo.Dgraph) *AuthService

NewAuthService returns *AuthService

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)

Login credentials are stored in dgraph username and hashed password.

type InterestService

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

InterestService implements the pb InterestServiceServer interface

func (*InterestService) AddInterest

func (i *InterestService) AddInterest(context.Context, *pb.Interest) (*pb.Interest, error)

AddInterest adds new Interest

func (*InterestService) GetInterest

func (i *InterestService) GetInterest(ctx context.Context, req *pb.InterestRequest) (*pb.Interest, error)

GetInterest specified Interest

func (*InterestService) GetInterests

func (i *InterestService) GetInterests(empty *empty.Empty, stream pb.InterestService_GetInterestsServer) error

GetInterests stream available Interests

func (*InterestService) Removeinterest

func (i *InterestService) Removeinterest(context.Context, *pb.InterestRequest) (*empty.Empty, error)

Removeinterest specified Interest

func (*InterestService) UpdateInterest

UpdateInterest update specified Interest

type PlaceService

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

PlaceService implements the pb PlaceServiceServer interface

func (*PlaceService) AddPlace

func (p *PlaceService) AddPlace(context.Context, *pb.Place) (*pb.Place, error)

AddPlace adds new place

func (*PlaceService) DeletePlace

func (p *PlaceService) DeletePlace(context.Context, *pb.PlaceRequest) (*empty.Empty, error)

DeletePlace delete specified place

func (*PlaceService) GetPlace

func (p *PlaceService) GetPlace(context.Context, *pb.PlaceRequest) (*pb.Place, error)

GetPlace return info about specified place

func (*PlaceService) GetPlaces

GetPlaces stream available places

func (*PlaceService) UpdatePlace

func (p *PlaceService) UpdatePlace(context.Context, *pb.Place) (*pb.Place, error)

UpdatePlace update info about specified place

Jump to

Keyboard shortcuts

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