model

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.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 Account

type Account struct {
	Uin              int    `json:"Uin"`
	Password         string `json:"Password"`
	Protocol         string `json:"Protocol"`
	AutoReconnect    bool   `json:"AutoReconnect"`
	GetOptimumServer bool   `json:"GetOptimumServer"`
}

type AppSettings

type AppSettings struct {
	Logging         *Logging          `json:"Logging"`
	SignServerURL   string            `json:"SignServerUrl"`
	Account         *Account          `json:"Account"`
	Message         *Message          `json:"Message"`
	Implementations []*Implementation `json:"Implementations"`
}

type Artifact

type Artifact struct {
	ID                 int64        `json:"id"`
	NodeID             string       `json:"node_id"`
	Name               string       `json:"name"`
	SizeInBytes        int64        `json:"size_in_bytes"`
	URL                string       `json:"url"`
	ArchiveDownloadURL string       `json:"archive_download_url"`
	Expired            bool         `json:"expired"`
	CreatedAt          time.Time    `json:"created_at"`
	UpdatedAt          time.Time    `json:"updated_at"`
	ExpiresAt          time.Time    `json:"expires_at"`
	WorkflowRun        *WorkflowRun `json:"workflow_run"`
}

type ArtifactAction

type ArtifactAction struct {
	TotalCount int64       `json:"total_count"`
	Artifacts  []*Artifact `json:"artifacts"`
}

type Client added in v0.1.0

type Client struct {
	// 客户端ID
	AppId string `json:"app_id"`
	// 客户端名称
	ClientName string `json:"client_name,omitempty"`
}

type Config

type Config struct {
	Log              *Log                `yaml:"log"`
	NTQQImpl         *NTQQImpl           `yaml:"ntqq-impl"`
	Http             *Http               `yaml:"http"`
	WebSocket        *WebSocket          `yaml:"web-socket"`
	ReverseWebSocket []*ReverseWebSocket `yaml:"reverse-web-socket"`
	HttpPost         []*HttpPost         `yaml:"http-post"`
	MsgExpireTime    time.Duration       `yaml:"msg-expire-time,omitempty"`
}

type HeartBeat

type HeartBeat struct {
	MetaData
	Interval        int              `json:"interval"`
	HeartBeatStatus *HeartBeatStatus `json:"status"`
}

type HeartBeatStatus

type HeartBeatStatus struct {
	AppInitialized bool `json:"app_initialized"`
	AppEnabled     bool `json:"app_enabled"`
	AppGood        bool `json:"app_good"`
	Online         bool `json:"online"`
	Good           bool `json:"good"`
}

type Http

type Http struct {
	Port int `yaml:"port,omitempty"`
}

type HttpPost added in v0.2.5

type HttpPost struct {
	Url    string `yaml:"url,omitempty"`
	Secret string `yaml:"secret,omitempty"`
}

type Implementation

type Implementation struct {
	Type              string `json:"Type"`
	Host              string `json:"Host"`
	Port              int    `json:"Port"`
	Suffix            string `json:"Suffix"`
	ReconnectInterval int    `json:"ReconnectInterval"`
	HeartBeatInterval int    `json:"HeartBeatInterval"`
	AccessToken       string `json:"AccessToken"`
}

type Log

type Log struct {
	ForceNew bool          `yaml:"force-new,omitempty"`
	Level    string        `yaml:"level,omitempty"`
	Aging    time.Duration `yaml:"aging,omitempty"`
	Colorful bool          `yaml:"colorful,omitempty"`
}

type LogLevel

type LogLevel struct {
	Default                  string `json:"Default"`
	Microsoft                string `json:"Microsoft"`
	MicrosoftHostingLifetime string `json:"Microsoft.Hosting.Lifetime"`
}

type Logging

type Logging struct {
	LogLevel *LogLevel `json:"LogLevel"`
}

type Message

type Message struct {
	IgnoreSelf bool `json:"IgnoreSelf"`
}

type MetaData

type MetaData struct {
	MetaEventType string `json:"meta_event_type"`
	Time          int    `json:"time"`
	SelfID        int64  `json:"self_id"`
	PostType      string `json:"post_type"`
}

type NTQQImpl

type NTQQImpl struct {
	Update    bool      `yaml:"update,omitempty"`
	ID        int64     `yaml:"id,omitempty"`
	Platform  string    `yaml:"platform,omitempty"`
	UpdatedAt time.Time `yaml:"updated-at"`
}

type RangePort added in v0.1.0

type RangePort struct {
	Enabled bool `yaml:"enabled,omitempty"`
	Start   int  `yaml:"start,omitempty"`
	End     int  `yaml:"end,omitempty"`
}

type Response

type Response struct {
	/**
	 * 状态, 表示 API 是否调用成功
	 * - ok	    api 调用成功
	 * - async  api 调用已经提交异步处理, 具体 api 调用是否成功无法得知
	 * - failed api 调用失败
	 * */
	Status string `json:"status"`

	/**
	 * 响应码
	 * - 0   调用成功
	 * - 1   已提交 async 处理
	 * - 其他 操作失败, 具体原因可以看响应的 msg 字段
	 * */
	RetCode int32 `json:"retcode"`

	/**
	 * 错误消息, 仅在 API 调用失败时存在该字段
	 * */
	Msg string `json:"msg,omitempty"`

	/**
	 * 响应数据
	 * */
	Data any `json:"data,omitempty"`
}

type ReverseWebSocket added in v0.2.0

type ReverseWebSocket struct {
	Url         string `yaml:"url,omitempty"`
	AccessToken string `yaml:"access-token,omitempty"`
}

type WebSocket

type WebSocket struct {
	Timeout   time.Duration `yaml:"timeout,omitempty"`
	RangePort *RangePort    `yaml:"range-port"`
}

type WorkflowAction

type WorkflowAction struct {
	TotalCount   int64          `json:"total_count"`
	WorkflowRuns []*WorkflowRun `json:"workflow_runs"`
}

type WorkflowRun

type WorkflowRun struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	HeadSha      string    `json:"head_sha"`
	Path         string    `json:"path"`
	DisplayTitle string    `json:"display_title"`
	Status       string    `json:"status"`
	Conclusion   string    `json:"conclusion"`
	WorkflowID   int64     `json:"workflow_id"`
	URL          string    `json:"url"`
	HTMLURL      string    `json:"html_url"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	JobsURL      string    `json:"jobs_url"`
	ArtifactsURL string    `json:"artifacts_url"`
}

Jump to

Keyboard shortcuts

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