github.com/hyperledger/aries-framework-go@v0.3.2/pkg/didcomm/protocol/mediator/models.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package mediator
     8  
     9  import (
    10  	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/decorator"
    11  )
    12  
    13  // Request route request message.
    14  // https://github.com/hyperledger/aries-rfcs/tree/master/features/0211-route-coordination#route-request
    15  type Request struct {
    16  	Type             string `json:"@type,omitempty"`
    17  	ID               string `json:"@id,omitempty"`
    18  	DIDCommV2        bool   `json:"didcomm_v2,omitempty"`
    19  	decorator.Timing `json:"~timing,omitempty"`
    20  }
    21  
    22  // Grant route grant message.
    23  // https://github.com/hyperledger/aries-rfcs/tree/master/features/0211-route-coordination#route-grant
    24  type Grant struct {
    25  	Type        string   `json:"@type,omitempty"`
    26  	ID          string   `json:"@id,omitempty"`
    27  	Endpoint    string   `json:"endpoint,omitempty"`
    28  	RoutingKeys []string `json:"routing_keys,omitempty"`
    29  }
    30  
    31  // KeylistUpdate route keylist update message.
    32  // https://github.com/hyperledger/aries-rfcs/tree/master/features/0211-route-coordination#keylist-update
    33  type KeylistUpdate struct {
    34  	Type    string   `json:"@type,omitempty"`
    35  	ID      string   `json:"@id,omitempty"`
    36  	Updates []Update `json:"updates,omitempty"`
    37  }
    38  
    39  // Update route key update message.
    40  type Update struct {
    41  	RecipientKey string `json:"recipient_key,omitempty"`
    42  	Action       string `json:"action,omitempty"`
    43  }
    44  
    45  // KeylistUpdateResponse route keylist update response message.
    46  // https://github.com/hyperledger/aries-rfcs/tree/master/features/0211-route-coordination#keylist-update-response
    47  type KeylistUpdateResponse struct {
    48  	Type    string           `json:"@type,omitempty"`
    49  	ID      string           `json:"@id,omitempty"`
    50  	Updated []UpdateResponse `json:"updated,omitempty"`
    51  }
    52  
    53  // UpdateResponse route key update response message.
    54  type UpdateResponse struct {
    55  	RecipientKey string `json:"recipient_key,omitempty"`
    56  	Action       string `json:"action,omitempty"`
    57  	Result       string `json:"result,omitempty"`
    58  }