Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserRoutes ¶
UserRoutes adds users routes to router
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler has http handler functions for user APIs
func NewHandler ¶
func NewHandler(log *zap.Logger, reader *request.Reader, jsonWriter *response.JSONWriter, repository *Repository) *Handler
NewHandler creates a new instance of Handler
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository has CRUD functions for users
func NewRepository ¶
func NewRepository(db *db.DB, log *zap.Logger) *Repository
NewRepository creates a new instance of Repository
func (*Repository) AddUser ¶
func (r *Repository) AddUser(ctx context.Context, user query.AddUserParams) (*query.User, error)
AddUser adds a new User
Click to show internal directories.
Click to hide internal directories.