response

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Id          int64      `json:"id,omitempty"`
	Name        string     `json:"name,omitempty"`
	Namespace   string     `json:"namespace,omitempty"`
	Description string     `json:"description,omitempty"`
	User        string     `json:"user,omitempty"`
	Deleted     bool       `json:"deleted,omitempty"`
	CreateTime  *time.Time `json:"createTime,omitempty"`
	UpdateTime  *time.Time `json:"updateTime,omitempty"`
}

type ContainerStatus

type ContainerStatus struct {
	Name         string `json:"name,omitempty"`
	RestartCount int32  `json:"restartCount"`
}

type Deployment

type Deployment struct {
	Name       string            `json:"name,omitempty"`
	Namespace  string            `json:"namespace,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
	CreateTime time.Time         `json:"createTime,omitempty"`
	PodsState  PodInfo           `json:"podState,omitempty"`
}

type Failure

type Failure struct {
	// in: body
	// Required: true
	Body struct {
		ResponseBase
		Errors []string `json:"errors"`
	}
}

OpenAPI 通用 失败 返回接口 swagger:response responseState

type NamesObject added in v1.3.0

type NamesObject struct {
	Id   int64  `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

for getnames api

type Namespace

type Namespace struct {
	Id         int64      `json:"id"`
	Name       string     `json:"name"`
	CreateTime *time.Time `json:"createTime"`
	UpdateTime *time.Time `json:"updateTime"`
	User       string     `json:"user"`
}

type Pod

type Pod struct {
	Name            string            `json:"name,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
	ContainerStatus []ContainerStatus `json:"containerStatus,omitempty"`
	State           string            `json:"state,omitempty"`
	PodIp           string            `json:"podIp,omitempty"`
	NodeName        string            `json:"nodeName,omitempty"`
	StartTime       *time.Time        `json:"startTime,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
}

type PodInfo

type PodInfo struct {
	Current   int32    `json:"current"`
	Desired   int32    `json:"desired"`
	Running   int32    `json:"running"`
	Pending   int32    `json:"pending"`
	Failed    int32    `json:"failed"`
	Succeeded int32    `json:"succeeded"`
	Warnings  []string `json:"warnings"`
}

type Port

type Port struct {
	Port       string   `json:"port,omitempty"`
	TargetPort string   `json:"targetPort,omitempty"`
	NodePort   string   `json:"nodePort,omitempty"`
	Endpoints  []string `json:"endpoints,omitempty"`
}

type Resource

type Resource struct {
	Type         models.PublishType   `json:"type"`
	ResourceId   int64                `json:"resourceId,omitempty"`
	ResourceName string               `json:"resourceName,omitempty"`
	TemplateId   int64                `json:"templateId,omitempty"`
	Cluster      string               `json:"cluster,omitempty"`
	Status       models.ReleaseStatus `json:"status,omitempty"`
	Message      string               `json:"message,omitempty"`
	Object       interface{}          `json:"object,omitempty"` // 用于存储 kubernetes 资源对象的配置细节
}

type ResponseBase

type ResponseBase struct {
	Code int `json:"code"`
}

type Service

type Service struct {
	Name           string            `json:"name,omitempty"`
	Labels         map[string]string `json:"labels,omitempty"`
	Selector       map[string]string `json:"selector,omitempty"`
	Type           string            `json:"type,omitempty"`
	LoadBalancerIP string            `json:"loadBalancerIp,omitempty"`
	IP             string            `json:"ip,omitempty"`
	ExternalIP     []string          `json:"externalIp,omitempty"`
	Ports          []Port            `json:"ports,omitempty"`
}

type Success

type Success struct {
	// in: body
	// Required: true
	Body struct {
		ResponseBase
	}
}

OpenAPI 通用 成功 返回接口 swagger:response responseSuccess

type User

type User struct {
	Name    string   `json:"name,omitempty"`
	Email   string   `json:"email,omitempty"`
	Display string   `json:"display,omitempty"`
	Roles   []string `json:"roles,omitempty"`
}

func (*User) LoadFromModel

func (u *User) LoadFromModel(m models.User)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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