github.com/TykTechnologies/tyk/internal/rate/mock
No package summary is available.
Package
Files: 3. Third party imports: 0. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Vars
var _ model.AllowanceRepository = &AllowanceStore{}
Types
Allowance
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
type (
Allowance = model.Allowance
)
AllowanceStore
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Allowance |
|
No comment on field. |
| Err |
|
No comment on field. |
type AllowanceStore struct {
Allowance *Allowance
Err error
}
Locker
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
type Locker sync.Mutex
Functions
func (*AllowanceStore) Get
func (m *AllowanceStore) Get(ctx context.Context, key string) (*Allowance, error) {
return m.Allowance, m.Err
}
Cognitive complexity: 0, Cyclomatic complexity: 1
func (*AllowanceStore) Locker
func (m *AllowanceStore) Locker(key string) model.Locker {
return &Locker{}
}
Cognitive complexity: 1, Cyclomatic complexity: 1
func (*AllowanceStore) Set
func (m *AllowanceStore) Set(ctx context.Context, key string, allowance *Allowance) error {
m.Allowance = allowance
return m.Err
}
Cognitive complexity: 0, Cyclomatic complexity: 1
func (*AllowanceStore) String
func (m *AllowanceStore) String() string {
return "mock"
}
Cognitive complexity: 0, Cyclomatic complexity: 1
func (*Locker) Lock
func (m *Locker) Lock(ctx context.Context) error {
(*sync.Mutex)(m).Lock()
return nil
}
Cognitive complexity: 0, Cyclomatic complexity: 1
func (*Locker) Unlock
func (m *Locker) Unlock(ctx context.Context) error {
(*sync.Mutex)(m).Unlock()
return nil
}
Cognitive complexity: 0, Cyclomatic complexity: 1