Documentation ¶
Index ¶
- type Html
- type Reader
- type Redirect
- type Resp
- func (r *Resp) Append(header def.ReadHeader) map[string]string
- func (r *Resp) Code() int
- func (r *Resp) ContentType() string
- func (r *Resp) Register() []reflect.Type
- func (r *Resp) Return() io.Reader
- func (r *Resp) SetCode(code int) *Resp
- func (r *Resp) SetContentType(contentType string) *Resp
- func (r *Resp) SetHeader(header map[string]string) *Resp
- func (r *Resp) SetReader(reader io.Reader) *Resp
- func (r *Resp) SetSerialize(serialize def.Serialize) *Resp
- type Stream
- func (s *Stream) AddHeader(k, v string)
- func (s *Stream) Append(header def.ReadHeader) map[string]string
- func (s *Stream) Close() error
- func (s *Stream) Code() int
- func (s *Stream) ContentType() string
- func (s *Stream) Read(p []byte) (n int, err error)
- func (s *Stream) Register() []reflect.Type
- func (s *Stream) Return() io.Reader
- func (s *Stream) SetContentType(conTyp string)
- func (s *Stream) SetName(name string) *Stream
- func (s *Stream) SetRateLimit(bytesPerSec float64) *Stream
- func (s *Stream) Strings() string
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Html ¶ added in v0.1.0
type Html struct {
// contains filtered or unexported fields
}
func (*Html) ContentType ¶ added in v0.1.0
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReaderWithContext ¶
NewReaderWithContext returns a reader that implements io.Reader with rate limiting.
func (*Reader) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the reader.
type Redirect ¶ added in v0.1.0
type Redirect struct {
// contains filtered or unexported fields
}
func NewRedirect ¶ added in v0.1.0
func (*Redirect) Append ¶ added in v0.1.0
func (r *Redirect) Append(header def.ReadHeader) map[string]string
func (*Redirect) ContentType ¶ added in v0.1.0
type Resp ¶ added in v0.1.0
type Resp struct {
// contains filtered or unexported fields
}
func (*Resp) Append ¶ added in v0.1.0
func (r *Resp) Append(header def.ReadHeader) map[string]string
Append implements def.AppendHeader. ReadOnly
func (*Resp) ContentType ¶ added in v0.1.0
ContentType implements def.RetAdapter. ReadOnly
func (*Resp) SetContentType ¶ added in v0.1.0
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) ContentType ¶
func (*Stream) SetContentType ¶
func (*Stream) SetRateLimit ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriterWithContext ¶
NewWriterWithContext returns a writer that implements io.Writer with rate limiting.
func (*Writer) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the writer.
Click to show internal directories.
Click to hide internal directories.