Documentation
¶
Index ¶
- type IPlugin
- type PluginImpl
- func (p *PluginImpl) AuthId() string
- func (p *PluginImpl) CheckAuth(*proto.AuthType) *proto.Status
- func (p *PluginImpl) Close()
- func (p *PluginImpl) GetAuthData() []byte
- func (p *PluginImpl) GetAuthType() *proto.AuthType
- func (p *PluginImpl) GetDirEntry(dir_path string, page uint64, page_size uint64) *proto.DirEntry
- func (p *PluginImpl) GetFileResource(file_path string) *proto.FileResource
- func (p *PluginImpl) Id() string
- func (p *PluginImpl) InitAuth([]byte) *proto.Status
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()
}
type PluginImpl ¶
type PluginImpl struct {
}
func (*PluginImpl) CheckAuth ¶
func (p *PluginImpl) CheckAuth(*proto.AuthType) *proto.Status
CheckAuth 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 ¶
GetDirEntry implements IPlugin.
func (*PluginImpl) GetFileResource ¶
func (p *PluginImpl) GetFileResource(file_path string) *proto.FileResource
GetFileResource implements IPlugin.
Click to show internal directories.
Click to hide internal directories.