// Copyright the Hyperledger Fabric contributors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

option java_package = "org.hyperledger.fabric.protos.peer.lifecycle";
option go_package = "github.com/hyperledger/fabric-protos-go/peer/lifecycle";

package lifecycle;

// These protos are used for encoding data into the statedb
// in general, it should not be necessary for clients to utilize them.

// StateMetadata describes the keys in a namespace.  It is necessary because
// in collections, range scans are not possible during transactions which
// write.  Therefore we must track the keys in our namespace ourselves.
message StateMetadata {
    string datatype = 1;
    repeated string fields = 2;
}

// StateData encodes a particular field of a datatype
message StateData {
    oneof Type {
        int64 Int64 = 1;
        bytes Bytes = 2;
        string String = 3;
    }
}
