MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / GetByID

Method GetByID

server-source-code/internal/store/users.go:26–34  ·  view source on GitHub ↗

GetByID returns a user by ID.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

24
25// GetByID returns a user by ID.
26func (s *UsersStore) GetByID(ctx context.Context, id string) (*models.User, error) {
27 d := s.db.DB(ctx)
28 u, err := d.Queries.GetUserByID(ctx, id)
29 if err != nil {
30 return nil, err
31 }
32 out := dbUserToModel(u)
33 return &out, nil
34}
35
36// GetByUsername returns a user by username (case-insensitive).
37func (s *UsersStore) GetByUsername(ctx context.Context, username string) (*models.User, error) {

Callers 2

AuthWithSessionCheckFunction · 0.45
ProcessTaskMethod · 0.45

Calls 3

dbUserToModelFunction · 0.85
DBMethod · 0.65
GetUserByIDMethod · 0.65

Tested by

no test coverage detected