Versions in this module Expand all Collapse all v0 v0.0.1 Jun 20, 2021 Changes in this version + const ACACredentials + const ACAMethods + const ACAOrigin + const ApiUrlFormat + const StreamErrHeader + var AllowedExposedHeaders = strings.Join(AllowedExposedHeadersArr, ", ") + var AllowedExposedHeadersArr = []string + var ErrNotFound = errors.New("404 page not found") + var MIMEEncodings = map[string]cmds.EncodingType + var OptionSkipMap = map[string]bool + func NewClient(address string, opts ...ClientOpt) cmds.Executor + func NewHandler(env cmds.Environment, root *cmds.Command, cfg *ServerConfig) http.Handler + type ClientOpt func(*client) + func ClientWithAPIPrefix(apiPrefix string) ClientOpt + func ClientWithFallback(exe cmds.Executor) ClientOpt + func ClientWithHTTPClient(hc *http.Client) ClientOpt + func ClientWithUserAgent(ua string) ClientOpt + type Response struct + func (res *Response) Error() *cmds.Error + func (res *Response) Length() uint64 + func (res *Response) Next() (interface{}, error) + func (res *Response) Request() *cmds.Request + type ResponseEmitter interface + func NewFlushForwarder(r cmds.ResponseEmitter, f http.Flusher) ResponseEmitter + func NewResponseEmitter(w http.ResponseWriter, method string, req *cmds.Request, ...) (ResponseEmitter, error) + type ResponseEmitterOption func(*responseEmitter) + type ServerConfig struct + APIPath string + AllowGet bool + Headers map[string][]string + func NewServerConfig() *ServerConfig + func (cfg *ServerConfig) AllowedMethods() []string + func (cfg *ServerConfig) AllowedOrigins() []string + func (cfg *ServerConfig) AppendAllowedOrigins(origins ...string) + func (cfg *ServerConfig) SetAllowCredentials(flag bool) + func (cfg *ServerConfig) SetAllowedMethods(methods ...string) + func (cfg *ServerConfig) SetAllowedOrigins(origins ...string)