Documentation ¶
Index ¶
- func NewAccountServiceServer(db *dgo.Dgraph) pb.AccountServiceServer
- func NewInterestServiceServer(db *dgo.Dgraph) pb.InterestServiceServer
- func NewPlaceServiceServer(db *dgo.Dgraph) pb.PlaceServiceServer
- type AccountService
- func (a *AccountService) CreateAccount(context.Context, *pb.Account) (*pb.Account, error)
- func (a *AccountService) DeleteAccount(context.Context, *pb.AccountRequest) (*empty.Empty, error)
- func (a *AccountService) GetAccount(context.Context, *pb.AccountRequest) (*pb.Account, error)
- func (a *AccountService) UpdateAccount(context.Context, *pb.Account) (*pb.AccountResponse, error)
- type AuthService
- type InterestService
- func (i *InterestService) AddInterest(context.Context, *pb.Interest) (*pb.Interest, error)
- func (i *InterestService) GetInterest(ctx context.Context, req *pb.InterestRequest) (*pb.Interest, error)
- func (i *InterestService) GetInterests(empty *empty.Empty, stream pb.InterestService_GetInterestsServer) error
- func (i *InterestService) Removeinterest(context.Context, *pb.InterestRequest) (*empty.Empty, error)
- func (i *InterestService) UpdateInterest(context.Context, *pb.Interest) (*pb.InterestResponse, error)
- type PlaceService
- func (p *PlaceService) AddPlace(context.Context, *pb.Place) (*pb.Place, error)
- func (p *PlaceService) DeletePlace(context.Context, *pb.PlaceRequest) (*empty.Empty, error)
- func (p *PlaceService) GetPlace(context.Context, *pb.PlaceRequest) (*pb.Place, error)
- func (p *PlaceService) GetPlaces(*empty.Empty, pb.PlaceService_GetPlacesServer) error
- func (p *PlaceService) UpdatePlace(context.Context, *pb.Place) (*pb.Place, error)
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 ¶
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 ¶
func (a *AccountService) GetAccount(context.Context, *pb.AccountRequest) (*pb.Account, error)
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 ¶
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 ¶
func (i *InterestService) UpdateInterest(context.Context, *pb.Interest) (*pb.InterestResponse, error)
UpdateInterest update specified Interest
type PlaceService ¶
type PlaceService struct {
// contains filtered or unexported fields
}
PlaceService implements the pb PlaceServiceServer interface
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 ¶
func (p *PlaceService) GetPlaces(*empty.Empty, pb.PlaceService_GetPlacesServer) error
GetPlaces stream available places
func (*PlaceService) UpdatePlace ¶
UpdatePlace update info about specified place