Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
smartcontracts
userpreferenceCC
Commits
245fd1c3
Commit
245fd1c3
authored
6 years ago
by
Yury
Browse files
Options
Download
Plain Diff
Merge branch 'feature/rub_usd' into 'dev'
Feature/rub usd See merge request
!6
parents
21cff928
5a94ccc8
feature/init_rename_to_configure
dev-27-02-18-06
Release-1.3.1_couch
1 merge request
!6
Feature/rub usd
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
userPreferenceCC.iml
+0
-9
userPreferenceCC.iml
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/PingData.go
+4
-0
...tblocklab.com/smartcontracts/common/chaincode/PingData.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/imanager.go
+4
-0
...tblocklab.com/smartcontracts/common/chaincode/imanager.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/manager.go
+52
-4
...rtblocklab.com/smartcontracts/common/chaincode/manager.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/mock_manager.go
+20
-0
...cklab.com/smartcontracts/common/chaincode/mock_manager.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/model.go
+25
-0
...martblocklab.com/smartcontracts/common/chaincode/model.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/valid_object.go
+1
-0
...cklab.com/smartcontracts/common/chaincode/valid_object.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/interfaces/isystempreference/interface.go
+12
-0
...ontracts/common/interfaces/isystempreference/interface.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/interfaces/iuser/interface.go
+2
-0
...b.com/smartcontracts/common/interfaces/iuser/interface.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/accountCC.go
+2
-1
...artblocklab.com/smartcontracts/common/invoke/accountCC.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/keyValueCC.go
+23
-0
...rtblocklab.com/smartcontracts/common/invoke/keyValueCC.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/userCC.go
+2
-0
....smartblocklab.com/smartcontracts/common/invoke/userCC.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/userPreferenceCC.go
+6
-0
...klab.com/smartcontracts/common/invoke/userPreferenceCC.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/logging/logging.go
+4
-2
...martblocklab.com/smartcontracts/common/logging/logging.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/Account_data.go
+9
-2
...com/smartcontracts/common/model/accountCC/Account_data.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/Wallet_data.go
+4
-0
....com/smartcontracts/common/model/accountCC/Wallet_data.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/model.go
+2
-0
...ocklab.com/smartcontracts/common/model/accountCC/model.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/commissionCC/Commission_data.go
+4
-0
...artcontracts/common/model/commissionCC/Commission_data.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/organizationCC/Organization_data.go
+4
-0
...ontracts/common/model/organizationCC/Organization_data.go
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/preferenceCC/Preference_data.go
+4
-0
...artcontracts/common/model/preferenceCC/Preference_data.go
with
184 additions
and
18 deletions
+184
-18
userPreferenceCC.iml
deleted
100644 → 0
View file @
21cff928
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"WEB_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/PingData.go
View file @
245fd1c3
...
...
@@ -10,6 +10,10 @@ type PingRecord struct {
Value
string
`json:"value,omitempty"`
}
func
(
this
PingRecord
)
GetObjectType
()
string
{
return
"PingRecord"
;
}
func
(
this
PingRecord
)
CheckBeforeAdd
(
manager
IManager
)
error
{
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/imanager.go
View file @
245fd1c3
...
...
@@ -7,6 +7,10 @@ import (
type
IManager
interface
{
GetTime
()
int64
GetStateByPartialCompositeKey
(
objectType
string
,
keys
[]
string
)
(
shim
.
StateQueryIteratorInterface
,
error
)
CreateCompositeKey
(
objectType
string
,
attributes
[]
string
)
(
string
,
error
)
GetObjectListByPartialCompositeKey
(
expectedValidObjectType
ValidObject
,
keys
[]
string
)
([]
ValidObject
,
error
)
SplitCompositeKey
(
compositeKey
string
)
(
string
,
[]
string
,
error
)
SetAdapter
(
new
StubInterfaceAdapter
)
SetTimeGetter
(
new
TimeGetter
)
GetAdapter
()
StubInterfaceAdapter
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/manager.go
View file @
245fd1c3
package
chaincode
import
(
"encoding/json"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb
"github.com/hyperledger/fabric/protos/peer"
"encoding/json"
"github.com/pkg/errors"
"reflect"
"gitlab.smartblocklab.com/smartcontracts/common/security/actions"
"gitlab.smartblocklab.com/smartcontracts/common/model/requests"
"gitlab.smartblocklab.com/smartcontracts/common/invoke"
"gitlab.smartblocklab.com/smartcontracts/common/model/requests"
"gitlab.smartblocklab.com/smartcontracts/common/security/actions"
"reflect"
)
// Пример наследования данной структуры
...
...
@@ -68,6 +68,54 @@ func (this ManagerImpl) PutState(key string, value []byte) error {
return
this
.
Adapter
.
PutState
(
key
,
value
)
}
func
(
this
ManagerImpl
)
CreateCompositeKey
(
objectType
string
,
attributes
[]
string
)
(
string
,
error
)
{
GlobalLogger
.
Infof
(
"managerImpl.CreateCompositeKey by objectType %s and attributes %v"
,
objectType
,
attributes
)
return
this
.
Adapter
.
CreateCompositeKey
(
objectType
,
attributes
)
}
func
(
this
ManagerImpl
)
GetStateByPartialCompositeKey
(
objectType
string
,
keys
[]
string
)
(
shim
.
StateQueryIteratorInterface
,
error
)
{
GlobalLogger
.
Infof
(
"managerImpl.CreateCompositeKey by objectType %s and attributes %v"
,
objectType
,
keys
)
return
this
.
Adapter
.
GetStateByPartialCompositeKey
(
objectType
,
keys
)
}
func
(
this
ManagerImpl
)
GetObjectListByPartialCompositeKey
(
expectedValidObjectType
ValidObject
,
keys
[]
string
)
([]
ValidObject
,
error
)
{
objectType
:=
expectedValidObjectType
.
GetObjectType
()
GlobalLogger
.
Infof
(
"managerImpl.CreateCompositeKey by objectType %s and attributes %v"
,
objectType
,
keys
)
stateQueryIteratorInterface
,
err
:=
this
.
GetStateByPartialCompositeKey
(
objectType
,
keys
)
if
err
!=
nil
{
return
nil
,
err
}
defer
stateQueryIteratorInterface
.
Close
()
validObjectArray
:=
[]
ValidObject
{}
// Iterate through result set and for each marble found, transfer to newOwner
var
i
int
for
i
=
0
;
stateQueryIteratorInterface
.
HasNext
();
i
++
{
// Note that we don't get the value (2nd return variable), we'll just get the marble name from the composite key
responseRange
,
err
:=
stateQueryIteratorInterface
.
Next
()
if
err
!=
nil
{
return
nil
,
err
}
validObject
:=
expectedValidObjectType
.
New
()
err
=
json
.
Unmarshal
(
responseRange
.
Value
,
validObject
)
if
err
!=
nil
{
return
nil
,
GlobalLogger
.
Error
(
err
.
Error
())
}
validObjectArray
=
append
(
validObjectArray
,
validObject
)
}
return
validObjectArray
,
nil
}
func
(
this
ManagerImpl
)
SplitCompositeKey
(
compositeKey
string
)
(
string
,
[]
string
,
error
)
{
GlobalLogger
.
Infof
(
"managerImpl.SplitCompositeKey by key %s"
,
compositeKey
)
return
this
.
Adapter
.
SplitCompositeKey
(
compositeKey
)
}
func
(
this
ManagerImpl
)
DelState
(
key
string
)
error
{
GlobalLogger
.
Infof
(
"managerImpl.DelState %s"
,
key
)
return
this
.
Adapter
.
DelState
(
key
)
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/mock_manager.go
View file @
245fd1c3
...
...
@@ -68,6 +68,26 @@ func (mock ManagerImplMock) GetQueryResult(query string) (shim.StateQueryIterato
return
mockArgs
.
Get
(
0
)
.
(
shim
.
StateQueryIteratorInterface
),
mockArgs
.
Error
(
1
)
}
func
(
mock
ManagerImplMock
)
GetStateByPartialCompositeKey
(
objectType
string
,
keys
[]
string
)
(
shim
.
StateQueryIteratorInterface
,
error
)
{
mockArgs
:=
mock
.
Called
(
objectType
,
keys
)
return
mockArgs
.
Get
(
0
)
.
(
shim
.
StateQueryIteratorInterface
),
mockArgs
.
Error
(
1
)
}
func
(
mock
ManagerImplMock
)
GetObjectListByPartialCompositeKey
(
expectedValidObjectType
ValidObject
,
keys
[]
string
)
([]
ValidObject
,
error
)
{
mockArgs
:=
mock
.
Called
(
expectedValidObjectType
,
keys
)
return
mockArgs
.
Get
(
0
)
.
([]
ValidObject
),
mockArgs
.
Error
(
1
)
}
func
(
mock
ManagerImplMock
)
CreateCompositeKey
(
objectType
string
,
attributes
[]
string
)
(
string
,
error
)
{
mockArgs
:=
mock
.
Called
(
objectType
,
attributes
)
return
mockArgs
.
Get
(
0
)
.
(
string
),
mockArgs
.
Error
(
1
)
}
func
(
mock
ManagerImplMock
)
SplitCompositeKey
(
compositeKey
string
)
(
string
,
[]
string
,
error
)
{
mockArgs
:=
mock
.
Called
(
compositeKey
)
return
mockArgs
.
Get
(
0
)
.
(
string
),
mockArgs
.
Get
(
1
)
.
([]
string
),
mockArgs
.
Error
(
2
)
}
func
(
mock
ManagerImplMock
)
InvokeChaincode
(
chaincodeName
string
,
args
[][]
byte
,
channel
string
)
pb
.
Response
{
mockArgs
:=
mock
.
Called
(
chaincodeName
,
args
,
channel
)
if
mockArgs
.
Get
(
0
)
==
nil
{
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/model.go
View file @
245fd1c3
...
...
@@ -55,6 +55,31 @@ type StubInterfaceAdapter interface {
InvokeChaincode
(
chaincodeName
string
,
args
[][]
byte
,
channel
string
)
pb
.
Response
GetTxID
()
string
// CreateCompositeKey combines the given `attributes` to form a composite
// key. The objectType and attributes are expected to have only valid utf8
// strings and should not contain U+0000 (nil byte) and U+10FFFF
// (biggest and unallocated code point).
// The resulting composite key can be used as the key in PutState().
CreateCompositeKey
(
objectType
string
,
attributes
[]
string
)
(
string
,
error
)
// SplitCompositeKey splits the specified key into attributes on which the
// composite key was formed. Composite keys found during range queries
// or partial composite key queries can therefore be split into their
// composite parts.
SplitCompositeKey
(
compositeKey
string
)
(
string
,
[]
string
,
error
)
// GetStateByPartialCompositeKey queries the state in the ledger based on
// a given partial composite key. This function returns an iterator
// which can be used to iterate over all composite keys whose prefix matches
// the given partial composite key. The `objectType` and attributes are
// expected to have only valid utf8 strings and should not contain
// U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point).
// See related functions SplitCompositeKey and CreateCompositeKey.
// Call Close() on the returned StateQueryIteratorInterface object when done.
// The query is re-executed during validation phase to ensure result set
// has not changed since transaction endorsement (phantom reads detected).
GetStateByPartialCompositeKey
(
objectType
string
,
keys
[]
string
)
(
shim
.
StateQueryIteratorInterface
,
error
)
}
type
ChaincodeParameter
struct
{
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/chaincode/valid_object.go
View file @
245fd1c3
...
...
@@ -6,4 +6,5 @@ type ValidObject interface {
CheckBeforeAdd
(
manager
IManager
)
error
CheckBeforeUpdate
(
updatedObject
ValidObject
,
manager
IManager
)
error
New
()
ValidObject
GetObjectType
()
string
}
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/interfaces/isystempreference/interface.go
0 → 100644
View file @
245fd1c3
package
isystempreference
import
(
"gitlab.smartblocklab.com/smartcontracts/common/model/requests"
"gitlab.smartblocklab.com/smartcontracts/common/model/preferenceCC"
)
type
ISystemPreferenceManager
interface
{
AddPreference
(
preference
*
preferenceCC
.
Preference
)
(
*
preferenceCC
.
Preference
,
error
)
GetPreference
(
key
*
requests
.
Id
)
(
*
preferenceCC
.
Preference
,
error
)
UpdatePreference
(
preference
*
preferenceCC
.
Preference
)
(
*
preferenceCC
.
Preference
,
error
)
}
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/interfaces/iuser/interface.go
View file @
245fd1c3
...
...
@@ -15,6 +15,8 @@ type IUserManager interface {
AddUser
(
user
*
userCC
.
User
)
(
chaincode
.
ValidObject
,
error
)
AddPublicKey
(
addPublicKeyArg
userCC
.
AddPublicKeyArg
)
(
chaincode
.
ValidObject
,
error
)
RevokeUserPublicKey
(
revokeUserPublicKeyArg
userCC
.
RevokeUserPublicKeyArg
)
(
chaincode
.
ValidObject
,
error
)
ActivateUser
(
userID
*
requests
.
Id
)
(
chaincode
.
ValidObject
,
error
)
BlockUser
(
userID
*
requests
.
Id
)
(
chaincode
.
ValidObject
,
error
)
// query
GetUser
(
userID
*
requests
.
Id
)
(
*
userCC
.
User
,
error
)
VerifyUserSignature
(
verifyUserSignatureArg
requests
.
VerifyUserSignatureArg
)
(
chaincode
.
ValidObject
,
error
)
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/accountCC.go
View file @
245fd1c3
...
...
@@ -7,7 +7,6 @@ const (
Marketaccountchannel
=
"marketaccountchannel"
MarketaccountCC
=
"marketaccountCC"
AddExternalAccountFunction
=
"addExternalAccount"
GetAccountsFunction
=
"getAccounts"
GetWalletsFunction
=
"getWallets"
AddWalletFunction
=
"addWallet"
...
...
@@ -16,6 +15,8 @@ const (
BlockWalletFunction
=
"blockWallet"
ActivateAccountFunction
=
"activateAccount"
BlockAccountFunction
=
"blockAccount"
ChangeAccountToMainType
=
"changeAccountToMainType"
ChangeWalletToMainType
=
"changeWalletToMainType"
VerifyUserAccountFunction
=
"verifyUserAccount"
CheckAndLoadAccountFunction
=
"checkAndLoadAccount"
GetAllUserWalletsFunction
=
"getAllUserWallets"
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/keyValueCC.go
0 → 100644
View file @
245fd1c3
package
invoke
const
(
KycDocumentCC
=
"kycdocumentCC"
KycDocumentsChannel
=
"kycdocumentchannel"
KycDocumentStatusCC
=
"kycdocumentstatusCC"
KycDocumentStatusChannel
=
"kycdocumentstatuschannel"
KycRuleStatusCC
=
"kycrulestatusCC"
KycRuleStatusChannel
=
"kycrulestatuschannel"
EthereumInputCC
=
"ethereuminputCC"
EthereumInputChannel
=
"ethereuminputchannel"
AddKeyValueFunction
=
"addKeyValue"
GetKeyValueFunction
=
"getKeyValue"
AddKeyValueArrayFunction
=
"addKeyValueArray"
GetKeyValueArrayFunction
=
"getKeyValueArray"
GetKeyValueArrayByPartOfKeyFunction
=
"getKeyValueArrayByPartOfKey"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/userCC.go
View file @
245fd1c3
...
...
@@ -14,4 +14,6 @@ const (
RevokeUserPublicKeyFunction
=
"revokeUserPublicKey"
VerifyUserPublicKeyFunction
=
"verifyUserPublicKey"
VerifyUserSignatureFunction
=
"verifyUserSignature"
BlockUser
=
"blockUser"
ActivateUser
=
"activateUser"
)
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/invoke/userPreferenceCC.go
View file @
245fd1c3
...
...
@@ -19,6 +19,12 @@ const (
SessionCC
=
"sessionCC"
SessionChannel
=
"sessionchannel"
KycUserCC
=
"kycuserCC"
KycUserChannel
=
"kycuserchannel"
KycRuleCC
=
"kycruleCC"
KycRuleChannel
=
"kycrulechannel"
AddPreferenceFunction
=
"addPreference"
GetPreferenceFunction
=
"getPreference"
UpdatePreferenceFunction
=
"updatePreference"
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/logging/logging.go
View file @
245fd1c3
...
...
@@ -110,16 +110,18 @@ func (obj *LoggerHandler) Warnf(format string, a ...interface{}) {
func
(
obj
*
LoggerHandler
)
Errorf
(
format
string
,
a
...
interface
{})
error
{
pc
,
fn
,
line
,
_
:=
runtime
.
Caller
(
1
)
errorMsg
:=
fmt
.
Sprintf
(
format
,
a
...
)
fullMsg
:=
fmt
.
Sprintf
(
logLayout
+
"
\n
%s"
,
colored
(
cut
(
runtime
.
FuncForPC
(
pc
)
.
Name
()),
fgBlue
,
faint
),
colored
(
cut
(
fn
),
fgMagenta
,
faint
),
line
,
colored
(
fmt
.
Sprintf
(
format
,
a
...
)
,
fgBlack
,
faint
),
colored
(
errorMsg
,
fgBlack
,
faint
),
colored
(
string
(
debug
.
Stack
()),
fgRed
,
faint
))
obj
.
logger
.
Error
(
fullMsg
)
return
errors
.
New
(
fmt
.
Sprintf
(
format
,
a
)
)
return
errors
.
New
(
errorMsg
)
}
func
(
obj
*
LoggerHandler
)
Info
(
msg
string
)
{
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/Account_data.go
View file @
245fd1c3
...
...
@@ -17,6 +17,10 @@ type Account struct {
CurrencyType
string
`json:"currency_type,omitempty"`
}
func
(
this
Account
)
GetObjectType
()
string
{
return
"Account"
;
}
func
(
this
Account
)
ToUserAccountInfo
()
*
UserAccountInfo
{
return
&
UserAccountInfo
{
UserID
:
this
.
UserID
,
...
...
@@ -61,7 +65,10 @@ func (this Account) CheckBeforeAdd(manager chaincode.IManager) error {
}
func
(
this
Account
)
CheckBeforeUpdate
(
updatedObject
chaincode
.
ValidObject
,
manager
chaincode
.
IManager
)
error
{
updatedAccount
:=
updatedObject
.
(
*
Account
)
updatedAccount
,
err
:=
Cast_Account
(
updatedObject
)
if
err
!=
nil
{
return
err
}
if
updatedAccount
.
AccountID
!=
this
.
AccountID
{
return
errors
.
Errorf
(
"Account associated with wrong AccountID, expecting %s, while received %s"
,
updatedAccount
.
AccountID
,
this
.
AccountID
)
...
...
@@ -75,7 +82,7 @@ func (this Account) CheckBeforeUpdate(updatedObject chaincode.ValidObject, manag
return
errors
.
Errorf
(
"Account associated with wrong CurrencyType, expecting %s, while received %s"
,
updatedAccount
.
CurrencyType
,
this
.
CurrencyType
)
}
err
:
=
checkWalletID
(
this
,
manager
)
err
=
checkWalletID
(
this
,
manager
)
if
err
!=
nil
{
return
err
}
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/Wallet_data.go
View file @
245fd1c3
...
...
@@ -15,6 +15,10 @@ type Wallet struct {
Status
AccountStatus
`json:"status,omitempty"`
}
func
(
this
Wallet
)
GetObjectType
()
string
{
return
"Wallet"
;
}
func
(
this
Wallet
)
CheckBeforeAdd
(
manager
chaincode
.
IManager
)
error
{
// TODO check user exists
// TODO when add check AccountStatus_ACTIVE : wallet.Status = model.AccountStatus_ACTIVE
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/accountCC/model.go
View file @
245fd1c3
...
...
@@ -37,6 +37,7 @@ type NewWallet struct {
type
NewAccount
struct
{
WalletID
string
`json:"wallet_id,omitempty"`
Type
AccountCCType
`json:"type,omitempty"`
// todo validate CurrencyType
CurrencyType
string
`json:"currency_type,omitempty"`
}
...
...
@@ -47,6 +48,7 @@ type WalletWithAccounts struct {
type
GetAccountByCurrencyTypeArg
struct
{
UserID
string
`json:"user_id,omitempty"`
// todo validate CurrencyType
CurrencyType
string
`json:"currency_type,omitempty"`
}
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/commissionCC/Commission_data.go
View file @
245fd1c3
...
...
@@ -18,6 +18,10 @@ type Commission struct {
CommissionPercent
float64
`json:"commission_percent,omitempty"`
}
func
(
this
Commission
)
GetObjectType
()
string
{
return
"Commission"
;
}
func
(
this
Commission
)
New
()
chaincode
.
ValidObject
{
return
&
Commission
{}
}
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/organizationCC/Organization_data.go
View file @
245fd1c3
...
...
@@ -16,6 +16,10 @@ type Organization struct {
Website
string
`json:"website,omitempty"`
}
func
(
this
Organization
)
GetObjectType
()
string
{
return
"Organization"
;
}
func
(
this
Organization
)
CheckBeforeAdd
(
manager
chaincode
.
IManager
)
error
{
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
vendor/gitlab.smartblocklab.com/smartcontracts/common/model/preferenceCC/Preference_data.go
View file @
245fd1c3
...
...
@@ -12,6 +12,10 @@ type Preference struct {
Fields
chaincode
.
Fields
`json:"fields,omitempty"`
}
func
(
this
Preference
)
GetObjectType
()
string
{
return
"Preference"
;
}
func
(
this
Preference
)
CheckBeforeAdd
(
manager
chaincode
.
IManager
)
error
{
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help