quotatest

package
v0.0.0-testrgm6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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 (f *FakeQuotaService) GetQuotasByScope(ctx context.Context, scope quota.Scope, id int64) ([]quota.QuotaDTO, error)

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL