Documentation
¶
Index ¶
- func CreateMultipartFileHeader(filename string, body []byte) *multipart.FileHeader
- type Builder
- func (b *Builder) AddField(fieldName, value string) *Builder
- func (b *Builder) AddFile(fieldName, filePath string) *Builder
- func (b *Builder) AddReader(fieldName, fileName string, reader io.Reader) *Builder
- func (b *Builder) Build() (string, io.ReadCloser)
- func (b *Builder) BuildEventFuncRequest() (r *http.Request)
- func (b *Builder) Event(evt Event) *Builder
- func (b *Builder) EventFunc(id string) *Builder
- func (b *Builder) PageURL(url string) *Builder
- func (b *Builder) Queries(v url.Values) *Builder
- func (b *Builder) Query(key string, value string) *Builder
- type Event
- type EventFuncID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMultipartFileHeader ¶
func CreateMultipartFileHeader(filename string, body []byte) *multipart.FileHeader
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a multipart builder. It is not thread-safe.
func NewMultipartBuilder ¶
func NewMultipartBuilder() *Builder
New constructs new multipart Builder.
func (*Builder) Build ¶
func (b *Builder) Build() (string, io.ReadCloser)
Build finalizes Builder, returning Content-Type and multipart reader. It should be called only once for Builder. Returned reader should be used (Read/Close) at least once to clean up properly. Any errors are bound to returned reader (will be returned on Read/Close).
func (*Builder) BuildEventFuncRequest ¶
type EventFuncID ¶
Click to show internal directories.
Click to hide internal directories.