Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gorm ¶
type Gorm interface { // GetSources 获取主库的 gorm.Dialector 切片对象 GetSources() (directories []gorm.Dialector) // GetReplicas 获取从库库的 gorm.Dialector 切片对象 GetReplicas() (directories []gorm.Dialector) // GetResolver 通过主库与从库的链接组装 gorm.Plugin GetResolver() gorm.Plugin // GetGormDialector 获取数据库的 gorm.Dialector GetGormDialector(dsn string) gorm.Dialector // GetConfigPath 设置配置文件路径 GetConfigPath() string }
type GormConfig ¶
type GormConfigGeneral ¶
type Oss ¶
type Oss interface { // DeleteByKey 通过 key(唯一标识) 删除在oss上的文件 DeleteByKey(key string) error // UploadByFile 方便使用 os.File 数据上传oss UploadByFile(file multipart.File) (filepath string, filename string, err error) // UploadByFilepath 通过文件路径上传文件到oss UploadByFilepath(path string) (filepath string, filename string, err error) // UploadByFileHeader 方便从http框架接收到的 multipart.FileHeader 数据上传oss UploadByFileHeader(header *multipart.FileHeader) (filepath string, filename string, err error) }
type Plugin ¶
type Plugin interface { // RouterPath 用户返回注册路由 RouterPath() string // Register 注册路由 Register(group *ghttp.RouterGroup) }
Plugin 插件模式接口化
Click to show internal directories.
Click to hide internal directories.