Help us shape the future of Go! Take the 2026 Go Developer Survey

sign

package
v0.49.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureNonNilResponse

func EnsureNonNilResponse[T any](resp *T, err error) (*T, error)

EnsureNonNilResponse creates an appropriate response struct if it is nil.

Types

type RequestMessage

type RequestMessage interface {
	GetMetaHeader() *session.RequestMetaHeader
}

type ResponseMessage

type ResponseMessage interface {
	GetMetaHeader() *session.ResponseMetaHeader
	SetMetaHeader(*session.ResponseMetaHeader)
}

ResponseMessage is an interface of FrostFS response message.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewUnarySignService

func NewUnarySignService(key *ecdsa.PrivateKey) *Service

func (*Service) SignResponse

func (s *Service) SignResponse(ctx context.Context, resp ResponseMessage, err error) error

SignResponse response with private key via signature.SignServiceMessage. The signature error affects the result depending on the protocol version:

  • if status return is supported, panics since we cannot return the failed status, because it will not be signed.
  • otherwise, returns error in order to transport it directly.

func (*Service) VerifyRequest

func (s *Service) VerifyRequest(ctx context.Context, req RequestMessage) error

Jump to

Keyboard shortcuts

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