Content is an interface used for putting the content into Client Query.
type Content interface { ContentType() string Method() string Data() []byte }
func NewHTMLFile(path string) (Content, error)
NewHTMLFile creates new Content htmFile for provided input path.
func NewWebURL(path string) (Content, error)
NewWebURL creates new Content webURL for provided input URL path.
func NewZipDirectory(dirPath string) (Content, error)
NewZipDirectory creates new zip compressed file that recursively reads the directory at the 'dirPath' and stores in it's in-memory buffer.
StringContent implements Content interface for an HTML string.
type StringContent struct {
// contains filtered or unexported fields
}
func NewStringContent(html string) (*StringContent, error)
NewStringContent creates a new StringContent.
func (sc *StringContent) ContentType() string
ContentType implements Content interface.
func (sc *StringContent) Data() []byte
Data implements Content interface.
func (sc *StringContent) Method() string
Method implements Content interface.