[v11.0.x] Anonymous User: Adds validator service for anonymous users (#95151)
* Anonymous User: Adds validator service for anonymous users (#94700)
(cherry picked from commit 3438196010)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package validator
|
||||
|
||||
import "context"
|
||||
|
||||
type FakeAnonUserLimitValidator struct {
|
||||
}
|
||||
|
||||
var _ AnonUserLimitValidator = (*FakeAnonUserLimitValidator)(nil)
|
||||
|
||||
func (f FakeAnonUserLimitValidator) Validate(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type AnonUserLimitValidator interface {
|
||||
Validate(ctx context.Context) error
|
||||
}
|
||||
|
||||
// AnonUserLimitValidatorImpl is used to validate the limit of Anonymous user
|
||||
type AnonUserLimitValidatorImpl struct {
|
||||
}
|
||||
|
||||
var _ AnonUserLimitValidator = (*AnonUserLimitValidatorImpl)(nil)
|
||||
|
||||
func ProvideAnonUserLimitValidator() *AnonUserLimitValidatorImpl {
|
||||
return &AnonUserLimitValidatorImpl{}
|
||||
}
|
||||
|
||||
func (a AnonUserLimitValidatorImpl) Validate(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user