asset

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFs

func NewFs(gh *github.Client, owner, repository, release string) afero.Fs

func Readdir

func Readdir(
	ctx context.Context,
	gh *github.Client,
	path ghpath.RepositoryPath,
	id int64,
	count int,
) ([]fs.FileInfo, error)

func Readdirnames

func Readdirnames(
	ctx context.Context,
	gh *github.Client,
	path ghpath.RepositoryPath,
	id int64,
	n int,
) ([]string, error)

Types

type File

type File struct {
	internal.ReadOnlyFile
	ghpath.ReleasePath
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, gh *github.Client, path ghpath.Path) (*File, error)

func (*File) Close

func (f *File) Close() error

Close implements afero.File.

func (*File) Name

func (f *File) Name() string

Name implements afero.File.

func (*File) Read

func (f *File) Read(p []byte) (n int, err error)

Read implements afero.File.

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (n int, err error)

ReadAt implements afero.File.

func (*File) Readdir

func (f *File) Readdir(count int) (infos []fs.FileInfo, err error)

Readdir implements afero.File.

func (*File) Readdirnames

func (f *File) Readdirnames(n int) ([]string, error)

Readdirnames implements afero.File.

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

Seek implements afero.File.

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

Stat implements afero.File.

type FileInfo

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

func Stat

func Stat(ctx context.Context, gh *github.Client, path ghpath.Path) (*FileInfo, error)

func (*FileInfo) IsDir

func (a *FileInfo) IsDir() bool

IsDir implements fs.FileInfo.

func (*FileInfo) ModTime

func (a *FileInfo) ModTime() time.Time

ModTime implements fs.FileInfo.

func (*FileInfo) Mode

func (a *FileInfo) Mode() fs.FileMode

Mode implements fs.FileInfo.

func (*FileInfo) Name

func (a *FileInfo) Name() string

Name implements fs.FileInfo.

func (*FileInfo) Size

func (a *FileInfo) Size() int64

Size implements fs.FileInfo.

func (*FileInfo) Sys

func (a *FileInfo) Sys() any

Sys implements fs.FileInfo.

type Fs

type Fs struct {
	internal.ReadOnlyFs
	ghpath.ReleasePath
	// contains filtered or unexported fields
}

func (*Fs) Name

func (f *Fs) Name() string

Name implements afero.Fs.

func (*Fs) Open

func (f *Fs) Open(name string) (afero.File, error)

Open implements afero.Fs.

func (*Fs) OpenFile

func (f *Fs) OpenFile(name string, _ int, _ fs.FileMode) (afero.File, error)

OpenFile implements afero.Fs.

func (*Fs) Stat

func (f *Fs) Stat(name string) (fs.FileInfo, error)

Stat implements afero.Fs.

Jump to

Keyboard shortcuts

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