container

package
v0.0.0-...-0707337 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GuessContainerType

func GuessContainerType(ctx context.Context, name string, info fs.FileInfo) (t meta.ContainerType, valid bool)

Types

type Container

type Container interface {
	Download(ctx context.Context) (reader io.ReadCloser, filename string, err error)
	ListItems(ctx context.Context) (names []string, err error)
	OpenItem(ctx context.Context, index int) (reader io.ReadCloser, name string, err error)
	PopulateImageIndices(ctx context.Context) error
}

func CreateContainer

func CreateContainer(m *ent.Meta) (c Container, err error)

type DirectoryContainer

type DirectoryContainer struct {
	Meta *ent.Meta
}

func (*DirectoryContainer) Download

func (c *DirectoryContainer) Download(ctx context.Context) (reader io.ReadCloser, filename string, err error)

func (*DirectoryContainer) ListItems

func (c *DirectoryContainer) ListItems(ctx context.Context) (names []string, err error)

func (*DirectoryContainer) OpenItem

func (c *DirectoryContainer) OpenItem(ctx context.Context, index int) (reader io.ReadCloser, name string, err error)

func (*DirectoryContainer) PopulateImageIndices

func (c *DirectoryContainer) PopulateImageIndices(ctx context.Context) error

type ZipContainer

type ZipContainer struct {
	Meta *ent.Meta
}

func (*ZipContainer) Download

func (c *ZipContainer) Download(ctx context.Context) (reader io.ReadCloser, filename string, err error)

func (*ZipContainer) ListItems

func (c *ZipContainer) ListItems(ctx context.Context) (names []string, err error)

func (*ZipContainer) OpenItem

func (c *ZipContainer) OpenItem(ctx context.Context, index int) (reader io.ReadCloser, name string, err error)

func (*ZipContainer) PopulateImageIndices

func (c *ZipContainer) PopulateImageIndices(ctx context.Context) error

Jump to

Keyboard shortcuts

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