soap

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRateLimit = rate.Limit(3)

	ErrSend         = errors.New("send")
	ErrLocked       = errors.New("locked")
	ErrEmptyMessage = errors.New("empty message")
)

Functions

func NewClient

func NewClient(endpointURL string, httpClient *http.Client, rateLimit *rate.Limiter) client

func StreamXML

func StreamXML(qw422016 *qt422016.Writer, s any)

func WriteXML

func WriteXML(qq422016 qtio422016.Writer, s any)

func XML

func XML(s any) string

Types

type Decrypter

type Decrypter interface {
	Decrypt(ctx context.Context, w io.Writer, key, msgTypeName string, data []byte) error
	DecryptReader(ctx context.Context, w io.Writer, r io.Reader) (MsgHeader, error)
}

type ExtractXmlBomaMsgResponse

type ExtractXmlBomaMsgResponse struct {
	Data []byte `xml:"msgData"`
}

type MsgHeader

type MsgHeader struct {
	Type      string `xml:"msgTypeName"`
	Sender    string `xml:"senderInsCo"`
	Target    string `xml:"targetInsCo"`
	MsgID     string `xml:"messageId"`
	RefID     string `xml:"referenceId"`
	Reason    string `xml:"reasonOfRequest"`
	Result    string `xml:"resultCode"`
	DateTime  string `xml:"messageDateTime"`
	ReqID     string `xml:"requestersId"`
	Key       string `xml:"encryptedKey"`
	Responded string `xml:"-"`
}

type ReadDeleteNamer

type ReadDeleteNamer interface {
	io.ReadCloser
	Delete() error
	Name() string
}

type ReceiveRootMsgResponse

type ReceiveRootMsgResponse struct {
	// betteralign:ignore
	Header    MsgHeader `xml:"msgHeader"`
	Data      []byte    `xml:"msgData"`
	Responded string    `xml:"serviceResponded"`
}

func (ReceiveRootMsgResponse) Decrypt

type Receiver

type Receiver interface {
	Receive(ctx context.Context, w io.Writer) (ReceiveRootMsgResponse, error)
	Decrypter
}

type SendReceiver

type SendReceiver interface {
	Sender
	Receiver
}

type SendXmlBomaMsgResponse

type SendXmlBomaMsgResponse struct {
	Header    MsgHeader `xml:"msgHeader"`
	Responded string    `xml:"serviceResponded"`
	Key       string    `xml:"encryptedKey"`
	Data      []byte    `xml:"msgData"`
}

type Sender

type Sender interface {
	Send(context.Context, io.Reader) error
}

type Vault

type Vault struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Vault is a safe file storage for in-flight (in-process) messages.

func NewVault

func NewVault(path string) (*Vault, error)

NewVault prepares a vault under the given path.

Files in writing are under $path/tmp, removed files move under $path/done, all the current content is under $path.

func (*Vault) Get

func (v *Vault) Get() (ReadDeleteNamer, error)

Get the next (first) file from the vault.

func (*Vault) Len

func (v *Vault) Len() int

Len returns the number of messages in the vault.

func (*Vault) NewWriter

func (v *Vault) NewWriter(size int) (*vaultFile, error)

NewWriter returns a new Writer with the preallocated size, named with an ULID under the tmp dir.

func (*Vault) Put

func (v *Vault) Put(data []byte) (func() error, error)

Put the data into the vault (into a new file).

func (*Vault) Remove

func (v *Vault) Remove(name string) error

Remove (move to the done folder) the named file from the vault.

Jump to

Keyboard shortcuts

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