app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupPocketbase

func SetupPocketbase(storagePath string) *pocketbase.PocketBase

Types

type Application

type Application interface {
	Start() error
}

Application is the interface for the application

func NewApplication

func NewApplication() Application

NewApplication creates a new application

type InMemoryFile

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

InMemoryFile represents an in-memory file.

func NewInMemoryFile

func NewInMemoryFile(name string, content []byte) *InMemoryFile

NewInMemoryFile creates a new in-memory file.

func (*InMemoryFile) Read

func (f *InMemoryFile) Read(b []byte) (n int, err error)

Read reads data from the in-memory file.

func (*InMemoryFile) Stat

func (f *InMemoryFile) Stat() (os.FileInfo, error)

Stat returns the file's information.

type InMemoryFileInfo

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

InMemoryFileInfo implements os.FileInfo for in-memory files.

func (*InMemoryFileInfo) IsDir

func (fi *InMemoryFileInfo) IsDir() bool

IsDir returns whether the file is a directory.

func (*InMemoryFileInfo) ModTime

func (fi *InMemoryFileInfo) ModTime() time.Time

ModTime returns the modification time of the file.

func (*InMemoryFileInfo) Mode

func (fi *InMemoryFileInfo) Mode() os.FileMode

Mode returns the file's mode.

func (*InMemoryFileInfo) Name

func (fi *InMemoryFileInfo) Name() string

Name returns the name of the file.

func (*InMemoryFileInfo) Size

func (fi *InMemoryFileInfo) Size() int64

Size returns the size of the file.

func (*InMemoryFileInfo) Sys

func (fi *InMemoryFileInfo) Sys() interface{}

Sys returns the underlying data source.

type InMemoryFileSystem

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

InMemoryFileSystem implements the sftp.FileSystem interface.

func NewInMemoryFileSystem

func NewInMemoryFileSystem() *InMemoryFileSystem

NewInMemoryFileSystem creates a new in-memory file system.

func (*InMemoryFileSystem) AddFile

func (fs *InMemoryFileSystem) AddFile(name string, content []byte)

AddFile adds a new file to the in-memory file system.

func (*InMemoryFileSystem) List

func (fs *InMemoryFileSystem) List(path string) (sftp.ListerAt, error)

type ListerAt

type ListerAt []os.FileInfo

func (ListerAt) ListAt

func (l ListerAt) ListAt(f []os.FileInfo, offset int64) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳