Documentation ¶
Index ¶
- type ContentProvider
- func (provider *ContentProvider) Data(contentReader func(content io.ReadSeeker) error) error
- func (provider *ContentProvider) Hash() (string, error)
- func (provider *ContentProvider) LastHash() string
- func (provider *ContentProvider) LastModified() (time.Time, error)
- func (provider *ContentProvider) MimeType() (string, error)
- type ContentProviderInterface
- type DataProviderFunc
- type HashProviderFunc
- type LastModifiedProviderFunc
- type MimeTypeProviderFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentProvider ¶
type ContentProvider struct {
// contains filtered or unexported fields
}
func NewContentProvider ¶
func NewContentProvider(mimeType MimeTypeProviderFunc, data DataProviderFunc, hash HashProviderFunc, lastModified LastModifiedProviderFunc) (*ContentProvider, error)
NewContentProvider creates a new content provider with the given mimeType, data provider, hash provider and last modified provider.
func (*ContentProvider) Data ¶
func (provider *ContentProvider) Data(contentReader func(content io.ReadSeeker) error) error
func (*ContentProvider) Hash ¶
func (provider *ContentProvider) Hash() (string, error)
func (*ContentProvider) LastHash ¶ added in v0.10.0
func (provider *ContentProvider) LastHash() string
func (*ContentProvider) LastModified ¶
func (provider *ContentProvider) LastModified() (time.Time, error)
func (*ContentProvider) MimeType ¶
func (provider *ContentProvider) MimeType() (string, error)
type ContentProviderInterface ¶ added in v0.10.0
type DataProviderFunc ¶
type DataProviderFunc func(contentReader func(content io.ReadSeeker) error) error
type HashProviderFunc ¶
type MimeTypeProviderFunc ¶
Click to show internal directories.
Click to hide internal directories.