youplus

package
v0.0.0-...-35b844d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Info *FileInfo `json:"info"`
	// contains filtered or unexported fields
}

func NewFile

func NewFile(fs *FileSystemClient, path string) *File

func (*File) Close

func (f *File) Close() error

func (*File) Name

func (f *File) Name() string

func (*File) Read

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

func (*File) ReadAt

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

func (*File) Readdir

func (f *File) Readdir(count int) ([]os.FileInfo, error)

func (*File) Readdirnames

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

func (*File) Seek

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

func (*File) Stat

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

func (*File) Sync

func (f *File) Sync() error

func (*File) Truncate

func (f *File) Truncate(size int64) error

func (*File) Write

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

func (*File) WriteAt

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

func (*File) WriteString

func (f *File) WriteString(s string) (ret int, err error)

type FileInfo

type FileInfo struct {
	FileName    string `json:"name"`
	FileSize    int64  `json:"size"`
	FileMode    uint32 `json:"mode"`
	FileModTime string `json:"modTime"`
	FileIsDir   bool   `json:"isDir"`
}

func (*FileInfo) IsDir

func (i *FileInfo) IsDir() bool

func (*FileInfo) ModTime

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

func (*FileInfo) Mode

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

func (*FileInfo) Name

func (i *FileInfo) Name() string

func (*FileInfo) Size

func (i *FileInfo) Size() int64

func (*FileInfo) Sys

func (i *FileInfo) Sys() any

type FileSystemClient

type FileSystemClient struct {
	Auth string
	// contains filtered or unexported fields
}

func (*FileSystemClient) Chmod

func (c *FileSystemClient) Chmod(name string, mode os.FileMode) error

func (*FileSystemClient) Chown

func (c *FileSystemClient) Chown(name string, uid, gid int) error

func (*FileSystemClient) Chtimes

func (c *FileSystemClient) Chtimes(name string, atime time.Time, mtime time.Time) error

func (*FileSystemClient) Create

func (c *FileSystemClient) Create(name string) (afero.File, error)

func (*FileSystemClient) Mkdir

func (c *FileSystemClient) Mkdir(name string, perm os.FileMode) error

func (*FileSystemClient) MkdirAll

func (c *FileSystemClient) MkdirAll(path string, perm os.FileMode) error

func (*FileSystemClient) Name

func (c *FileSystemClient) Name() string

func (*FileSystemClient) Open

func (c *FileSystemClient) Open(name string) (afero.File, error)

func (*FileSystemClient) OpenFile

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

func (*FileSystemClient) Remove

func (c *FileSystemClient) Remove(name string) error

func (*FileSystemClient) RemoveAll

func (c *FileSystemClient) RemoveAll(path string) error

func (*FileSystemClient) Rename

func (c *FileSystemClient) Rename(oldname, newname string) error

func (*FileSystemClient) Stat

func (c *FileSystemClient) Stat(name string) (os.FileInfo, error)

type Plugin

type Plugin struct {
	RPCClient     *youplustoolkitrpc.YouPlusRPCClient
	Client        *youplus.Client
	Entity        *entry.EntityClient
	AuthUrl       string
	AuthFromToken func(token string) (commons.AuthUser, error)
}

func (*Plugin) AuthName

func (p *Plugin) AuthName() string

func (*Plugin) GetAuthInfo

func (p *Plugin) GetAuthInfo() (*commons.AuthInfo, error)

func (*Plugin) GetAuthUserByToken

func (p *Plugin) GetAuthUserByToken(token string) (commons.AuthUser, error)

func (*Plugin) OnInit

func (p *Plugin) OnInit(e *harukap.HarukaAppEngine) error

func (*Plugin) TokenTypeName

func (p *Plugin) TokenTypeName() string

Jump to

Keyboard shortcuts

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