mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
refactor(coderd/httpapi): remove database, dbauthz and rbac imports (#9481)
Ref: #9380
This commit is contained in:
committed by
GitHub
parent
d2115941b7
commit
6fc1f5276d
@ -10,7 +10,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
)
|
||||
|
||||
@ -158,10 +157,10 @@ func (p *QueryParamParser) Strings(vals url.Values, def []string, queryParam str
|
||||
})
|
||||
}
|
||||
|
||||
// ValidEnum parses enum query params. Add more to the list as needed.
|
||||
// ValidEnum represents an enum that can be parsed and validated.
|
||||
type ValidEnum interface {
|
||||
database.ResourceType | database.AuditAction | database.BuildReason | database.UserStatus |
|
||||
database.WorkspaceStatus
|
||||
// Add more types as needed (avoid importing large dependency trees).
|
||||
~string
|
||||
|
||||
// Valid is required on the enum type to be used with ParseEnum.
|
||||
Valid() bool
|
||||
|
Reference in New Issue
Block a user