Documentation
¶
Index ¶
- Variables
- func SignResponse[R sdkcrypto.ProtoMessage](signer *ecdsa.PrivateKey, r sdkcrypto.SignedResponse[R]) *protosession.ResponseVerificationHeader
- func SignResponseIfNeeded[R sdkcrypto.ProtoMessage](signer *ecdsa.PrivateKey, r sdkcrypto.SignedResponse[R], req Request) *protosession.ResponseVerificationHeader
- func ToStatus(err error) *protostatus.Status
- func VersionLE(req Request, mjr, mnr uint32) bool
- type Request
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StatusOK is a missing response status field meaning OK in NeoFS protocol. It // allows to make code more clear instead of passing nil. StatusOK *protostatus.Status // StatusOKErr is an error corresponding to [StatusOK]. It allows to make code // more clear instead of passing nil. StatusOKErr error )
Functions ¶
func SignResponse ¶ added in v0.45.0
func SignResponse[R sdkcrypto.ProtoMessage](signer *ecdsa.PrivateKey, r sdkcrypto.SignedResponse[R]) *protosession.ResponseVerificationHeader
func SignResponseIfNeeded ¶ added in v0.52.0
func SignResponseIfNeeded[R sdkcrypto.ProtoMessage](signer *ecdsa.PrivateKey, r sdkcrypto.SignedResponse[R], req Request) *protosession.ResponseVerificationHeader
SignResponseIfNeeded checks whether response for the req should be signed. If so, calculated verification header is returned. Otherwise, nil returns.
func ToStatus ¶ added in v0.45.0
func ToStatus(err error) *protostatus.Status
ToStatus unwraps the deepest error from err and converts it into the response status.
Types ¶
type Request ¶ added in v0.52.0
type Request interface {
GetMetaHeader() *protosession.RequestMetaHeader
}
Request is a common interface of API request messages.
Click to show internal directories.
Click to hide internal directories.