static

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionsProxy

func OptionsProxy(h http.Handler) http.Handler

OptionsProxy returns proxy for Options request handler

Types

type Config

type Config struct {
	Prefix string `long:"prefix" default:"html" description:"EmbeddedFS prefix"`
}

Config holds all config vars

type Proxy

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

Proxy holds proxied handler

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Service

type Service struct {
	Config      *Config
	Log         *log.Logger
	ListHandler func() []string
	DataHandler func(name string) ([]byte, error)
	InfoHandler func(name string) (os.FileInfo, error)
}

Service holds SOAP service

func New

func New(cfg Config, logger *log.Logger,
	lh func() []string,
	dh func(name string) ([]byte, error),
	ih func(name string) (os.FileInfo, error),
) *Service

New creates an Service object

func (Service) SetupRouter

func (srv Service) SetupRouter(mux *http.ServeMux)

SetupRouter add routes to mux

Jump to

Keyboard shortcuts

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