mirror of https://github.com/grafana/grafana
[v11.3.x] Anonymous User: Adds validator service for anonymous users (#94994)
Anonymous User: Adds validator service for anonymous users (#94700)
(cherry picked from commit 3438196010
)
Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
pull/95171/head
parent
6924b9641a
commit
2e81653b68
@ -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 |
||||
} |
Loading…
Reference in new issue