github.com/status-im/status-go@v1.1.0/protocol/communities/request_to_leave.go (about) 1 package communities 2 3 import ( 4 "github.com/status-im/status-go/eth-node/types" 5 "github.com/status-im/status-go/protocol/protobuf" 6 ) 7 8 type RequestToLeave struct { 9 ID types.HexBytes `json:"id"` 10 PublicKey string `json:"publicKey"` 11 Clock uint64 `json:"clock"` 12 CommunityID types.HexBytes `json:"communityId"` 13 } 14 15 func NewRequestToLeave(publicKey string, protobuf *protobuf.CommunityRequestToLeave) *RequestToLeave { 16 return &RequestToLeave{ 17 ID: CalculateRequestID(publicKey, protobuf.CommunityId), 18 PublicKey: publicKey, 19 Clock: protobuf.Clock, 20 CommunityID: protobuf.CommunityId, 21 } 22 }