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

syntax = "proto3";

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

package protos;

// AnchorPeers simply represents list of anchor peers which is used in ConfigurationItem
message AnchorPeers {
    repeated AnchorPeer anchor_peers = 1;
}

// AnchorPeer message structure which provides information about anchor peer, it includes host name,
// port number and peer certificate.
message AnchorPeer {
    string host = 1; // DNS host name of the anchor peer
    int32 port  = 2; // The port number
}

// APIResource represents an API resource in the peer whose ACL
// is determined by the policy_ref field
message APIResource {
    string policy_ref = 1; // The policy name to use for this API
}

// ACLs provides mappings for resources in a channel. APIResource encapsulates
// reference to a policy used to determine ACL for the resource
message ACLs {
    map<string, APIResource> acls = 1;
}
