mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
* feat: Add authentication and personal user endpoint This contribution adds a lot of scaffolding for the database fake and testability of coderd. A new endpoint "/user" is added to return the currently authenticated user to the requester. * Use TestMain to catch leak instead * Add userpassword package * Add WIP * Add user auth * Fix test * Add comments * Fix login response * Fix order * Fix generated code * Update httpapi/httpapi.go Co-authored-by: Bryan <bryan@coder.com> Co-authored-by: Bryan <bryan@coder.com>
20 lines
631 B
Go
20 lines
631 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
package database
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type querier interface {
|
|
GetAPIKeyByID(ctx context.Context, id string) (APIKey, error)
|
|
GetUserByEmailOrUsername(ctx context.Context, arg GetUserByEmailOrUsernameParams) (User, error)
|
|
GetUserByID(ctx context.Context, id string) (User, error)
|
|
GetUserCount(ctx context.Context) (int64, error)
|
|
InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (APIKey, error)
|
|
InsertUser(ctx context.Context, arg InsertUserParams) (User, error)
|
|
UpdateAPIKeyByID(ctx context.Context, arg UpdateAPIKeyByIDParams) error
|
|
}
|
|
|
|
var _ querier = (*sqlQuerier)(nil)
|