github.com/hyperledger/aries-framework-go@v0.3.2/pkg/didcomm/common/model/ack.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package model
     8  
     9  import "github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/decorator"
    10  
    11  // acknowledgement status constants.
    12  // Refer https://github.com/hyperledger/aries-rfcs/blob/main/features/0015-acks/README.md#ack-status.
    13  const (
    14  	AckStatusOK      = "OK"
    15  	AckStatusFAIL    = "FAIL"
    16  	AckStatusPENDING = "PENDING"
    17  )
    18  
    19  // Ack acknowledgement struct.
    20  type Ack struct {
    21  	Type        string            `json:"@type,omitempty"`
    22  	ID          string            `json:"@id,omitempty"`
    23  	Status      string            `json:"status,omitempty"`
    24  	Thread      *decorator.Thread `json:"~thread,omitempty"`
    25  	WebRedirect interface{}       `json:"~web-redirect,omitempty"`
    26  }
    27  
    28  // AckV2 acknowledgement struct.
    29  type AckV2 struct {
    30  	ID          string      `json:"id,omitempty"`
    31  	Type        string      `json:"type,omitempty"`
    32  	WebRedirect interface{} `json:"web_redirect,omitempty"`
    33  	Body        AckV2Body   `json:"body,omitempty"`
    34  }
    35  
    36  // AckV2Body represents body for AckV2.
    37  type AckV2Body struct {
    38  	Status string `json:"status,omitempty"`
    39  }