add documentation for consensus_topic_info_query
@@ -21,6 +21,8 @@ type ConsensusTopicInfo struct {
AutoRenewAccountID *AccountID
}
+// NewConsensusTopicInfoQuery creates a ConsensusTopicInfoQuery builder which can be used to construct and execute a
+// Consensus Get Topic Info Query.
func NewConsensusTopicInfoQuery() *ConsensusTopicInfoQuery {
pb := &proto.ConsensusGetTopicInfoQuery{Header: &proto.QueryHeader{}}
@@ -30,11 +32,13 @@ func NewConsensusTopicInfoQuery() *ConsensusTopicInfoQuery {
return &ConsensusTopicInfoQuery{inner, pb}
}
+// SetTopicId sets the topic to retrieve info about (the parameters and running state of).
func (builder *ConsensusTopicInfoQuery) SetTopicID(id ConsensusTopicID) *ConsensusTopicInfoQuery {
builder.pb.TopicID = id.toProto()
return builder
}
+// Execute executes the ConsensusTopicInfoQuery using the provided client
func (builder *ConsensusTopicInfoQuery) Execute(client *Client) (ConsensusTopicInfo, error) {
resp, err := builder.execute(client)
if err != nil {
@@ -69,7 +73,6 @@ func (builder *ConsensusTopicInfoQuery) Execute(client *Client) (ConsensusTopicI
consensusTopicInfo.AutoRenewAccountID = &ID
}
-
return consensusTopicInfo, nil
}
