-
-
Save azhuox/d1eaf1074c12e4cda400992e626e0bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package user | |
import ( | |
"context" | |
"time" | |
) | |
// CreateUserRequest - request body for creating a user. | |
type CreateUserRequest struct { | |
Name string | |
Email string | |
createdAt time.Time | |
} | |
// CreateUser - creates a user in the database. | |
func (r *UserRepo) CreateUser(ctx context.Context, req CreateUserRequest) error { | |
req.createdAt = time.Now().UTC() | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment