soap

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEnvelopeNS added in v1.0.3

func WithEnvelopeNS(ns map[string]string) serviceOption

func WithEnvelopeSpace added in v1.0.3

func WithEnvelopeSpace(s string) serviceOption

func WithLocation added in v1.0.6

func WithLocation(s string) serviceOption

Types

type Action

type Action[I, O any] struct {
	// contains filtered or unexported fields
}

func NewAction

func NewAction[I, O any](handler ActionHandler[I, O], opts ...ActionOpt[I, O]) *Action[I, O]

NewAction create a new SOAP action - in is the type of request. should be a struct or pointer to struct - out is the type of response. same as in The fields of in & out will also be used to generate WSDL definitions

func (*Action[I, O]) KindIn added in v1.0.4

func (a *Action[I, O]) KindIn() any

func (*Action[I, O]) KindOut added in v1.0.4

func (a *Action[I, O]) KindOut() any

func (*Action[I, O]) Run

func (a *Action[I, O]) Run(ctx context.Context, in any) (any, error)

type ActionHandler

type ActionHandler[I, O any] func(ctx context.Context, in I) (O, error)

type ActionOpt

type ActionOpt[I, O any] func(a *Action[I, O])

func WithDocumentation

func WithDocumentation[I, O any](s string) ActionOpt[I, O]

type IAction added in v1.0.4

type IAction interface {
	KindIn() any
	KindOut() any
	Run(context.Context, any) (any, error)
}

type NilOut added in v1.0.4

type NilOut struct{}

type Port

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

func NewPort

func NewPort() *Port

func (*Port) AddAction

func (p *Port) AddAction(name string, a IAction)

type Service

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

func NewService

func NewService(name string, namespace string, opts ...serviceOption) *Service

func (*Service) AddPort

func (s *Service) AddPort(name string, p *Port)

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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