adapter

package
v0.0.0-...-f5b796c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TaskExternalToModel

func TaskExternalToModel(p Task) task.PO

Types

type Data

type Data struct {
	Tasks []Task `json:"tasks"`
}

type Meta

type Meta struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Request

type Request struct {
	Task `json:"task"`
}

type Response

type Response struct {
	Meta Meta `json:"meta"`
	Data Data `json:"data"`
}

type Task

type Task struct {
	ID          string `json:"id"`
	Address     string `json:"address"`
	User        string `json:"user"`
	Password    string `json:"password"`
	SourcePath  string `json:"sourcePath"`
	DestPath    string `json:"destPath"`
	Schedule    string `json:"schedule"`
	Backend     string `json:"backend"`
	Succeed     bool   `json:"succeed"`
	Enabled     bool   `json:"enabled"`
	CreatedTime int64  `json:"createdTime"`
	UpdatedTime int64  `json:"updatedTime"`
}

func TaskModelToExternal

func TaskModelToExternal(p task.PO) Task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL