/
ReputationKeeper.go
130 lines (104 loc) · 3.42 KB
/
ReputationKeeper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import (
linotypes "github.com/lino-network/lino/types"
amino "github.com/tendermint/go-amino"
mock "github.com/stretchr/testify/mock"
types "github.com/cosmos/cosmos-sdk/types"
)
// ReputationKeeper is an autogenerated mock type for the ReputationKeeper type
type ReputationKeeper struct {
mock.Mock
}
// DonateAt provides a mock function with given fields: ctx, username, post, amount
func (_m *ReputationKeeper) DonateAt(ctx types.Context, username linotypes.AccountKey, post linotypes.Permlink, amount linotypes.MiniDollar) (linotypes.MiniDollar, types.Error) {
ret := _m.Called(ctx, username, post, amount)
var r0 linotypes.MiniDollar
if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, linotypes.Permlink, linotypes.MiniDollar) linotypes.MiniDollar); ok {
r0 = rf(ctx, username, post, amount)
} else {
r0 = ret.Get(0).(linotypes.MiniDollar)
}
var r1 types.Error
if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey, linotypes.Permlink, linotypes.MiniDollar) types.Error); ok {
r1 = rf(ctx, username, post, amount)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(types.Error)
}
}
return r0, r1
}
// ExportToFile provides a mock function with given fields: ctx, cdc, file
func (_m *ReputationKeeper) ExportToFile(ctx types.Context, cdc *amino.Codec, file string) error {
ret := _m.Called(ctx, cdc, file)
var r0 error
if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
r0 = rf(ctx, cdc, file)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetCurrentRound provides a mock function with given fields: ctx
func (_m *ReputationKeeper) GetCurrentRound(ctx types.Context) (int64, types.Error) {
ret := _m.Called(ctx)
var r0 int64
if rf, ok := ret.Get(0).(func(types.Context) int64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int64)
}
var r1 types.Error
if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok {
r1 = rf(ctx)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(types.Error)
}
}
return r0, r1
}
// GetReputation provides a mock function with given fields: ctx, username
func (_m *ReputationKeeper) GetReputation(ctx types.Context, username linotypes.AccountKey) (linotypes.MiniDollar, types.Error) {
ret := _m.Called(ctx, username)
var r0 linotypes.MiniDollar
if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) linotypes.MiniDollar); ok {
r0 = rf(ctx, username)
} else {
r0 = ret.Get(0).(linotypes.MiniDollar)
}
var r1 types.Error
if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok {
r1 = rf(ctx, username)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(types.Error)
}
}
return r0, r1
}
// ImportFromFile provides a mock function with given fields: ctx, cdc, file
func (_m *ReputationKeeper) ImportFromFile(ctx types.Context, cdc *amino.Codec, file string) error {
ret := _m.Called(ctx, cdc, file)
var r0 error
if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
r0 = rf(ctx, cdc, file)
} else {
r0 = ret.Error(0)
}
return r0
}
// Update provides a mock function with given fields: ctx
func (_m *ReputationKeeper) Update(ctx types.Context) types.Error {
ret := _m.Called(ctx)
var r0 types.Error
if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(types.Error)
}
}
return r0
}