models

package
v0.0.0-...-3b2578a Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	IP        string `json:"ip"`
	Port      int    `json:"port"`
	Password  string `json:"password"`
	CreatedAt string `json:"createdAt"`
	Status    int    `json:"status"` // 0:待部署, 1:部署中, 2:已部署成功, 3:无法连接, 4:部署失败
	Comment   string `json:"comment"`
}

type NodeList

type NodeList struct {
	Nodes []Node `json:"nodes"`
}

func (*NodeList) Deserialize

func (nl *NodeList) Deserialize() error

func (*NodeList) Remove

func (n *NodeList) Remove(index int) []Node

func (*NodeList) Serialize

func (n *NodeList) Serialize() error

func (*NodeList) UpdateNodeStatus

func (n *NodeList) UpdateNodeStatus(id, comment string, status int)

type Response

type Response struct {
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Response struct for http response

Jump to

Keyboard shortcuts

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