Documentation ¶
Index ¶
- Constants
- type Bundle
- func (b *Bundle) AddFile(path string, file Opener)
- func (b *Bundle) GetBodyHtml() *string
- func (b *Bundle) GetFileAsStringByPath(path string) (*string, error)
- func (b *Bundle) GetFileByPath(path string) (io.ReadCloser, error)
- func (b *Bundle) GetFooterHtml() string
- func (b *Bundle) GetHeaderHtml() string
- func (b *Bundle) GetOptions() models.RenderOptions
- func (b *Bundle) ReadFromZip(file io.ReaderAt, size int64) error
- func (b *Bundle) TestIndexFile() error
- type BundleProviderService
- type BundleReader
- type CleanupFunc
- type MultipartFileOpener
- type Opener
- type OpenerFileProxy
Constants ¶
View Source
const ( BundleIndexFile = "index.html" BundleHeaderFile = "header.html" BundleOptionsFile = "options.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func (*Bundle) GetBodyHtml ¶
func (*Bundle) GetFileAsStringByPath ¶
func (*Bundle) GetFileByPath ¶
func (b *Bundle) GetFileByPath(path string) (io.ReadCloser, error)
func (*Bundle) GetFooterHtml ¶
func (*Bundle) GetHeaderHtml ¶
func (*Bundle) GetOptions ¶
func (b *Bundle) GetOptions() models.RenderOptions
func (*Bundle) ReadFromZip ¶
Read files from zip to intern map (path to file). This method can be called multiple times to assemble multiple zip bundles to one bundle.
func (*Bundle) TestIndexFile ¶
type BundleProviderService ¶
type BundleProviderService struct {
// contains filtered or unexported fields
}
func NewBundleProviderService ¶
func NewBundleProviderService() *BundleProviderService
func (*BundleProviderService) GetById ¶
func (bps *BundleProviderService) GetById(id uuid.UUID) (BundleReader, bool)
func (*BundleProviderService) Provide ¶
func (bps *BundleProviderService) Provide(bundle *Bundle) (id uuid.UUID, cleanup CleanupFunc)
func (*BundleProviderService) Remove ¶
func (bps *BundleProviderService) Remove(id uuid.UUID)
type BundleReader ¶
type CleanupFunc ¶
type CleanupFunc = func()
type MultipartFileOpener ¶
type Opener ¶
type Opener interface {
Open() (io.ReadCloser, error)
}
type OpenerFileProxy ¶
type OpenerFileProxy struct {
MultipartFileOpener MultipartFileOpener
}
func (*OpenerFileProxy) Open ¶
func (o *OpenerFileProxy) Open() (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.