Documentation
¶
Index ¶
- type Config
- type Lookup
- type LookupService
- func (s *LookupService) GetUser(ctx context.Context, in *proto.GetUserRequest) (*proto.GetUserResponse, error)
- func (s *LookupService) GetUsers(ctx context.Context, in *proto.GetUsersRequest) (*proto.GetUsersResponse, error)
- func (s *LookupService) Health(ctx context.Context, in *proto.HealthRequest) (*proto.HealthResponse, error)
- type Repository
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DBName string `mapstructure:"database_name"`
GRPCAddress string `mapstructure:"grpc_address"`
}
func (Config) DatabaseName ¶
type Lookup ¶
type Lookup struct {
*LookupService
// contains filtered or unexported fields
}
func NewLookupAPI ¶
type LookupService ¶
type LookupService struct {
proto.UnimplementedLookupServer
// contains filtered or unexported fields
}
LookupService is the implementation of the Lookup service.
func NewLookupService ¶
func NewLookupService(ctx context.Context) (*LookupService, error)
NewLookupService creates a new Lookup service.
func (*LookupService) GetUser ¶
func (s *LookupService) GetUser(ctx context.Context, in *proto.GetUserRequest) (*proto.GetUserResponse, error)
func (*LookupService) GetUsers ¶
func (s *LookupService) GetUsers(ctx context.Context, in *proto.GetUsersRequest) (*proto.GetUsersResponse, error)
func (*LookupService) Health ¶
func (s *LookupService) Health(ctx context.Context, in *proto.HealthRequest) (*proto.HealthResponse, error)
Health checks the health of the Lookup service.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db storage.Database) *Repository
func (*Repository) GetAllUsers ¶
func (r *Repository) GetAllUsers(ctx context.Context) ([]*User, error)
func (*Repository) GetUserByID ¶
Click to show internal directories.
Click to hide internal directories.