mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-24 16:46:25 +00:00
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [go.uber.org/mock](https://github.com/uber/mock) | require | patch | `v0.5.0` -> `v0.5.1` | --- ### Release Notes <details> <summary>uber/mock (go.uber.org/mock)</summary> ### [`v0.5.1`](https://github.com/uber-go/mock/releases/tag/v0.5.1) [Compare Source](https://github.com/uber/mock/compare/v0.5.0...v0.5.1) #### 0.5.1 (7 Apr 2025) ##### Fixed - [#​220][]: Package mode will now generate code that uses aliases of types when they are used in the source. - [#​219][]: Fixed a collision between function argument names and package names in generated code. - [#​165][]: Fixed an issue where aliases specified by `-imports` were not being respected in generated code. [#​220]: https://github.com/uber-go/mock/pull/220 [#​219]: https://github.com/uber-go/mock/pull/219 [#​165]: https://github.com/uber-go/mock/pull/165 Thanks to [@​mtoader](https://github.com/mtoader) and [@​bstncartwright](https://github.com/bstncartwright) for their contributions to this release. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=--> Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7488 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
344 lines
11 KiB
Go
344 lines
11 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: forgejo.org/modules/nosql (interfaces: RedisClient)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package mock -destination ./modules/queue/mock/redisuniversalclient.go forgejo.org/modules/nosql RedisClient
|
|
//
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
redis "github.com/redis/go-redis/v9"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockRedisClient is a mock of RedisClient interface.
|
|
type MockRedisClient struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockRedisClientMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockRedisClientMockRecorder is the mock recorder for MockRedisClient.
|
|
type MockRedisClientMockRecorder struct {
|
|
mock *MockRedisClient
|
|
}
|
|
|
|
// NewMockRedisClient creates a new mock instance.
|
|
func NewMockRedisClient(ctrl *gomock.Controller) *MockRedisClient {
|
|
mock := &MockRedisClient{ctrl: ctrl}
|
|
mock.recorder = &MockRedisClientMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockRedisClient) EXPECT() *MockRedisClientMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockRedisClient) Close() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close.
|
|
func (mr *MockRedisClientMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRedisClient)(nil).Close))
|
|
}
|
|
|
|
// DBSize mocks base method.
|
|
func (m *MockRedisClient) DBSize(ctx context.Context) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "DBSize", ctx)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// DBSize indicates an expected call of DBSize.
|
|
func (mr *MockRedisClientMockRecorder) DBSize(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DBSize", reflect.TypeOf((*MockRedisClient)(nil).DBSize), ctx)
|
|
}
|
|
|
|
// Decr mocks base method.
|
|
func (m *MockRedisClient) Decr(ctx context.Context, key string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Decr", ctx, key)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Decr indicates an expected call of Decr.
|
|
func (mr *MockRedisClientMockRecorder) Decr(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decr", reflect.TypeOf((*MockRedisClient)(nil).Decr), ctx, key)
|
|
}
|
|
|
|
// Del mocks base method.
|
|
func (m *MockRedisClient) Del(ctx context.Context, keys ...string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx}
|
|
for _, a := range keys {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Del", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Del indicates an expected call of Del.
|
|
func (mr *MockRedisClientMockRecorder) Del(ctx any, keys ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx}, keys...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Del", reflect.TypeOf((*MockRedisClient)(nil).Del), varargs...)
|
|
}
|
|
|
|
// Exists mocks base method.
|
|
func (m *MockRedisClient) Exists(ctx context.Context, keys ...string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx}
|
|
for _, a := range keys {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Exists", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Exists indicates an expected call of Exists.
|
|
func (mr *MockRedisClientMockRecorder) Exists(ctx any, keys ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx}, keys...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockRedisClient)(nil).Exists), varargs...)
|
|
}
|
|
|
|
// FlushDB mocks base method.
|
|
func (m *MockRedisClient) FlushDB(ctx context.Context) *redis.StatusCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FlushDB", ctx)
|
|
ret0, _ := ret[0].(*redis.StatusCmd)
|
|
return ret0
|
|
}
|
|
|
|
// FlushDB indicates an expected call of FlushDB.
|
|
func (mr *MockRedisClientMockRecorder) FlushDB(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushDB", reflect.TypeOf((*MockRedisClient)(nil).FlushDB), ctx)
|
|
}
|
|
|
|
// Get mocks base method.
|
|
func (m *MockRedisClient) Get(ctx context.Context, key string) *redis.StringCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Get", ctx, key)
|
|
ret0, _ := ret[0].(*redis.StringCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Get indicates an expected call of Get.
|
|
func (mr *MockRedisClientMockRecorder) Get(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRedisClient)(nil).Get), ctx, key)
|
|
}
|
|
|
|
// HDel mocks base method.
|
|
func (m *MockRedisClient) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, key}
|
|
for _, a := range fields {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "HDel", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// HDel indicates an expected call of HDel.
|
|
func (mr *MockRedisClientMockRecorder) HDel(ctx, key any, fields ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, key}, fields...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HDel", reflect.TypeOf((*MockRedisClient)(nil).HDel), varargs...)
|
|
}
|
|
|
|
// HKeys mocks base method.
|
|
func (m *MockRedisClient) HKeys(ctx context.Context, key string) *redis.StringSliceCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "HKeys", ctx, key)
|
|
ret0, _ := ret[0].(*redis.StringSliceCmd)
|
|
return ret0
|
|
}
|
|
|
|
// HKeys indicates an expected call of HKeys.
|
|
func (mr *MockRedisClientMockRecorder) HKeys(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HKeys", reflect.TypeOf((*MockRedisClient)(nil).HKeys), ctx, key)
|
|
}
|
|
|
|
// HSet mocks base method.
|
|
func (m *MockRedisClient) HSet(ctx context.Context, key string, values ...any) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, key}
|
|
for _, a := range values {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "HSet", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// HSet indicates an expected call of HSet.
|
|
func (mr *MockRedisClientMockRecorder) HSet(ctx, key any, values ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, key}, values...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HSet", reflect.TypeOf((*MockRedisClient)(nil).HSet), varargs...)
|
|
}
|
|
|
|
// Incr mocks base method.
|
|
func (m *MockRedisClient) Incr(ctx context.Context, key string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Incr", ctx, key)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Incr indicates an expected call of Incr.
|
|
func (mr *MockRedisClientMockRecorder) Incr(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Incr", reflect.TypeOf((*MockRedisClient)(nil).Incr), ctx, key)
|
|
}
|
|
|
|
// LLen mocks base method.
|
|
func (m *MockRedisClient) LLen(ctx context.Context, key string) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LLen", ctx, key)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// LLen indicates an expected call of LLen.
|
|
func (mr *MockRedisClientMockRecorder) LLen(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LLen", reflect.TypeOf((*MockRedisClient)(nil).LLen), ctx, key)
|
|
}
|
|
|
|
// LPop mocks base method.
|
|
func (m *MockRedisClient) LPop(ctx context.Context, key string) *redis.StringCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LPop", ctx, key)
|
|
ret0, _ := ret[0].(*redis.StringCmd)
|
|
return ret0
|
|
}
|
|
|
|
// LPop indicates an expected call of LPop.
|
|
func (mr *MockRedisClientMockRecorder) LPop(ctx, key any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPop", reflect.TypeOf((*MockRedisClient)(nil).LPop), ctx, key)
|
|
}
|
|
|
|
// Ping mocks base method.
|
|
func (m *MockRedisClient) Ping(ctx context.Context) *redis.StatusCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Ping", ctx)
|
|
ret0, _ := ret[0].(*redis.StatusCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Ping indicates an expected call of Ping.
|
|
func (mr *MockRedisClientMockRecorder) Ping(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockRedisClient)(nil).Ping), ctx)
|
|
}
|
|
|
|
// RPush mocks base method.
|
|
func (m *MockRedisClient) RPush(ctx context.Context, key string, values ...any) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, key}
|
|
for _, a := range values {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "RPush", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// RPush indicates an expected call of RPush.
|
|
func (mr *MockRedisClientMockRecorder) RPush(ctx, key any, values ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, key}, values...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPush", reflect.TypeOf((*MockRedisClient)(nil).RPush), varargs...)
|
|
}
|
|
|
|
// SAdd mocks base method.
|
|
func (m *MockRedisClient) SAdd(ctx context.Context, key string, members ...any) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, key}
|
|
for _, a := range members {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "SAdd", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// SAdd indicates an expected call of SAdd.
|
|
func (mr *MockRedisClientMockRecorder) SAdd(ctx, key any, members ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, key}, members...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SAdd", reflect.TypeOf((*MockRedisClient)(nil).SAdd), varargs...)
|
|
}
|
|
|
|
// SIsMember mocks base method.
|
|
func (m *MockRedisClient) SIsMember(ctx context.Context, key string, member any) *redis.BoolCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SIsMember", ctx, key, member)
|
|
ret0, _ := ret[0].(*redis.BoolCmd)
|
|
return ret0
|
|
}
|
|
|
|
// SIsMember indicates an expected call of SIsMember.
|
|
func (mr *MockRedisClientMockRecorder) SIsMember(ctx, key, member any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SIsMember", reflect.TypeOf((*MockRedisClient)(nil).SIsMember), ctx, key, member)
|
|
}
|
|
|
|
// SRem mocks base method.
|
|
func (m *MockRedisClient) SRem(ctx context.Context, key string, members ...any) *redis.IntCmd {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, key}
|
|
for _, a := range members {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "SRem", varargs...)
|
|
ret0, _ := ret[0].(*redis.IntCmd)
|
|
return ret0
|
|
}
|
|
|
|
// SRem indicates an expected call of SRem.
|
|
func (mr *MockRedisClientMockRecorder) SRem(ctx, key any, members ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, key}, members...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SRem", reflect.TypeOf((*MockRedisClient)(nil).SRem), varargs...)
|
|
}
|
|
|
|
// Set mocks base method.
|
|
func (m *MockRedisClient) Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Set", ctx, key, value, expiration)
|
|
ret0, _ := ret[0].(*redis.StatusCmd)
|
|
return ret0
|
|
}
|
|
|
|
// Set indicates an expected call of Set.
|
|
func (mr *MockRedisClientMockRecorder) Set(ctx, key, value, expiration any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockRedisClient)(nil).Set), ctx, key, value, expiration)
|
|
}
|