forked from hyperledger-labs/fabric-smart-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstate.go
40 lines (31 loc) · 755 Bytes
/
state.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
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package state
type Serializable interface {
Bytes() ([]byte, error)
}
type State interface {
SetFromBytes(raw []byte) error
}
// LinearState models a state with a unique identifier that does not change through the evolution
// of the state.
type LinearState interface {
// SetLinearID assigns the passed id to the state
SetLinearID(id string) string
}
// Ownable models an ownable state
type Ownable interface {
// Owners returns the identities of the owners of this state
Owners() Identities
}
type AutoLinearState interface {
GetLinearID() (string, error)
}
type EmbeddingState interface {
GetState() interface{}
}
type Bytes struct {
Payload []byte
}