github.com/hyperledger/aries-framework-go@v0.3.2/pkg/didcomm/common/model/problem_report.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  // ProblemReport problem report definition
    10  // TODO: need to provide full ProblemReport structure https://github.com/hyperledger/aries-framework-go/issues/912
    11  type ProblemReport struct {
    12  	Type        string      `json:"@type"`
    13  	ID          string      `json:"@id"`
    14  	Description Code        `json:"description"`
    15  	WebRedirect interface{} `json:"~web-redirect,omitempty"`
    16  }
    17  
    18  // Code represents a problem report code.
    19  type Code struct {
    20  	Code string `json:"code"`
    21  }
    22  
    23  // ProblemReportV2 problem report definition.
    24  type ProblemReportV2 struct {
    25  	Type string              `json:"type,omitempty"`
    26  	ID   string              `json:"id,omitempty"`
    27  	Body ProblemReportV2Body `json:"body,omitempty"`
    28  }
    29  
    30  // ProblemReportV2Body represents body for ProblemReportV2.
    31  type ProblemReportV2Body struct {
    32  	Code        string      `json:"code,omitempty"`
    33  	Comment     string      `json:"comment,omitempty"`
    34  	Args        []string    `json:"args,omitempty"`
    35  	EscalateTo  string      `json:"escalate_to,omitempty"`
    36  	WebRedirect interface{} `json:"~web-redirect,omitempty"`
    37  }