Documentation ¶
Index ¶
- type FakeQuotaService
- func (f *FakeQuotaService) CheckQuotaReached(c context.Context, target quota.TargetSrv, params *quota.ScopeParameters) (bool, error)
- func (f *FakeQuotaService) DeleteQuotaForUser(c context.Context, userID int64) error
- func (f *FakeQuotaService) GetQuotasByScope(ctx context.Context, scope quota.Scope, id int64) ([]quota.QuotaDTO, error)
- func (f *FakeQuotaService) QuotaReached(c *contextmodel.ReqContext, target quota.TargetSrv) (bool, error)
- func (f *FakeQuotaService) RegisterQuotaReporter(e *quota.NewUsageReporter) error
- func (f *FakeQuotaService) Update(ctx context.Context, cmd *quota.UpdateQuotaCmd) error
- type FakeQuotaStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeQuotaService ¶
type FakeQuotaService struct {
// contains filtered or unexported fields
}
func New ¶
func New(reached bool, err error) *FakeQuotaService
func (*FakeQuotaService) CheckQuotaReached ¶
func (f *FakeQuotaService) CheckQuotaReached(c context.Context, target quota.TargetSrv, params *quota.ScopeParameters) (bool, error)
func (*FakeQuotaService) DeleteQuotaForUser ¶
func (f *FakeQuotaService) DeleteQuotaForUser(c context.Context, userID int64) error
func (*FakeQuotaService) GetQuotasByScope ¶
func (*FakeQuotaService) QuotaReached ¶
func (f *FakeQuotaService) QuotaReached(c *contextmodel.ReqContext, target quota.TargetSrv) (bool, error)
func (*FakeQuotaService) RegisterQuotaReporter ¶
func (f *FakeQuotaService) RegisterQuotaReporter(e *quota.NewUsageReporter) error
func (*FakeQuotaService) Update ¶
func (f *FakeQuotaService) Update(ctx context.Context, cmd *quota.UpdateQuotaCmd) error
type FakeQuotaStore ¶
type FakeQuotaStore struct {
ExpectedError error
}
func (*FakeQuotaStore) DeleteByUser ¶
func (f *FakeQuotaStore) DeleteByUser(ctx quota.Context, userID int64) error
func (*FakeQuotaStore) Get ¶
func (f *FakeQuotaStore) Get(ctx quota.Context, scopeParams *quota.ScopeParameters) (*quota.Map, error)
func (*FakeQuotaStore) Update ¶
func (f *FakeQuotaStore) Update(ctx quota.Context, cmd *quota.UpdateQuotaCmd) error
Click to show internal directories.
Click to hide internal directories.