gitiles

package
v0.0.0-...-bc12874 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS implements vfs.FS using Gitiles for a particular revision.

func New

func New(ctx context.Context, repo gitiles.GitilesRepo, ref string) (*FS, error)

New returns a vfs.FS using Gitiles at the given revision.

func (*FS) BaseCommit

func (fs *FS) BaseCommit() string

BaseCommit returns the commit referenced by this FS.

func (*FS) Changes

func (fs *FS) Changes() map[string][]byte

Changes returns any changes to the FS.

func (*FS) Close

func (fs *FS) Close(_ context.Context) error

Close implements vfs.FS.

func (*FS) Create

func (fs *FS) Create(ctx context.Context, name string) (vfs.File, error)

Create implements vfs.FS.

func (*FS) Open

func (fs *FS) Open(ctx context.Context, name string) (vfs.File, error)

Open implements vfs.FS.

type File

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

File implements vfs.File using Gitiles for a particular revision.

func (*File) Close

func (f *File) Close(_ context.Context) error

Close implements vfs.File.

func (*File) Read

func (f *File) Read(ctx context.Context, buf []byte) (int, error)

Read implements vfs.File.

func (*File) ReadDir

func (f *File) ReadDir(ctx context.Context, n int) ([]os.FileInfo, error)

ReadDir implements vfs.File.

func (*File) Stat

func (f *File) Stat(ctx context.Context) (os.FileInfo, error)

Stat implements vfs.File.

func (*File) Write

func (f *File) Write(ctx context.Context, b []byte) (int, error)

Write implements vfs.File.

Jump to

Keyboard shortcuts

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