store

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpFile

func HttpFile(file fs.File) http.File

Types

type Dir

type Dir string

func (Dir) Open

func (d Dir) Open(name string) (fs.File, error)

func (Dir) ReadDir

func (d Dir) ReadDir(name string) ([]fs.DirEntry, error)

func (Dir) ReadFile

func (d Dir) ReadFile(name string) ([]byte, error)

type FS

type FS interface {
	Open(name string) (fs.File, error)
	ReadDir(name string) ([]fs.DirEntry, error)
	ReadFile(name string) ([]byte, error)
}

type Item

type Item struct {
	// contains filtered or unexported fields
}

func (*Item) Open

func (s *Item) Open(name string) (fs.File, error)

func (*Item) ReadDir

func (s *Item) ReadDir(name string) ([]fs.DirEntry, error)

func (*Item) ReadFile

func (s *Item) ReadFile(name string) ([]byte, error)

type Store

type Store struct {
	Items []*Item
	// contains filtered or unexported fields
}

func (*Store) Dir

func (s *Store) Dir(dir string, base string)

func (*Store) EmbedFS

func (s *Store) EmbedFS(fs embed.FS, base string)

func (*Store) Open

func (s *Store) Open(name string) (http.File, error)

func (*Store) OpenFile

func (s *Store) OpenFile(name string) (file fs.File, err error)

func (*Store) Zip

func (s *Store) Zip(zip string, base string)

type ZipFS

type ZipFS struct {
	Filename string
	// contains filtered or unexported fields
}

func (*ZipFS) Open

func (z *ZipFS) Open(name string) (file fs.File, err error)

func (*ZipFS) ReadDir

func (z *ZipFS) ReadDir(name string) (entries []fs.DirEntry, err error)

func (*ZipFS) ReadFile

func (z *ZipFS) ReadFile(name string) ([]byte, error)

Jump to

Keyboard shortcuts

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