Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockSize128KIB = 128 * 1024 BlockSize256KIB = 256 * 1024 BlockSize512KIB = 512 * 1024 BlockSize1MIB = 1 * 1024 * 1024 BlockSize2MIB = 2 * 1024 * 1024 BlockSize4MIB = 4 * 1024 * 1024 BlockSize8MIB = 8 * 1024 * 1024 BlockSize16MIB = 16 * 1024 * 1024 BlockSize32MIB = 32 * 1024 * 1024 )
Variables ¶
View Source
var ( ErrNoFindDriver = errors.New("不存在驱动") ErrNoSuperEncoder = errors.New("不支持编码器") ErrLoginFail = errors.New("登陆失败") ErrNoSuperBlockSize = errors.New("分块大小不支持") )
View Source
var ( ErrImageCorrupted error = errors.New("图片损坏") ErrImageFormat = errors.New("图片格式错误") ErrImageDecode = errors.New("图片解析错误") ErrNotFindEncoder = errors.New("无法找到编码器") )
View Source
var ( ErrParam = errors.New("参数错误") ErrNotFindCrypto = errors.New("无法找到加密器") )
Functions ¶
This section is empty.
Types ¶
type CryptoPlugin ¶
type CryptoPlugin interface { Name() string Encrypt(in []byte) (out []byte) Decrypt(in []byte) (out []byte) }
* * 加密插件
type DriverLoginPlugin ¶
type DriverPlugin ¶
type DriverPlugin interface { DriverPluginInfo DriverPluginSet DriverPluginAction DriverPluginUsable }
* * 驱动的插件
type DriverPluginAction ¶
type DriverPluginInfo ¶
type DriverPluginSet ¶
type DriverPluginSet interface { SetContext(ctx context.Context) DriverPlugin SetTimeOut(time time.Duration) DriverPlugin //设置超时 SetAttempt(t uint) DriverPlugin //设置重试次数 SetEncoder(name string) error //设置数据编码 SetCrypto(name string, param ...string) error // 设置加密 }
type DriverPluginUsable ¶
Click to show internal directories.
Click to hide internal directories.