Back to godoc.org

Package static

v0.1.1
Latest Go to latest

The latest major version is .

Published: May 7, 2020 | License: MIT | Module: github.com/TenderPro/rpckit

Index

func OptionsProxy

func OptionsProxy(h http.Handler) http.Handler

OptionsProxy returns proxy for Options request handler

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier