model

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Number    int       `json:"number"`
	Status    string    `json:"status"`
	Result    string    `json:"result"`
	Timestamp time.Time `json:"timestamp"`
	Duration  int64     `json:"duration"` // 毫秒
	URL       string    `json:"url"`
}

Build 构建模型

type Database

type Database struct {
	ID            string            `json:"id"`
	Name          string            `json:"name"`
	Provider      string            `json:"provider"`
	Region        string            `json:"region"`
	Engine        string            `json:"engine"` // mysql, postgresql, redis
	EngineVersion string            `json:"engine_version"`
	Status        string            `json:"status"`
	Endpoint      string            `json:"endpoint"`
	Port          int               `json:"port"`
	CreatedAt     time.Time         `json:"created_at"`
	Tags          map[string]string `json:"tags"`
	ConsoleURL    string            `json:"console_url"` // 控制台跳转地址
}

Database 数据库模型

type DatabaseList

type DatabaseList struct {
	Items    []*Database `json:"items"`
	PageInfo *PageInfo   `json:"page_info,omitempty"`
}

DatabaseList 数据库列表

type Instance

type Instance struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Provider     string            `json:"provider"`      // 提供商: aliyun, tencent
	Region       string            `json:"region"`        // 区域
	Zone         string            `json:"zone"`          // 可用区
	InstanceType string            `json:"instance_type"` // 实例规格
	Status       string            `json:"status"`        // 状态
	PrivateIP    []string          `json:"private_ip"`
	PublicIP     []string          `json:"public_ip"`
	CPU          int               `json:"cpu"`
	Memory       int               `json:"memory"` // MB
	OSType       string            `json:"os_type"`
	OSName       string            `json:"os_name"`
	CreatedAt    time.Time         `json:"created_at"`
	ExpiredAt    *time.Time        `json:"expired_at,omitempty"`
	Tags         map[string]string `json:"tags"`
	Metadata     map[string]any    `json:"metadata"`    // 扩展字段
	ConsoleURL   string            `json:"console_url"` // 控制台跳转地址
}

Instance 统一的实例模型 (跨云平台)

type InstanceList

type InstanceList struct {
	Items    []*Instance `json:"items"`
	PageInfo *PageInfo   `json:"page_info,omitempty"`
}

InstanceList 实例列表

type Job

type Job struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	URL         string `json:"url"`
	Description string `json:"description"`
	Buildable   bool   `json:"buildable"`
	LastBuild   *Build `json:"last_build,omitempty"`
}

Job Jenkins 任务模型

type JobList

type JobList struct {
	Items    []*Job    `json:"items"`
	PageInfo *PageInfo `json:"page_info,omitempty"`
}

JobList 任务列表

type ListResponse

type ListResponse struct {
	Items    any       `json:"items"`
	PageInfo *PageInfo `json:"page_info,omitempty"`
}

ListResponse 列表响应

type OSSBucket added in v0.1.1

type OSSBucket struct {
	Name         string         `json:"name"`
	Provider     string         `json:"provider"`      // 提供商: aliyun, tencent
	Region       string         `json:"region"`        // 区域
	StorageClass string         `json:"storage_class"` // 存储类型
	ACL          string         `json:"acl"`           // 访问控制
	CreatedAt    string         `json:"created_at"`
	Metadata     map[string]any `json:"metadata"`    // 扩展字段
	ConsoleURL   string         `json:"console_url"` // 控制台跳转地址
}

OSSBucket 统一的 OSS Bucket 模型 (跨云平台)

type OSSBucketList added in v0.1.1

type OSSBucketList struct {
	Items    []*OSSBucket `json:"items"`
	PageInfo *PageInfo    `json:"page_info,omitempty"`
}

OSSBucketList Bucket 列表

type PageInfo

type PageInfo struct {
	PageNum   int `json:"page_num"`
	PageSize  int `json:"page_size"`
	Total     int `json:"total"`
	TotalPage int `json:"total_page"`
}

PageInfo 分页信息

type Response

type Response struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data,omitempty"`
}

Response 通用响应结构

type TimeRange

type TimeRange struct {
	StartTime time.Time `json:"start_time"`
	EndTime   time.Time `json:"end_time"`
}

TimeRange 时间范围

Jump to

Keyboard shortcuts

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