mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
20 lines
288 B
Go
20 lines
288 B
Go
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
|
|
}
|