Documentation ¶
Index ¶
- func MatchQueryParam(r *http.Request, key, value string) (bool, bool)
- type Option
- type ProviderResponseWriter
- type ResponseWriter
- func (w *ResponseWriter) Cid() cid.Cid
- func (w *ResponseWriter) Encoder() *json.Encoder
- func (w *ResponseWriter) Flush()
- func (w *ResponseWriter) Header() http.Header
- func (w *ResponseWriter) IsND() bool
- func (w *ResponseWriter) Multihash() multihash.Multihash
- func (w *ResponseWriter) MultihashCode() uint64
- func (w *ResponseWriter) PathType() string
- func (w *ResponseWriter) StatusCode() int
- func (w *ResponseWriter) Write(b []byte) (int, error)
- func (w *ResponseWriter) WriteHeader(statusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*config) error
Option is a function that sets a value in a config.
func WithCidPathType ¶
func WithMultihashPathType ¶
func WithPreferJson ¶
type ProviderResponseWriter ¶
type ProviderResponseWriter struct { ResponseWriter // contains filtered or unexported fields }
func NewProviderResponseWriter ¶
func NewProviderResponseWriter(w *ResponseWriter) *ProviderResponseWriter
func (*ProviderResponseWriter) Close ¶
func (pw *ProviderResponseWriter) Close() error
func (*ProviderResponseWriter) WriteProviderResult ¶
func (pw *ProviderResponseWriter) WriteProviderResult(pr model.ProviderResult) error
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
func New ¶
func New(w http.ResponseWriter, r *http.Request, options ...Option) (*ResponseWriter, error)
func (*ResponseWriter) Cid ¶
func (w *ResponseWriter) Cid() cid.Cid
func (*ResponseWriter) Encoder ¶
func (w *ResponseWriter) Encoder() *json.Encoder
func (*ResponseWriter) Flush ¶ added in v0.2.12
func (w *ResponseWriter) Flush()
func (*ResponseWriter) Header ¶
func (w *ResponseWriter) Header() http.Header
func (*ResponseWriter) IsND ¶
func (w *ResponseWriter) IsND() bool
func (*ResponseWriter) Multihash ¶
func (w *ResponseWriter) Multihash() multihash.Multihash
func (*ResponseWriter) MultihashCode ¶
func (w *ResponseWriter) MultihashCode() uint64
func (*ResponseWriter) PathType ¶
func (w *ResponseWriter) PathType() string
func (*ResponseWriter) StatusCode ¶ added in v0.3.0
func (w *ResponseWriter) StatusCode() int
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.