plugin

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPlugin

type IPlugin interface {
	// plugin id
	Id() string
	// get auth type like form edit,qrcode,oauth2
	GetAuthType() *proto.AuthType
	// check auth data status
	CheckAuth(*proto.AuthType) *proto.Status
	// get auth data when check auth status is success
	GetAuthData() []byte
	// use auth data init auth
	InitAuth([]byte) *proto.Status
	// plugin auth id,it need unqiue for same driver
	AuthId() string
	// get dir entry from driver plugin
	GetDirEntry(dir_path string, page, page_size uint64) *proto.DirEntry
	// get file entry resource from driver plugin
	GetFileResource(file_path string) *proto.FileResource
	// close driver plugin
	Close()
}

func NewPlugin

func NewPlugin() IPlugin

type PluginImpl

type PluginImpl struct {
}

func (*PluginImpl) AuthId

func (p *PluginImpl) AuthId() string

AuthId implements IPlugin.

func (*PluginImpl) CheckAuth

func (p *PluginImpl) CheckAuth(*proto.AuthType) *proto.Status

CheckAuth implements IPlugin.

func (*PluginImpl) Close

func (p *PluginImpl) Close()

Close implements IPlugin.

func (*PluginImpl) GetAuthData

func (p *PluginImpl) GetAuthData() []byte

GetAuthData implements IPlugin.

func (*PluginImpl) GetAuthType

func (p *PluginImpl) GetAuthType() *proto.AuthType

GetAuthType implements IPlugin.

func (*PluginImpl) GetDirEntry

func (p *PluginImpl) GetDirEntry(dir_path string, page uint64, page_size uint64) *proto.DirEntry

GetDirEntry implements IPlugin.

func (*PluginImpl) GetFileResource

func (p *PluginImpl) GetFileResource(file_path string) *proto.FileResource

GetFileResource implements IPlugin.

func (*PluginImpl) Id

func (p *PluginImpl) Id() string

Id implements IPlugin.

func (*PluginImpl) InitAuth

func (p *PluginImpl) InitAuth([]byte) *proto.Status

InitAuth implements IPlugin.

Jump to

Keyboard shortcuts

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