file

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchArgs

type SearchArgs struct {
	// Remote is the remote path.
	Remote string `json:"remote"`
	// Branch is the branch name.
	Branch string `json:"branch"`
	// Path is the file path.
	Path string `json:"path"`
}

SearchArgs contains the args.

type SearchReply

type SearchReply struct {
	// Content contains file content.
	Content string `json:"content"`
	// Entries contains directory entries.
	Entries []*fs.DirEntry `json:"entries"`
	// IsDir specifies if the file is a directory.
	IsDir bool `json:"is_dir"`
}

SearchReply contains the reply.

type Service

type Service struct {
	*remote.Server
}

Service wraps a remote and provides RPC.

func (*Service) Search

func (s *Service) Search(args *SearchArgs, reply *SearchReply) error

Search returns the contents of a file at the given remote path.

Jump to

Keyboard shortcuts

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