Documentation ¶
Overview ¶
* Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
* Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
* Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
* Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
* Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
- Variables
- func DefaultFormatError(err interface{}) interface{}
- func DefaultFormatSuccess(data interface{}) interface{}
- func NewPrivateHistoryStubDecorator(collectionName string, histStrategy PrivateHistoryStrategy, ...) shim.ChaincodeStubInterface
- func NewPrivateStubDecorator(collectionName string, stub shim.ChaincodeStubInterface) shim.ChaincodeStubInterface
- type FactoryFunc
- type FormatResponseFunc
- type MarshalPrivState
- type MarshalQueryState
- type MarshalState
- type MarshalStateImpl
- func (stub *MarshalStateImpl) GetAllStates(query string, factFunc FactoryFunc, visitFunc VisitFunc) error
- func (stub *MarshalStateImpl) ReadPrivState(collection, key string, value interface{}) error
- func (stub *MarshalStateImpl) ReadState(key string, value interface{}) error
- func (stub *MarshalStateImpl) WritePrivState(collection, key string, value interface{}) error
- func (stub *MarshalStateImpl) WriteState(key string, value interface{}) error
- type MarshalStub
- type PrivateHistoryStrategy
- type Response
- type VisitFunc
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("not found")
ErrNotFound .
Functions ¶
func DefaultFormatSuccess ¶
func DefaultFormatSuccess(data interface{}) interface{}
DefaultFormatSuccess .
func NewPrivateHistoryStubDecorator ¶
func NewPrivateHistoryStubDecorator(collectionName string, histStrategy PrivateHistoryStrategy, stub shim.ChaincodeStubInterface) shim.ChaincodeStubInterface
NewPrivateHistoryStubDecorator decorates stub for using private data collection with history request.
func NewPrivateStubDecorator ¶
func NewPrivateStubDecorator(collectionName string, stub shim.ChaincodeStubInterface) shim.ChaincodeStubInterface
NewPrivateStubDecorator decorates stub for using private data collection as a source.
Types ¶
type FormatResponseFunc ¶
type FormatResponseFunc func(data interface{}) interface{}
FormatResponseFunc .
type MarshalPrivState ¶
type MarshalPrivState interface { // WriteState . WritePrivState(collection, key string, value interface{}) error // ReadState . ReadPrivState(collection, key string, value interface{}) error }
MarshalPrivState .
type MarshalQueryState ¶
type MarshalQueryState interface {
GetAllStates(query string, factFunc FactoryFunc, visitFunc VisitFunc) error
}
MarshalQueryState .
type MarshalState ¶
type MarshalState interface { // WriteState . WriteState(key string, value interface{}) error // ReadState . ReadState(key string, value interface{}) error }
MarshalState .
type MarshalStateImpl ¶
type MarshalStateImpl struct { shim.ChaincodeStubInterface // contains filtered or unexported fields }
MarshalStateImpl .
func (*MarshalStateImpl) GetAllStates ¶
func (stub *MarshalStateImpl) GetAllStates(query string, factFunc FactoryFunc, visitFunc VisitFunc) error
GetAllStates .
func (*MarshalStateImpl) ReadPrivState ¶
func (stub *MarshalStateImpl) ReadPrivState(collection, key string, value interface{}) error
ReadPrivState .
func (*MarshalStateImpl) ReadState ¶
func (stub *MarshalStateImpl) ReadState(key string, value interface{}) error
ReadState .
func (*MarshalStateImpl) WritePrivState ¶
func (stub *MarshalStateImpl) WritePrivState(collection, key string, value interface{}) error
WritePrivState .
func (*MarshalStateImpl) WriteState ¶
func (stub *MarshalStateImpl) WriteState(key string, value interface{}) error
WriteState .
type MarshalStub ¶
type MarshalStub interface { shim.ChaincodeStubInterface MarshalQueryState MarshalState MarshalPrivState }
MarshalStub .
func NewMarshalStateImpl ¶
func NewMarshalStateImpl(stub shim.ChaincodeStubInterface, marshalFunc utils.MarshalFunc, unmarshalFunc utils.UnmarshalFunc) MarshalStub
NewMarshalStateImpl .
type PrivateHistoryStrategy ¶
type PrivateHistoryStrategy interface { // Append . Append(stub shim.ChaincodeStubInterface, collection, key string, value []byte, isDelete bool) error // GetIterator . GetIterator(stub shim.ChaincodeStubInterface, collection, key string) (shim.HistoryQueryIteratorInterface, error) }
PrivateHistoryStrategy .
func NewPrivateHistoryArrayAppendStrategy ¶
func NewPrivateHistoryArrayAppendStrategy(keysPrefix, keysSuffix string) PrivateHistoryStrategy
NewPrivateHistoryArrayAppendStrategy .