githubfs

package
v0.0.0-...-290cb81 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package githubfs provides an afero FS that's backed by github.com. Useful for testing against master for a repository, especially in cron.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() afero.Fs

New constructs an instance of GitHubFs. This is a readonly Fs, and calls to Read/Stat will fetch the file from github, before returning a readonly view into the newly fetched files.

Types

type Fs

type Fs struct {
	// readonly view into the backing fs.
	afero.Fs
	// contains filtered or unexported fields
}

Fs represents an in-memory filesystem backed by GitHub.

func (*Fs) Name

func (f *Fs) Name() string

Name returns the name of this FileSystem

func (*Fs) Open

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

Open opens a file, returning it or an error, if any happens.

func (*Fs) OpenFile

func (f *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

OpenFile opens a file using the given flags and the given mode.

func (*Fs) Stat

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

Stat returns a FileInfo describing the named file, or an error, if any happens.

Jump to

Keyboard shortcuts

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