mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
feat: workspace quotas (#4184)
This commit is contained in:
19
coderd/workspacequota/workspacequota.go
Normal file
19
coderd/workspacequota/workspacequota.go
Normal file
@ -0,0 +1,19 @@
|
||||
package workspacequota
|
||||
|
||||
type Enforcer interface {
|
||||
UserWorkspaceLimit() int
|
||||
CanCreateWorkspace(count int) bool
|
||||
}
|
||||
|
||||
type nop struct{}
|
||||
|
||||
func NewNop() Enforcer {
|
||||
return &nop{}
|
||||
}
|
||||
|
||||
func (*nop) UserWorkspaceLimit() int {
|
||||
return 0
|
||||
}
|
||||
func (*nop) CanCreateWorkspace(_ int) bool {
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user