internal

package
v0.0.0-...-95995d7 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package internal GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeferWriter

func DeferWriter(createWriter func() (io.Writer, error)) io.Writer

func NewRequest

func NewRequest(ctx context.Context, method string, path string, v any) (*http.Request, error)

func Pipe

func Pipe(w func(w io.Writer) error, r func(r io.Reader) error) error

func ReadCloseWithHeader

func ReadCloseWithHeader(rc io.ReadCloser, h http.Header) interface {
	io.ReadCloser
	HeaderGetter
}

func Register

func Register(creator TransformerProvider)

func UnmarshalRequest

func UnmarshalRequest(req *http.Request, out any) error

func UnmarshalRequestInfo

func UnmarshalRequestInfo(ireq httprequest.Request, out any) error

Types

type Content

type Content interface {
	GetContentType() string
	GetContentLength() int64

	io.ReadCloser
}

type ContentLengthSetter

type ContentLengthSetter interface {
	SetContentLength(l int64)
}

type ContentProvider

type ContentProvider interface {
	Prepare(ctx context.Context, src any) (Content, error)
}

type ContentReader

type ContentReader interface {
	ReadAs(ctx context.Context, r io.ReadCloser, v any) error
}

type ContentTypeGetter

type ContentTypeGetter interface {
	ContentType() string
}

type ContentTypeSetter

type ContentTypeSetter interface {
	SetContentType(contentType string)
}

type FilenameGetter

type FilenameGetter interface {
	Filename() string
}

type FilenameSetter

type FilenameSetter interface {
	SetFilename(f string)
}

type HeaderGetter

type HeaderGetter interface {
	Header() http.Header
}

type ParamValue

type ParamValue struct {
	reflect.Value
}

func (*ParamValue) AddrValues

func (p *ParamValue) AddrValues(sf *jsonflags.StructField, n int) iter.Seq2[int, reflect.Value]

func (*ParamValue) CanMultiple

func (p *ParamValue) CanMultiple(sf *jsonflags.StructField) bool

func (*ParamValue) MarshalValues

func (p *ParamValue) MarshalValues(ctx context.Context, sf *jsonflags.StructField) (values []string, err error)

func (ParamValue) RuntimeDoc

func (v ParamValue) RuntimeDoc(names ...string) ([]string, bool)

func (*ParamValue) UnmarshalReaders

func (p *ParamValue) UnmarshalReaders(ctx context.Context, sf *jsonflags.StructField, readers []io.ReadCloser) error

func (*ParamValue) UnmarshalValues

func (p *ParamValue) UnmarshalValues(ctx context.Context, sf *jsonflags.StructField, values []string) error

func (*ParamValue) Values

type ReadCloserFrom

type ReadCloserFrom interface {
	ReadFromCloser(r io.ReadCloser) (n int64, err error)
}

type Request

type Request struct {
	ParamValue
}

func (*Request) MarshalRequest

func (p *Request) MarshalRequest(ctx context.Context, method string, path pathpattern.Segments) (*http.Request, error)

func (Request) RuntimeDoc

func (v Request) RuntimeDoc(names ...string) ([]string, bool)

func (*Request) UnmarshalRequest

func (p *Request) UnmarshalRequest(req *http.Request) error

func (*Request) UnmarshalRequestInfo

func (p *Request) UnmarshalRequestInfo(r httprequest.Request) error

type Transformer

type Transformer interface {
	MediaType() string

	ContentReader
	ContentProvider
}

func New

func New(typ reflect.Type, mediaTypeOrAlias string, action string) (Transformer, error)

type TransformerProvider

type TransformerProvider interface {
	Names() []string
	Transformer() (Transformer, error)
}

Jump to

Keyboard shortcuts

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