Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTask ¶
type RespCode ¶
type RespCode int
const ( CodeOk RespCode = 0 // CodeError is the common error code CodeError RespCode = 1000 CodeUnauthorized RespCode = 1001 // CodeInvalidParam is the error code for invalid parameter CodeInvalidParam RespCode = 1002 // CodeTaskNotFound is the error code for task not found CodeTaskNotFound RespCode = 2001 )
type Result ¶
type Result[T any] struct { Code RespCode `json:"code"` Msg string `json:"msg"` Data T `json:"data"` }
func NewNilResult ¶
func NewOkResult ¶
type StartConfig ¶
type StartConfig struct {
Network string `json:"network"`
Address string `json:"address"`
RefreshInterval int `json:"refreshInterval"`
Storage Storage `json:"storage"`
StorageDir string `json:"storageDir"`
ApiToken string `json:"apiToken"`
WebEnable bool
WebFS fs.FS
}
func (*StartConfig) Init ¶
func (cfg *StartConfig) Init() *StartConfig
Click to show internal directories.
Click to hide internal directories.