lookup

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func (c Config) DatabaseName() string

func (Config) GRPCAddr

func (c Config) GRPCAddr() string

func (Config) Validate

func (c Config) Validate() error

type Lookup

type Lookup struct {
	*LookupService
	// contains filtered or unexported fields
}

func NewLookupAPI

func NewLookupAPI(ctx context.Context, cfg config.RuntimeConfig[Config]) (*Lookup, error)

func (*Lookup) Address

func (l *Lookup) Address() string

func (*Lookup) Logger

func (l *Lookup) Logger() *logrus.Entry

func (*Lookup) Name

func (l *Lookup) Name() string

func (*Lookup) Serve

func (l *Lookup) Serve() error

func (*Lookup) Shutdown

func (l *Lookup) Shutdown(ctx context.Context) error

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 (*LookupService) GetUsers

func (*LookupService) Health

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

func (r *Repository) GetUserByID(ctx context.Context, userID string) (*User, error)

type User

type User struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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