model

package
v0.0.0-...-d863974 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

Warning

The package name model is required by gin-swagger to identify customized data structure. Declarative Annotation like model.Account will make use of this package name.

Please reconsider before renaming the package and directory name

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesFromForm

func BytesFromForm(c *gin.Context, key string) []byte

func BytesFromString

func BytesFromString(str string) []byte

func BytesPacked

func BytesPacked(data []byte) string

Types

type CreateProposalResult

type CreateProposalResult struct {
	Proposal string `json:"proposal"`
	Txid     string `json:"txid"`
}

type CreateTokenResult

type CreateTokenResult struct {
	CreateProposalResult
	Token string `json:"token"`
}

type Node

type Node struct {
	Address               string `json:"address"`
	TLSCARoot             string `json:"tlsca-root"` // string format of pem bytes, not file path
	SslTargetNameOverride string `json:"ssl-target-name-override"`
}

type ProposalResponseResult

type ProposalResponseResult struct {
	ProposalResponses []string `json:"proposal_responses"`
	// payload to be signed as signedTx
	Payload string `json:"payload"`
}

func (*ProposalResponseResult) ParseOrPanic

func (p *ProposalResponseResult) ParseOrPanic(jsonBytes []byte) ([]*peer.ProposalResponse, []byte)

type ProposalResult

type ProposalResult struct {
	ProposalProto string `json:"proposal-proto"`
	Txid          string `json:"txid"`
}

func (ProposalResult) ParseOrPanic

func (result ProposalResult) ParseOrPanic() *peer.Proposal

type Response

type Response struct {
	// A status code that should follow the HTTP status codes.
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// A message associated with the response code.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// A payload specified by shim.Success()
	Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
}

func ShimResultFrom

func ShimResultFrom(response *peer.ProposalResponse) Response

type TxResult

type TxResult struct {
	Status int32  `json:"status,omitempty"`
	Info   string `json:"info,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL