client

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlainAuth

func PlainAuth(password string) func(string, io.ReadWriter) (string, error)

func Plan9Auth

func Plan9Auth(user string, s io.ReadWriter) (string, error)

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c io.ReadWriteCloser, user, aname string, opts ...Option) (*Client, error)

func (*Client) Create

func (c *Client) Create(name string, perm os.FileMode) (*File, error)

func (*Client) Open

func (c *Client) Open(path string, mode proto.Mode) (*File, error)

func (*Client) Readdir

func (c *Client) Readdir(path string) ([]proto.Stat, error)

func (*Client) Remove

func (c *Client) Remove(path string) error

func (*Client) Stat

func (c *Client) Stat(path string) (*proto.Stat, error)

func (*Client) WStat

func (c *Client) WStat(path string, stat *proto.Stat) error

type Config

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

type File

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

func (*File) Close

func (f *File) Close() error

func (*File) Read

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

func (*File) ReadAt

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

func (*File) Write

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

func (*File) WriteAt

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

type Option

type Option func(*Config)

func WithAuth

func WithAuth(f func(user string, s io.ReadWriter) (string, error)) Option

Jump to

Keyboard shortcuts

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