Documentation
¶
Index ¶
- Constants
- type DeleteUploadRequest
- type GetUploadsRequest
- type GetUploadsResponse
- type LoginRequest
- type LoginResponse
- type PingResponse
- type Server
- func (srv *Server) DeleteUpload(ctx *context.Context)
- func (srv *Server) ExposeHttp(r *iris.Application)
- func (srv *Server) GetUploadList(ctx *context.Context)
- func (srv *Server) JwtHandler(cfg *ali_notifier.BackendConfig) *jwt_middleware.Middleware
- func (srv *Server) Login(ctx *context.Context)
- func (srv *Server) ReadJSON(ctx *context.Context, req interface{}) bool
- func (srv *Server) ReadQuery(ctx *context.Context, req interface{}) bool
- type StdResponse
- type UploadDTO
Constants ¶
View Source
const ( CodeOK int = iota CodeErr CodeInvalidParams CodeDBExecutionError CodeLoginNotConfigured CodeLoginNoSuchAccount CodeLoginWrongPassword CodeNoSuchId CodeNoSuchServer )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteUploadRequest ¶
type DeleteUploadRequest struct {
ID uint64 `json:"id"`
}
type GetUploadsRequest ¶
type GetUploadsResponse ¶
type LoginRequest ¶
type LoginResponse ¶
type PingResponse ¶
type Server ¶
type Server struct {
Logger *log.Logger
S suppress.ISuppress
DB *gorm.DB
Config *ali_notifier.BackendConfig
}
func (*Server) DeleteUpload ¶
func (*Server) ExposeHttp ¶
func (srv *Server) ExposeHttp(r *iris.Application)
func (*Server) GetUploadList ¶
func (*Server) JwtHandler ¶
func (srv *Server) JwtHandler(cfg *ali_notifier.BackendConfig) *jwt_middleware.Middleware
type StdResponse ¶
type UploadDTO ¶
type UploadDTO struct {
ID uint64 `json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"deleted_at"`
Status int `json:"status"`
DriveID string `json:"drive_id"`
RemotePath string `json:"remote_path"`
LocalPath string `json:"local_path"`
UploadID string `json:"upload_id"`
Hash string `json:"hash"`
PreHash string `json:"pre_hash"`
}
Click to show internal directories.
Click to hide internal directories.