api

package
v0.0.0-...-7bbd703 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 45 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/OpenALC/LiteTalk/server version (devel) DO NOT EDIT.

附件上传与下载(#41 B2)。

上传:multipart 单 file 字段 → attachment.Process(嗅探/白名单/缩略图)→ blob.Put → store.CreateAttachment。任一步失败都尽力删除已写对象,不留孤儿 blob。 下载:能力 URL(路径 id + query key),免 Bearer,供 img 标签直接加载;key 是 256 位随机 hex,ID 与 key 不匹配、附件不存在或所属消息已软删一律 404。

注册侧 bootstrap 邀请码接线(#27):校验 → 认领默认服务器 → 消费标记。 派生/标记逻辑在 internal/bootstrap;这里只做 HTTP 流程胶水。 依赖获取不改 main.go 接线(裁定 13):

  • 码的派生密钥从 s.jwt.Secret() 取(与令牌同源);
  • 消费标记写 KV——main 把同一个 kv 作为 Presence 传入,此处类型断言取回。

bots.go bot 账号在 REST 侧的过滤与准入(#51)。判定数据只有一处口径: users.is_bot,集合查询走 store.BotsAmong——各 handler 不得自行拼 is_bot 条件。 bot 账号本身由管理员 CLI(cmd/litetalkctl)创建,REST 不开创建入口。

Package api REST API 层(§5.4 全量接口)。路由用标准库 ServeMux(Go 1.22 模式匹配)。

Index

Constants

View Source
const (
	AuthModeFull   = "full"
	AuthModeSimple = "simple"
	AuthModeOIDC   = "oidc"
)

AuthMode 鉴权模式:full(默认,验证码流程)/ simple(免验证码,适合私域部署)/ oidc(外部身份,仅 OIDC 登录——本地密码入口全部关闭,见各入口的门控)。

Variables

View Source
var PublicRoutePatterns = map[string]bool{
	"GET /api/v1/attachments/{id}":           true,
	"GET /api/v1/attachments/{id}/thumbnail": true,
	"GET /api/v1/config":                     true,
	"GET /api/v1/healthz":                    true,
	"POST /api/v1/auth/email-code":           true,
	"POST /api/v1/auth/guest":                true,
	"POST /api/v1/auth/login":                true,
	"POST /api/v1/auth/logout":               true,
	"POST /api/v1/auth/oidc/authorize":       true,
	"POST /api/v1/auth/oidc/callback":        true,
	"POST /api/v1/auth/password/reset":       true,
	"POST /api/v1/auth/refresh":              true,
	"POST /api/v1/auth/register":             true,
	"POST /api/v1/rtc/credentials":           true,
	"POST /api/v1/webhooks/{id}/{secret}":    true,
}

PublicRoutePatterns 免鉴权路由(openapi.yaml 中 security: [] 的操作)。 由 openapigen 生成;未列出的路由一律要求 Bearer 鉴权。

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func RegisterStatic

func RegisterStatic(mux *http.ServeMux, lg *log.Logger)

RegisterStatic 把 Web 客户端产物挂到 mux 的根路径(幂等,可重复调用)。

注册用无方法限定 "/" 而非 "GET /":ServeMux 的冲突规则要求更具体的模式在 「方法×路径」两个维度上都更具体才不打架——"GET /" 与既有 methodless 的 "/api/v1/" 在 GET /api/v1/* 上双方各赢一维,注册直接 panic。"/"(全方法) 是 "/api/v1/" 与 "GET /ws" 的严格超集,后两者按最具体优先照常赢,fallback 只兜真正未注册的路径;非 GET/HEAD 请求落到本 handler 用 405 拒绝。

dist 无产物(只有 .gitkeep)时路由照样注册,但所有请求都 404: 开发/测试构建的服务端保持「纯 API/WS」形态,不吐空壳 HTML。

Types

type AcceptFriendRequest200JSONResponse

type AcceptFriendRequest200JSONResponse FriendEntry

func (AcceptFriendRequest200JSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest200JSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequest400ApplicationProblemPlusJSONResponse

type AcceptFriendRequest400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (AcceptFriendRequest400ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest400ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequest401ApplicationProblemPlusJSONResponse

type AcceptFriendRequest401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (AcceptFriendRequest401ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest401ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequest403ApplicationProblemPlusJSONResponse

type AcceptFriendRequest403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (AcceptFriendRequest403ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest403ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequest404ApplicationProblemPlusJSONResponse

type AcceptFriendRequest404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (AcceptFriendRequest404ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest404ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequest409ApplicationProblemPlusJSONResponse

type AcceptFriendRequest409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (AcceptFriendRequest409ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequest409ApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AcceptFriendRequestRequestObject

type AcceptFriendRequestRequestObject struct {
	Id IDPath `json:"id"`
}

type AcceptFriendRequestResponseObject

type AcceptFriendRequestResponseObject interface {
	VisitAcceptFriendRequestResponse(w http.ResponseWriter) error
}

type AcceptFriendRequestdefaultApplicationProblemPlusJSONResponse

type AcceptFriendRequestdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (AcceptFriendRequestdefaultApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse

func (response AcceptFriendRequestdefaultApplicationProblemPlusJSONResponse) VisitAcceptFriendRequestResponse(w http.ResponseWriter) error

type AddConversationMembers200JSONResponse

type AddConversationMembers200JSONResponse Conversation

func (AddConversationMembers200JSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers200JSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers400ApplicationProblemPlusJSONResponse

type AddConversationMembers400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (AddConversationMembers400ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers400ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers401ApplicationProblemPlusJSONResponse

type AddConversationMembers401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (AddConversationMembers401ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers401ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers403ApplicationProblemPlusJSONResponse

type AddConversationMembers403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (AddConversationMembers403ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers403ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers404ApplicationProblemPlusJSONResponse

type AddConversationMembers404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (AddConversationMembers404ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers404ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers409ApplicationProblemPlusJSONResponse

type AddConversationMembers409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (AddConversationMembers409ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers409ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembers429ApplicationProblemPlusJSONResponse

type AddConversationMembers429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (AddConversationMembers429ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembers429ApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddConversationMembersJSONRequestBody

type AddConversationMembersJSONRequestBody = AddConversationMembersRequest

AddConversationMembersJSONRequestBody defines body for AddConversationMembers for application/json ContentType.

type AddConversationMembersRequest

type AddConversationMembersRequest struct {
	// UserIds 要添加的用户 ID(至少 1 个;添加后总人数不得超过 50)
	UserIds []ID `json:"user_ids"`
}

AddConversationMembersRequest defines model for AddConversationMembersRequest.

type AddConversationMembersRequestObject

type AddConversationMembersRequestObject struct {
	Id   IDPath `json:"id"`
	Body *AddConversationMembersJSONRequestBody
}

type AddConversationMembersResponseObject

type AddConversationMembersResponseObject interface {
	VisitAddConversationMembersResponse(w http.ResponseWriter) error
}

type AddConversationMembersdefaultApplicationProblemPlusJSONResponse

type AddConversationMembersdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (AddConversationMembersdefaultApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse

func (response AddConversationMembersdefaultApplicationProblemPlusJSONResponse) VisitAddConversationMembersResponse(w http.ResponseWriter) error

type AddFriendRequest

type AddFriendRequest struct {
	Nickname string  `json:"nickname"`
	Tag      *string `json:"tag,omitempty"`
}

AddFriendRequest nickname 可写成「昵称#tag」整体;分开传则 tag 为 4 位。

type ApiToken

type ApiToken struct {
	CreatedAt Time `json:"created_at"`

	// ExpiresAt 过期时刻;null = 长期有效
	ExpiresAt *Time `json:"expires_at,omitempty"`
	Id        ID    `json:"id"`

	// Kind pat=个人访问令牌;bot=机器人令牌(创建入口属
	Kind ApiTokenKind `json:"kind"`

	// LastUsedAt 最近使用时刻(60s 节流异步落库)
	LastUsedAt *Time `json:"last_used_at,omitempty"`

	// Name 用户可见备注("CI 机器人")
	Name string `json:"name"`

	// Prefix 明文前缀 8 位小写 hex(ltk_pat_<prefix>…****)
	Prefix string `json:"prefix"`

	// RevokedAt 吊销时刻;null = 未吊销
	RevokedAt *Time `json:"revoked_at,omitempty"`

	// Scopes 授权 scope 白名单子集;权限 = 角色权限 ∩ scope 映射位
	Scopes []string `json:"scopes"`
}

ApiToken 个人访问令牌元数据(#54)。**永不包含明文与 secret_hash**——明文只在创建 响应出现一次。ID 为十进制字符串;prefix 为明文前缀 8 位小写 hex (有意公开,用于 UI 展示与日志关联,不是鉴权要素)。

type ApiTokenKind

type ApiTokenKind string

ApiTokenKind pat=个人访问令牌;bot=机器人令牌(创建入口属

const (
	ApiTokenKindBot ApiTokenKind = "bot"
	ApiTokenKindPat ApiTokenKind = "pat"
)

Defines values for ApiTokenKind.

func (ApiTokenKind) Valid

func (e ApiTokenKind) Valid() bool

Valid indicates whether the value is a known member of the ApiTokenKind enum.

type Attachment

type Attachment struct {
	// ContentType 服务端嗅探出的内容类型(白名单内)
	ContentType string `json:"content_type"`

	// Filename 展示用文件名(已去除路径分隔符与控制字符)
	Filename string `json:"filename"`

	// Height 原图像素高(非图片为 0)
	Height *int `json:"height,omitempty"`

	// Id 附件 ID(十进制字符串)
	Id string `json:"id"`

	// Size 字节数
	Size int64 `json:"size"`

	// ThumbnailUrl 带能力 key 的缩略图路径;非图片或缩略图生成失败时不返回
	ThumbnailUrl *string `json:"thumbnail_url,omitempty"`

	// Url 带能力 key 的下载路径(相对路径)
	Url string `json:"url"`

	// Width 原图像素宽(非图片为 0)
	Width *int `json:"width,omitempty"`
}

Attachment 附件元数据(#41)。二进制内容不在 JSON 中;url 与 thumbnail_url 是带下载 能力凭证(key)的相对路径(/api/v1/attachments/{id}?key=...),可直接放进 img 标签,不需要 Authorization。宽高仅图片非零;thumbnail_url 仅图片给出。

type AttachmentKeyQuery

type AttachmentKeyQuery = string

AttachmentKeyQuery defines model for AttachmentKeyQuery.

type AuditLogEntry

type AuditLogEntry struct {
	// Action 动作名(如 role.create / channel.overwrite.set)
	Action    string `json:"action"`
	ActorId   ID     `json:"actor_id"`
	ChannelId *ID    `json:"channel_id,omitempty"`
	CreatedAt Time   `json:"created_at"`

	// Detail 变更字段的 JSON 字符串
	Detail   string `json:"detail"`
	Id       ID     `json:"id"`
	ServerId ID     `json:"server_id"`
	TargetId *ID    `json:"target_id,omitempty"`

	// TargetType 目标类型(server/channel/category/role/member/invite)
	TargetType *string `json:"target_type,omitempty"`
}

AuditLogEntry 审计条目(#35 B4)。detail 为变更字段的 JSON 字符串(不含隐私数据)。ID 为十进制字符串(#31)。

type BadRequest

type BadRequest = Problem

BadRequest RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type BadRequestApplicationProblemPlusJSONResponse

type BadRequestApplicationProblemPlusJSONResponse Problem

type CategoryInfo

type CategoryInfo struct {
	CreatedAt Time   `json:"created_at"`
	Id        ID     `json:"id"`
	Name      string `json:"name"`
	Position  int    `json:"position"`
	ServerId  ID     `json:"server_id"`
}

CategoryInfo 频道分类。ID 为十进制字符串(#31)。

type ChannelInfo

type ChannelInfo struct {
	// AudioBitrateKbps 语音码率上限 kbps(#46);0 = 不限制(跟随客户端用户设置),8–128 = 上限。 仅语音频道有意义,文字频道恒为 0。可选属性,服务端始终返回
	AudioBitrateKbps *int `json:"audio_bitrate_kbps,omitempty"`

	// AudioFrameMs 语音 Opus 帧长毫秒(#46);0 = 默认 20ms,10/20 = 指定帧长。 仅语音频道有意义,文字频道恒为 0。可选属性,服务端始终返回
	AudioFrameMs *int `json:"audio_frame_ms,omitempty"`

	// CategoryId 分类归属;null = 未分类(请求侧 0 也表示未分类)
	CategoryId *ID  `json:"category_id"`
	CreatedAt  Time `json:"created_at"`

	// HasPassword 是否设有频道密码(#37);密码明文/哈希永不回显。可选属性,服务端始终返回
	HasPassword *bool  `json:"has_password,omitempty"`
	Id          ID     `json:"id"`
	Name        string `json:"name"`

	// ParentId 父频道 ID(#37 子频道树,仅语音频道);null = 顶层。可选属性,服务端始终返回
	ParentId *ID             `json:"parent_id,omitempty"`
	Position int             `json:"position"`
	ServerId ID              `json:"server_id"`
	Type     ChannelInfoType `json:"type"`

	// UserLimit 语音人数上限(#37);0 = 不限。可选属性,服务端始终返回
	UserLimit *int `json:"user_limit,omitempty"`
}

ChannelInfo 频道。ID 为十进制字符串(#31)。

type ChannelInfoType

type ChannelInfoType string

ChannelInfoType defines model for ChannelInfo.Type.

const (
	ChannelInfoTypeText  ChannelInfoType = "text"
	ChannelInfoTypeVoice ChannelInfoType = "voice"
)

Defines values for ChannelInfoType.

func (ChannelInfoType) Valid

func (e ChannelInfoType) Valid() bool

Valid indicates whether the value is a known member of the ChannelInfoType enum.

type ChannelOverwrite

type ChannelOverwrite struct {
	// Allow 十进制权限位串(仅频道位)
	Allow     string `json:"allow"`
	ChannelId ID     `json:"channel_id"`

	// Deny 十进制权限位串(仅频道位)
	Deny       string                     `json:"deny"`
	TargetId   ID                         `json:"target_id"`
	TargetType ChannelOverwriteTargetType `json:"target_type"`
	UpdatedAt  Time                       `json:"updated_at"`
}

ChannelOverwrite 频道权限覆盖(#35 B4)。allow/deny 为十进制字符串,只含频道位。ID 为十进制字符串(#31)。

type ChannelOverwriteTargetType

type ChannelOverwriteTargetType string

ChannelOverwriteTargetType defines model for ChannelOverwrite.TargetType.

const (
	ChannelOverwriteTargetTypeMember ChannelOverwriteTargetType = "member"
	ChannelOverwriteTargetTypeRole   ChannelOverwriteTargetType = "role"
)

Defines values for ChannelOverwriteTargetType.

func (ChannelOverwriteTargetType) Valid

func (e ChannelOverwriteTargetType) Valid() bool

Valid indicates whether the value is a known member of the ChannelOverwriteTargetType enum.

type ClientUpgradeRequired

type ClientUpgradeRequired = Problem

ClientUpgradeRequired RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type ClientUpgradeRequiredApplicationProblemPlusJSONResponse

type ClientUpgradeRequiredApplicationProblemPlusJSONResponse Problem

type Config

type Config struct {
	Store    store.Store
	JWT      *auth.JWT
	Refresh  *auth.RefreshStore
	Codes    *auth.EmailCodes
	Limits   *auth.RateLimit
	Mailer   mailer.Mailer
	AuthMode string // 空视为 full
	Log      *log.Logger
	// TrustedProxies 可信反代的 IP/CIDR 列表(逗号分隔 env 在 main 解析后传入)。
	// 空 = 不信任任何代理:直接取 RemoteAddr,伪造 X-Real-IP 无法绕过限流(P1)。
	TrustedProxies []string
	// Session 多设备会话索引(nil 时跳过 sid 校验,仅供测试/迁移期过渡)。
	Session *auth.SessionIndex
	// Hub 信令 hub(登出/重置密码踢线;nil 时仅清会话不踢 WS,测试常用)。
	Hub Hub
	// Presence 在线状态读取(presence:{uid},好友列表 user.online 填值用;nil=恒离线)。
	Presence PresenceReader
	// VoicePresence 语音房反查(好友频道 presence 快照,#92);nil=好友条目不带频道字段。
	// 生产传与 signal.Hub 同一实例(*signal.Hub 满足本接口)。
	VoicePresence VoicePresence
	// SelfHost 一键自托管形态(SQLite/进程内单机部署):客户端显示自托管引导(#26)。
	SelfHost bool
	// BootstrapRequired 管理员邀请码是否尚未被消费;注册页提示「等待管理员邀请」。
	// nil=恒 false(bootstrap 流程未启用,#27 T4 接线)。
	BootstrapRequired func() bool
	// Version 服务端构建版本(GET /api/v1/healthz 回显;空视为 dev,#77)。
	Version string
	// RTC TURN/STUN 凭证签发配置;Secret 为空时 rtc/credentials 返回 503(#77)。
	RTC rtcapi.Config
	// RTCAuth 从访问令牌提取 uid(Bearer 或 ?token=,与信令一致);nil 一律 401。
	RTCAuth rtcapi.UserFromToken
	// Authz 权限判定(#35 B3)。nil 时用 Store 自建默认实例(测试兼容);
	// 生产必须传入与 signal.Hub 共享的同一实例,否则写后失效不同步。
	Authz *authz.Authorizer
	// Tokens api_token 校验服务(#54)。nil 时用 Store 自建(测试兼容);
	// 生产建议显式传入与 WS 鉴权共用的同一实例(last_used 节流表按实例记)。
	Tokens *token.Service
	// Blob 附件二进制存储(#41 B2)。生产由 cmd/server 按 LITETALK_UPLOAD_* 构造;
	// nil 时上传/下载端点返回 500(测试未注入 blob 的旧用例不受影响)。
	Blob blob.Store
	// Upload 附件校验参数。MaxBytes<=0 回落 10 MiB;MaxDimension<=0 回落 4096
	// (服务端显式收紧,包默认 8192 对解压炸弹风险偏高);AllowedTypes 为空用默认白名单。
	Upload attachment.Config
	// KV 共享键值存储(链接预览缓存,#42 B4)。nil 时链接预览按不可用处理
	// (端点 404 no_preview);缓存读写故障则 fail-open,跳过缓存继续抓取。
	KV store.KV
	// LinkPreview 链接预览抓取器(#42 B4)。生产由 cmd/server 按
	// LITETALK_LINK_PREVIEW* 构造;nil = 功能关闭,端点一律 404 no_preview。
	LinkPreview LinkPreviewFetcher
	// Push 移动推送派发器(#53)。生产由 cmd/server 按 LITETALK_PUSH_* 构造;
	// nil = 推送关闭(/config push_enabled=false,触发点短路,零后台 goroutine)。
	Push *push.Broker
	// Webhooks 出站投递器(#52)。生产由 cmd/server 构造并与 hub 的事件出口共享
	// 同一实例;nil = 投递器不启动(已建订阅在重启后也不投递),CRUD 与入站不受影响。
	Webhooks *webhook.Dispatcher
	// WebhookURLCheck 出站 URL 的 SSRF 校验;nil 用 linkpreview.CheckDialable
	//(测试注入放行桩,httptest 目标是 127.0.0.1,默认校验会拒绝)。
	WebhookURLCheck func(string) error
	// WebhookRedactURL 默认 false,保持已发布的完整 url 响应;开启后非创建者/服主看到掩码。
	WebhookRedactURL bool
	// OIDC 登录配置(#54)。nil 或不完整 = 功能关闭(端点 404,零副作用);
	// 完整性由 cmd/server 启动校验把关,这里对不完整配置只记日志并关闭。
	OIDC *auth.OIDCConfig
}

Config 构造配置。

type Conflict

type Conflict = Problem

Conflict RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type ConflictApplicationProblemPlusJSONResponse

type ConflictApplicationProblemPlusJSONResponse Problem

type Conversation

type Conversation struct {
	CreatedAt Time                 `json:"created_at"`
	Id        ID                   `json:"id"`
	Kind      ConversationKind     `json:"kind"`
	Members   []ConversationMember `json:"members"`

	// Name 群聊名;direct 忽略(可能为空串)
	Name string `json:"name"`
}

Conversation 私聊/群私聊会话(#38 B2,无服务器频道)。kind=direct 时 name 无意义, 可能为空串;成员只含昵称/tag,不含 email。ID 为十进制字符串。

type ConversationKind

type ConversationKind string

ConversationKind defines model for Conversation.Kind.

const (
	ConversationKindDirect ConversationKind = "direct"
	ConversationKindGroup  ConversationKind = "group"
)

Defines values for ConversationKind.

func (ConversationKind) Valid

func (e ConversationKind) Valid() bool

Valid indicates whether the value is a known member of the ConversationKind enum.

type ConversationMember

type ConversationMember struct {
	JoinedAt Time                   `json:"joined_at"`
	Nickname string                 `json:"nickname"`
	Role     ConversationMemberRole `json:"role"`
	Tag      string                 `json:"tag"`
	UserId   ID                     `json:"user_id"`
}

ConversationMember 会话成员(内联昵称/tag,不含 email)。owner 只用于 group,direct 双方都是 member。

type ConversationMemberRole

type ConversationMemberRole string

ConversationMemberRole defines model for ConversationMember.Role.

const (
	ConversationMemberRoleMember ConversationMemberRole = "member"
	ConversationMemberRoleOwner  ConversationMemberRole = "owner"
)

Defines values for ConversationMemberRole.

func (ConversationMemberRole) Valid

func (e ConversationMemberRole) Valid() bool

Valid indicates whether the value is a known member of the ConversationMemberRole enum.

type CreateCategory201JSONResponse

type CreateCategory201JSONResponse CategoryInfo

func (CreateCategory201JSONResponse) VisitCreateCategoryResponse

func (response CreateCategory201JSONResponse) VisitCreateCategoryResponse(w http.ResponseWriter) error

type CreateCategory400ApplicationProblemPlusJSONResponse

type CreateCategory400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateCategory400ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse

func (response CreateCategory400ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse(w http.ResponseWriter) error

type CreateCategory401ApplicationProblemPlusJSONResponse

type CreateCategory401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateCategory401ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse

func (response CreateCategory401ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse(w http.ResponseWriter) error

type CreateCategory403ApplicationProblemPlusJSONResponse

type CreateCategory403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateCategory403ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse

func (response CreateCategory403ApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse(w http.ResponseWriter) error

type CreateCategoryJSONRequestBody

type CreateCategoryJSONRequestBody = CreateCategoryRequest

CreateCategoryJSONRequestBody defines body for CreateCategory for application/json ContentType.

type CreateCategoryRequest

type CreateCategoryRequest struct {
	// Name 1–32 字符
	Name string `json:"name"`
}

CreateCategoryRequest defines model for CreateCategoryRequest.

type CreateCategoryRequestObject

type CreateCategoryRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateCategoryJSONRequestBody
}

type CreateCategoryResponseObject

type CreateCategoryResponseObject interface {
	VisitCreateCategoryResponse(w http.ResponseWriter) error
}

type CreateCategorydefaultApplicationProblemPlusJSONResponse

type CreateCategorydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateCategorydefaultApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse

func (response CreateCategorydefaultApplicationProblemPlusJSONResponse) VisitCreateCategoryResponse(w http.ResponseWriter) error

type CreateChannel201JSONResponse

type CreateChannel201JSONResponse ChannelInfo

func (CreateChannel201JSONResponse) VisitCreateChannelResponse

func (response CreateChannel201JSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error

type CreateChannel400ApplicationProblemPlusJSONResponse

type CreateChannel400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateChannel400ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse

func (response CreateChannel400ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error

type CreateChannel401ApplicationProblemPlusJSONResponse

type CreateChannel401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateChannel401ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse

func (response CreateChannel401ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error

type CreateChannel403ApplicationProblemPlusJSONResponse

type CreateChannel403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateChannel403ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse

func (response CreateChannel403ApplicationProblemPlusJSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error

type CreateChannelJSONRequestBody

type CreateChannelJSONRequestBody = CreateChannelRequest

CreateChannelJSONRequestBody defines body for CreateChannel for application/json ContentType.

type CreateChannelRequest

type CreateChannelRequest struct {
	// AudioBitrateKbps 语音码率上限 kbps(#46,仅语音频道);0/缺省 = 不限制,8–128 = 上限
	AudioBitrateKbps *int `json:"audio_bitrate_kbps,omitempty"`

	// AudioFrameMs 语音 Opus 帧长毫秒(#46,仅语音频道);0/缺省 = 默认 20ms,10/20 = 指定
	AudioFrameMs *int `json:"audio_frame_ms,omitempty"`

	// CategoryId 0/缺省 = 未分类;请求侧数字与字符串双接受(#31)
	CategoryId *ID `json:"category_id,omitempty"`

	// Name 1–64 字符
	Name string `json:"name"`

	// ParentId 父频道 ID(#37,仅语音频道、最多两级);省略 category_id 时继承父分类
	ParentId *ID `json:"parent_id,omitempty"`

	// Password 频道密码(#37,1–72 字节,仅语音频道);只写不读,响应只出 has_password
	Password *string                  `json:"password,omitempty"`
	Position *int                     `json:"position,omitempty"`
	Type     CreateChannelRequestType `json:"type"`

	// UserLimit 语音人数上限 0..100(#37,仅语音频道);0 = 不限
	UserLimit *int `json:"user_limit,omitempty"`
}

CreateChannelRequest defines model for CreateChannelRequest.

type CreateChannelRequestObject

type CreateChannelRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateChannelJSONRequestBody
}

type CreateChannelRequestType

type CreateChannelRequestType string

CreateChannelRequestType defines model for CreateChannelRequest.Type.

const (
	CreateChannelRequestTypeText  CreateChannelRequestType = "text"
	CreateChannelRequestTypeVoice CreateChannelRequestType = "voice"
)

Defines values for CreateChannelRequestType.

func (CreateChannelRequestType) Valid

func (e CreateChannelRequestType) Valid() bool

Valid indicates whether the value is a known member of the CreateChannelRequestType enum.

type CreateChannelResponseObject

type CreateChannelResponseObject interface {
	VisitCreateChannelResponse(w http.ResponseWriter) error
}

type CreateChanneldefaultApplicationProblemPlusJSONResponse

type CreateChanneldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateChanneldefaultApplicationProblemPlusJSONResponse) VisitCreateChannelResponse

type CreateConversation200JSONResponse

type CreateConversation200JSONResponse Conversation

func (CreateConversation200JSONResponse) VisitCreateConversationResponse

func (response CreateConversation200JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversation201JSONResponse

type CreateConversation201JSONResponse Conversation

func (CreateConversation201JSONResponse) VisitCreateConversationResponse

func (response CreateConversation201JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversation400ApplicationProblemPlusJSONResponse

type CreateConversation400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateConversation400ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse

func (response CreateConversation400ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversation401ApplicationProblemPlusJSONResponse

type CreateConversation401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateConversation401ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse

func (response CreateConversation401ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversation403ApplicationProblemPlusJSONResponse

type CreateConversation403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateConversation403ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse

func (response CreateConversation403ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversation429ApplicationProblemPlusJSONResponse

type CreateConversation429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (CreateConversation429ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse

func (response CreateConversation429ApplicationProblemPlusJSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateConversationJSONRequestBody

type CreateConversationJSONRequestBody = CreateConversationRequest

CreateConversationJSONRequestBody defines body for CreateConversation for application/json ContentType.

type CreateConversationRequest

type CreateConversationRequest struct {
	Kind CreateConversationRequestKind `json:"kind"`

	// Name 群聊名称(可选;给出时 1–64 字符,direct 忽略)
	Name *string `json:"name,omitempty"`

	// UserIds 被邀请用户 ID(不含创建者)。direct 恰好 1 个;group 2–49 个 (总人数含创建者 3–50)。不得重复、不得为 0。
	UserIds []ID `json:"user_ids"`
}

CreateConversationRequest defines model for CreateConversationRequest.

type CreateConversationRequestKind

type CreateConversationRequestKind string

CreateConversationRequestKind defines model for CreateConversationRequest.Kind.

const (
	CreateConversationRequestKindDirect CreateConversationRequestKind = "direct"
	CreateConversationRequestKindGroup  CreateConversationRequestKind = "group"
)

Defines values for CreateConversationRequestKind.

func (CreateConversationRequestKind) Valid

Valid indicates whether the value is a known member of the CreateConversationRequestKind enum.

type CreateConversationRequestObject

type CreateConversationRequestObject struct {
	Body *CreateConversationJSONRequestBody
}

type CreateConversationResponseObject

type CreateConversationResponseObject interface {
	VisitCreateConversationResponse(w http.ResponseWriter) error
}

type CreateConversationdefaultApplicationProblemPlusJSONResponse

type CreateConversationdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateConversationdefaultApplicationProblemPlusJSONResponse) VisitCreateConversationResponse

func (response CreateConversationdefaultApplicationProblemPlusJSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error

type CreateFriendRequest201JSONResponse

type CreateFriendRequest201JSONResponse FriendEntry

func (CreateFriendRequest201JSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequest201JSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateFriendRequest400ApplicationProblemPlusJSONResponse

type CreateFriendRequest400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateFriendRequest400ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequest400ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateFriendRequest401ApplicationProblemPlusJSONResponse

type CreateFriendRequest401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateFriendRequest401ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequest401ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateFriendRequest404ApplicationProblemPlusJSONResponse

type CreateFriendRequest404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (CreateFriendRequest404ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequest404ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateFriendRequest409ApplicationProblemPlusJSONResponse

type CreateFriendRequest409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (CreateFriendRequest409ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequest409ApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateFriendRequestJSONRequestBody

type CreateFriendRequestJSONRequestBody = AddFriendRequest

CreateFriendRequestJSONRequestBody defines body for CreateFriendRequest for application/json ContentType.

type CreateFriendRequestRequestObject

type CreateFriendRequestRequestObject struct {
	Body *CreateFriendRequestJSONRequestBody
}

type CreateFriendRequestResponseObject

type CreateFriendRequestResponseObject interface {
	VisitCreateFriendRequestResponse(w http.ResponseWriter) error
}

type CreateFriendRequestdefaultApplicationProblemPlusJSONResponse

type CreateFriendRequestdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateFriendRequestdefaultApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse

func (response CreateFriendRequestdefaultApplicationProblemPlusJSONResponse) VisitCreateFriendRequestResponse(w http.ResponseWriter) error

type CreateInboundWebhook201JSONResponse

type CreateInboundWebhook201JSONResponse InboundWebhook

func (CreateInboundWebhook201JSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook201JSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhook400ApplicationProblemPlusJSONResponse

type CreateInboundWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateInboundWebhook400ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook400ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhook401ApplicationProblemPlusJSONResponse

type CreateInboundWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateInboundWebhook401ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook401ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhook403ApplicationProblemPlusJSONResponse

type CreateInboundWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateInboundWebhook403ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook403ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhook404ApplicationProblemPlusJSONResponse

type CreateInboundWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (CreateInboundWebhook404ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook404ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhook429ApplicationProblemPlusJSONResponse

type CreateInboundWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (CreateInboundWebhook429ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhook429ApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInboundWebhookJSONRequestBody

type CreateInboundWebhookJSONRequestBody = CreateInboundWebhookRequest

CreateInboundWebhookJSONRequestBody defines body for CreateInboundWebhook for application/json ContentType.

type CreateInboundWebhookRequest

type CreateInboundWebhookRequest struct {
	// Description 用途备注(可空)
	Description *string `json:"description,omitempty"`
}

CreateInboundWebhookRequest 创建频道入站投递入口(#52)。

type CreateInboundWebhookRequestObject

type CreateInboundWebhookRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateInboundWebhookJSONRequestBody
}

type CreateInboundWebhookResponseObject

type CreateInboundWebhookResponseObject interface {
	VisitCreateInboundWebhookResponse(w http.ResponseWriter) error
}

type CreateInboundWebhookdefaultApplicationProblemPlusJSONResponse

type CreateInboundWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse

func (response CreateInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitCreateInboundWebhookResponse(w http.ResponseWriter) error

type CreateInvite201JSONResponse

type CreateInvite201JSONResponse Invite

func (CreateInvite201JSONResponse) VisitCreateInviteResponse

func (response CreateInvite201JSONResponse) VisitCreateInviteResponse(w http.ResponseWriter) error

type CreateInvite400ApplicationProblemPlusJSONResponse

type CreateInvite400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateInvite400ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse

func (response CreateInvite400ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse(w http.ResponseWriter) error

type CreateInvite401ApplicationProblemPlusJSONResponse

type CreateInvite401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateInvite401ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse

func (response CreateInvite401ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse(w http.ResponseWriter) error

type CreateInvite403ApplicationProblemPlusJSONResponse

type CreateInvite403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateInvite403ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse

func (response CreateInvite403ApplicationProblemPlusJSONResponse) VisitCreateInviteResponse(w http.ResponseWriter) error

type CreateInviteJSONRequestBody

type CreateInviteJSONRequestBody = CreateInviteRequest

CreateInviteJSONRequestBody defines body for CreateInvite for application/json ContentType.

type CreateInviteRequest

type CreateInviteRequest struct {
	// ExpiresIn 秒;0 = 不过期
	ExpiresIn *int64 `json:"expires_in,omitempty"`

	// MaxUses 0 = 不限;不可为负
	MaxUses *int `json:"max_uses,omitempty"`
}

CreateInviteRequest 请求体仍需为 JSON 对象;两字段缺省按 0 处理。

type CreateInviteRequestObject

type CreateInviteRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateInviteJSONRequestBody
}

type CreateInviteResponseObject

type CreateInviteResponseObject interface {
	VisitCreateInviteResponse(w http.ResponseWriter) error
}

type CreateInvitedefaultApplicationProblemPlusJSONResponse

type CreateInvitedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateInvitedefaultApplicationProblemPlusJSONResponse) VisitCreateInviteResponse

type CreateMessage200JSONResponse

type CreateMessage200JSONResponse Message

func (CreateMessage200JSONResponse) VisitCreateMessageResponse

func (response CreateMessage200JSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage201JSONResponse

type CreateMessage201JSONResponse Message

func (CreateMessage201JSONResponse) VisitCreateMessageResponse

func (response CreateMessage201JSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage400ApplicationProblemPlusJSONResponse

type CreateMessage400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateMessage400ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

func (response CreateMessage400ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage401ApplicationProblemPlusJSONResponse

type CreateMessage401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateMessage401ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

func (response CreateMessage401ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage403ApplicationProblemPlusJSONResponse

type CreateMessage403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateMessage403ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

func (response CreateMessage403ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage404ApplicationProblemPlusJSONResponse

type CreateMessage404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (CreateMessage404ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

func (response CreateMessage404ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessage429ApplicationProblemPlusJSONResponse

type CreateMessage429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (CreateMessage429ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

func (response CreateMessage429ApplicationProblemPlusJSONResponse) VisitCreateMessageResponse(w http.ResponseWriter) error

type CreateMessageJSONRequestBody

type CreateMessageJSONRequestBody = CreateMessageRequest

CreateMessageJSONRequestBody defines body for CreateMessage for application/json ContentType.

type CreateMessageRequest

type CreateMessageRequest struct {
	// AttachmentIds 随消息发送的附件 ID(#41):最多 10 个、元素为正整数(十进制字符串)且 不可重复;只能引用本人上传且尚未被其它消息认领的附件。不能解析、超限、 重复、附件不存在、非本人上传或已被引用一律 400 bad_attachment。 给出附件时 content 可为空串。
	AttachmentIds *[]string `json:"attachment_ids,omitempty"`

	// Content 0–2000 字符。带 attachment_ids 时允许空串(纯附件消息); 没有附件时至少 1 个字符,否则 400 bad_content。
	Content string `json:"content"`

	// Mentions @提及用户 ID(#39):去重,元素须 > 0;每个用户必须是该频道可见成员, 否则 400 bad_mention。
	Mentions *[]ID `json:"mentions,omitempty"`

	// Nonce 幂等键(#31,≤64 字符);同频道同用户重复提交回读原消息(200)。缺省不去重。
	Nonce *string `json:"nonce,omitempty"`

	// ReplyTo 回复目标消息 ID(#39):必须属于同一频道且存在,否则 400 bad_reply; 目标已软删也允许(预览 deleted=true、content 为空)。
	ReplyTo *ID `json:"reply_to,omitempty"`
}

CreateMessageRequest defines model for CreateMessageRequest.

type CreateMessageRequestObject

type CreateMessageRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateMessageJSONRequestBody
}

type CreateMessageResponseObject

type CreateMessageResponseObject interface {
	VisitCreateMessageResponse(w http.ResponseWriter) error
}

type CreateMessagedefaultApplicationProblemPlusJSONResponse

type CreateMessagedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateMessagedefaultApplicationProblemPlusJSONResponse) VisitCreateMessageResponse

type CreateRole201JSONResponse

type CreateRole201JSONResponse Role

func (CreateRole201JSONResponse) VisitCreateRoleResponse

func (response CreateRole201JSONResponse) VisitCreateRoleResponse(w http.ResponseWriter) error

type CreateRole400ApplicationProblemPlusJSONResponse

type CreateRole400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateRole400ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse

func (response CreateRole400ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse(w http.ResponseWriter) error

type CreateRole401ApplicationProblemPlusJSONResponse

type CreateRole401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateRole401ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse

func (response CreateRole401ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse(w http.ResponseWriter) error

type CreateRole403ApplicationProblemPlusJSONResponse

type CreateRole403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateRole403ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse

func (response CreateRole403ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse(w http.ResponseWriter) error

type CreateRole404ApplicationProblemPlusJSONResponse

type CreateRole404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (CreateRole404ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse

func (response CreateRole404ApplicationProblemPlusJSONResponse) VisitCreateRoleResponse(w http.ResponseWriter) error

type CreateRoleJSONRequestBody

type CreateRoleJSONRequestBody = CreateRoleRequest

CreateRoleJSONRequestBody defines body for CreateRole for application/json ContentType.

type CreateRoleRequest

type CreateRoleRequest struct {
	// Color #RRGGBB;缺省回落主题主色
	Color *string `json:"color,omitempty"`

	// Name 1–32 字符
	Name string `json:"name"`

	// Permissions 十进制权限位串;只允许低 15 位,且是操作者权限的子集
	Permissions string `json:"permissions"`

	// Position 缺省 0;非 owner 必须严格小于其最高角色 position
	Position *int `json:"position,omitempty"`
}

CreateRoleRequest defines model for CreateRoleRequest.

type CreateRoleRequestObject

type CreateRoleRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateRoleJSONRequestBody
}

type CreateRoleResponseObject

type CreateRoleResponseObject interface {
	VisitCreateRoleResponse(w http.ResponseWriter) error
}

type CreateRoledefaultApplicationProblemPlusJSONResponse

type CreateRoledefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateRoledefaultApplicationProblemPlusJSONResponse) VisitCreateRoleResponse

type CreateServer201JSONResponse

type CreateServer201JSONResponse ServerInfo

func (CreateServer201JSONResponse) VisitCreateServerResponse

func (response CreateServer201JSONResponse) VisitCreateServerResponse(w http.ResponseWriter) error

type CreateServer400ApplicationProblemPlusJSONResponse

type CreateServer400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateServer400ApplicationProblemPlusJSONResponse) VisitCreateServerResponse

func (response CreateServer400ApplicationProblemPlusJSONResponse) VisitCreateServerResponse(w http.ResponseWriter) error

type CreateServer401ApplicationProblemPlusJSONResponse

type CreateServer401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateServer401ApplicationProblemPlusJSONResponse) VisitCreateServerResponse

func (response CreateServer401ApplicationProblemPlusJSONResponse) VisitCreateServerResponse(w http.ResponseWriter) error

type CreateServerJSONRequestBody

type CreateServerJSONRequestBody = CreateServerRequest

CreateServerJSONRequestBody defines body for CreateServer for application/json ContentType.

type CreateServerRequest

type CreateServerRequest struct {
	// IconColor #RRGGBB;空 = #4FA4F3
	IconColor *string `json:"icon_color,omitempty"`

	// IconName 预设 Lucide 图标名;空 = messages-square
	IconName *string `json:"icon_name,omitempty"`

	// Name 2–32 字符
	Name string `json:"name"`
}

CreateServerRequest defines model for CreateServerRequest.

type CreateServerRequestObject

type CreateServerRequestObject struct {
	Body *CreateServerJSONRequestBody
}

type CreateServerResponseObject

type CreateServerResponseObject interface {
	VisitCreateServerResponse(w http.ResponseWriter) error
}

type CreateServerWebhook201JSONResponse

type CreateServerWebhook201JSONResponse OutboundWebhook

func (CreateServerWebhook201JSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook201JSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhook400ApplicationProblemPlusJSONResponse

type CreateServerWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateServerWebhook400ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook400ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhook401ApplicationProblemPlusJSONResponse

type CreateServerWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateServerWebhook401ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook401ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhook403ApplicationProblemPlusJSONResponse

type CreateServerWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (CreateServerWebhook403ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook403ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhook404ApplicationProblemPlusJSONResponse

type CreateServerWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (CreateServerWebhook404ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook404ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhook429ApplicationProblemPlusJSONResponse

type CreateServerWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (CreateServerWebhook429ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhook429ApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerWebhookJSONRequestBody

type CreateServerWebhookJSONRequestBody = CreateWebhookRequest

CreateServerWebhookJSONRequestBody defines body for CreateServerWebhook for application/json ContentType.

type CreateServerWebhookRequestObject

type CreateServerWebhookRequestObject struct {
	Id   IDPath `json:"id"`
	Body *CreateServerWebhookJSONRequestBody
}

type CreateServerWebhookResponseObject

type CreateServerWebhookResponseObject interface {
	VisitCreateServerWebhookResponse(w http.ResponseWriter) error
}

type CreateServerWebhookdefaultApplicationProblemPlusJSONResponse

type CreateServerWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse

func (response CreateServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitCreateServerWebhookResponse(w http.ResponseWriter) error

type CreateServerdefaultApplicationProblemPlusJSONResponse

type CreateServerdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateServerdefaultApplicationProblemPlusJSONResponse) VisitCreateServerResponse

type CreateToken201JSONResponse

type CreateToken201JSONResponse CreatedToken

func (CreateToken201JSONResponse) VisitCreateTokenResponse

func (response CreateToken201JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken400ApplicationProblemPlusJSONResponse

type CreateToken400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (CreateToken400ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse

func (response CreateToken400ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken401ApplicationProblemPlusJSONResponse

type CreateToken401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (CreateToken401ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse

func (response CreateToken401ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken429ApplicationProblemPlusJSONResponse

type CreateToken429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (CreateToken429ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse

func (response CreateToken429ApplicationProblemPlusJSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateTokenJSONRequestBody

type CreateTokenJSONRequestBody = CreateTokenRequest

CreateTokenJSONRequestBody defines body for CreateToken for application/json ContentType.

type CreateTokenRequest

type CreateTokenRequest struct {
	// ExpiresAt 过期时刻;缺省/ null = 长期有效;须晚于当前时刻
	ExpiresAt *Time `json:"expires_at,omitempty"`

	// Name 用户可见备注
	Name string `json:"name"`

	// Scopes 授权 scope 列表;非空且不重复(空 = 无权限,明确拒绝)
	Scopes []CreateTokenRequestScopes `json:"scopes"`
}

CreateTokenRequest defines model for CreateTokenRequest.

type CreateTokenRequestObject

type CreateTokenRequestObject struct {
	Body *CreateTokenJSONRequestBody
}

type CreateTokenRequestScopes

type CreateTokenRequestScopes string

CreateTokenRequestScopes defines model for CreateTokenRequest.Scopes.

const (
	AdminRead        CreateTokenRequestScopes = "admin.read"
	AttachmentsWrite CreateTokenRequestScopes = "attachments.write"
	GuildManage      CreateTokenRequestScopes = "guild.manage"
	MessagesRead     CreateTokenRequestScopes = "messages.read"
	MessagesWrite    CreateTokenRequestScopes = "messages.write"
	VoiceConnect     CreateTokenRequestScopes = "voice.connect"
)

Defines values for CreateTokenRequestScopes.

func (CreateTokenRequestScopes) Valid

func (e CreateTokenRequestScopes) Valid() bool

Valid indicates whether the value is a known member of the CreateTokenRequestScopes enum.

type CreateTokenResponseObject

type CreateTokenResponseObject interface {
	VisitCreateTokenResponse(w http.ResponseWriter) error
}

type CreateTokendefaultApplicationProblemPlusJSONResponse

type CreateTokendefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateTokendefaultApplicationProblemPlusJSONResponse) VisitCreateTokenResponse

type CreateWebhookRequest

type CreateWebhookRequest struct {
	// Events 订阅事件(白名单子集,不重复)
	Events []CreateWebhookRequestEvents `json:"events"`

	// Url 投递目标;服务端做 SSRF 校验(拒绝内网/回环/link-local/云元数据)
	Url string `json:"url"`
}

CreateWebhookRequest 创建出站订阅(#52)。

type CreateWebhookRequestEvents

type CreateWebhookRequestEvents string

CreateWebhookRequestEvents defines model for CreateWebhookRequest.Events.

const (
	CreateWebhookRequestEventsChannelCreated CreateWebhookRequestEvents = "channel.created"
	CreateWebhookRequestEventsChannelDeleted CreateWebhookRequestEvents = "channel.deleted"
	CreateWebhookRequestEventsMemberJoined   CreateWebhookRequestEvents = "member.joined"
	CreateWebhookRequestEventsMemberLeft     CreateWebhookRequestEvents = "member.left"
	CreateWebhookRequestEventsMessageCreated CreateWebhookRequestEvents = "message.created"
)

Defines values for CreateWebhookRequestEvents.

func (CreateWebhookRequestEvents) Valid

func (e CreateWebhookRequestEvents) Valid() bool

Valid indicates whether the value is a known member of the CreateWebhookRequestEvents enum.

type CreatedToken

type CreatedToken struct {
	CreatedAt Time             `json:"created_at"`
	ExpiresAt *Time            `json:"expires_at,omitempty"`
	Id        ID               `json:"id"`
	Kind      CreatedTokenKind `json:"kind"`
	Name      string           `json:"name"`
	Prefix    string           `json:"prefix"`
	Scopes    []string         `json:"scopes"`

	// Token 一次性明文 ltk_pat_<prefix8hex>_<secret>;仅此一次
	Token string `json:"token"`
}

CreatedToken 创建响应:元数据 + 一次性明文 token。**明文此后任何接口都不再返回**。

type CreatedTokenKind

type CreatedTokenKind string

CreatedTokenKind defines model for CreatedToken.Kind.

const (
	CreatedTokenKindBot CreatedTokenKind = "bot"
	CreatedTokenKindPat CreatedTokenKind = "pat"
)

Defines values for CreatedTokenKind.

func (CreatedTokenKind) Valid

func (e CreatedTokenKind) Valid() bool

Valid indicates whether the value is a known member of the CreatedTokenKind enum.

type DeleteCategory200JSONResponse

type DeleteCategory200JSONResponse StatusOk

func (DeleteCategory200JSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory200JSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategory400ApplicationProblemPlusJSONResponse

type DeleteCategory400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteCategory400ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory400ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategory401ApplicationProblemPlusJSONResponse

type DeleteCategory401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteCategory401ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory401ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategory403ApplicationProblemPlusJSONResponse

type DeleteCategory403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteCategory403ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory403ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategory404ApplicationProblemPlusJSONResponse

type DeleteCategory404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteCategory404ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory404ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategory409ApplicationProblemPlusJSONResponse

type DeleteCategory409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (DeleteCategory409ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategory409ApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteCategoryParams

type DeleteCategoryParams struct {
	// WithChannels 1 = 级联删除分类下频道;缺省仅删空分类
	WithChannels *int `form:"with_channels,omitempty" json:"with_channels,omitempty"`
}

DeleteCategoryParams defines parameters for DeleteCategory.

type DeleteCategoryRequestObject

type DeleteCategoryRequestObject struct {
	Id     IDPath `json:"id"`
	Params DeleteCategoryParams
}

type DeleteCategoryResponseObject

type DeleteCategoryResponseObject interface {
	VisitDeleteCategoryResponse(w http.ResponseWriter) error
}

type DeleteCategorydefaultApplicationProblemPlusJSONResponse

type DeleteCategorydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteCategorydefaultApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse

func (response DeleteCategorydefaultApplicationProblemPlusJSONResponse) VisitDeleteCategoryResponse(w http.ResponseWriter) error

type DeleteChannel200JSONResponse

type DeleteChannel200JSONResponse StatusOk

func (DeleteChannel200JSONResponse) VisitDeleteChannelResponse

func (response DeleteChannel200JSONResponse) VisitDeleteChannelResponse(w http.ResponseWriter) error

type DeleteChannel400ApplicationProblemPlusJSONResponse

type DeleteChannel400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteChannel400ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse

func (response DeleteChannel400ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse(w http.ResponseWriter) error

type DeleteChannel401ApplicationProblemPlusJSONResponse

type DeleteChannel401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteChannel401ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse

func (response DeleteChannel401ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse(w http.ResponseWriter) error

type DeleteChannel403ApplicationProblemPlusJSONResponse

type DeleteChannel403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteChannel403ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse

func (response DeleteChannel403ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse(w http.ResponseWriter) error

type DeleteChannel404ApplicationProblemPlusJSONResponse

type DeleteChannel404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteChannel404ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse

func (response DeleteChannel404ApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse(w http.ResponseWriter) error

type DeleteChannelOverwrite200JSONResponse

type DeleteChannelOverwrite200JSONResponse StatusOk

func (DeleteChannelOverwrite200JSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwrite200JSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelOverwrite400ApplicationProblemPlusJSONResponse

type DeleteChannelOverwrite400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteChannelOverwrite400ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwrite400ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelOverwrite401ApplicationProblemPlusJSONResponse

type DeleteChannelOverwrite401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteChannelOverwrite401ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwrite401ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelOverwrite403ApplicationProblemPlusJSONResponse

type DeleteChannelOverwrite403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteChannelOverwrite403ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwrite403ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelOverwrite404ApplicationProblemPlusJSONResponse

type DeleteChannelOverwrite404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteChannelOverwrite404ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwrite404ApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelOverwriteParamsTargetType

type DeleteChannelOverwriteParamsTargetType string

DeleteChannelOverwriteParamsTargetType defines parameters for DeleteChannelOverwrite.

const (
	DeleteChannelOverwriteParamsTargetTypeMember DeleteChannelOverwriteParamsTargetType = "member"
	DeleteChannelOverwriteParamsTargetTypeRole   DeleteChannelOverwriteParamsTargetType = "role"
)

Defines values for DeleteChannelOverwriteParamsTargetType.

func (DeleteChannelOverwriteParamsTargetType) Valid

Valid indicates whether the value is a known member of the DeleteChannelOverwriteParamsTargetType enum.

type DeleteChannelOverwriteRequestObject

type DeleteChannelOverwriteRequestObject struct {
	Id         IDPath                                 `json:"id"`
	TargetType DeleteChannelOverwriteParamsTargetType `json:"target_type"`
	TargetId   TargetIDPath                           `json:"target_id"`
}

type DeleteChannelOverwriteResponseObject

type DeleteChannelOverwriteResponseObject interface {
	VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error
}

type DeleteChannelOverwritedefaultApplicationProblemPlusJSONResponse

type DeleteChannelOverwritedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteChannelOverwritedefaultApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse

func (response DeleteChannelOverwritedefaultApplicationProblemPlusJSONResponse) VisitDeleteChannelOverwriteResponse(w http.ResponseWriter) error

type DeleteChannelRequestObject

type DeleteChannelRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteChannelResponseObject

type DeleteChannelResponseObject interface {
	VisitDeleteChannelResponse(w http.ResponseWriter) error
}

type DeleteChanneldefaultApplicationProblemPlusJSONResponse

type DeleteChanneldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteChanneldefaultApplicationProblemPlusJSONResponse) VisitDeleteChannelResponse

type DeleteConversation204Response

type DeleteConversation204Response struct {
}

func (DeleteConversation204Response) VisitDeleteConversationResponse

func (response DeleteConversation204Response) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteConversation400ApplicationProblemPlusJSONResponse

type DeleteConversation400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteConversation400ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse

func (response DeleteConversation400ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteConversation401ApplicationProblemPlusJSONResponse

type DeleteConversation401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteConversation401ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse

func (response DeleteConversation401ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteConversation403ApplicationProblemPlusJSONResponse

type DeleteConversation403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteConversation403ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse

func (response DeleteConversation403ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteConversation404ApplicationProblemPlusJSONResponse

type DeleteConversation404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteConversation404ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse

func (response DeleteConversation404ApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteConversationRequestObject

type DeleteConversationRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteConversationResponseObject

type DeleteConversationResponseObject interface {
	VisitDeleteConversationResponse(w http.ResponseWriter) error
}

type DeleteConversationdefaultApplicationProblemPlusJSONResponse

type DeleteConversationdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteConversationdefaultApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse

func (response DeleteConversationdefaultApplicationProblemPlusJSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error

type DeleteDevice200JSONResponse

type DeleteDevice200JSONResponse StatusOk

func (DeleteDevice200JSONResponse) VisitDeleteDeviceResponse

func (response DeleteDevice200JSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error

type DeleteDevice400ApplicationProblemPlusJSONResponse

type DeleteDevice400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteDevice400ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse

func (response DeleteDevice400ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error

type DeleteDevice404ApplicationProblemPlusJSONResponse

type DeleteDevice404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteDevice404ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse

func (response DeleteDevice404ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error

type DeleteDevice429ApplicationProblemPlusJSONResponse

type DeleteDevice429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DeleteDevice429ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse

func (response DeleteDevice429ApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error

type DeleteDeviceRequestObject

type DeleteDeviceRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteDeviceResponseObject

type DeleteDeviceResponseObject interface {
	VisitDeleteDeviceResponse(w http.ResponseWriter) error
}

type DeleteDevicedefaultApplicationProblemPlusJSONResponse

type DeleteDevicedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteDevicedefaultApplicationProblemPlusJSONResponse) VisitDeleteDeviceResponse

type DeleteFriend200JSONResponse

type DeleteFriend200JSONResponse StatusOk

func (DeleteFriend200JSONResponse) VisitDeleteFriendResponse

func (response DeleteFriend200JSONResponse) VisitDeleteFriendResponse(w http.ResponseWriter) error

type DeleteFriend400ApplicationProblemPlusJSONResponse

type DeleteFriend400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteFriend400ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse

func (response DeleteFriend400ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse(w http.ResponseWriter) error

type DeleteFriend401ApplicationProblemPlusJSONResponse

type DeleteFriend401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteFriend401ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse

func (response DeleteFriend401ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse(w http.ResponseWriter) error

type DeleteFriend403ApplicationProblemPlusJSONResponse

type DeleteFriend403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteFriend403ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse

func (response DeleteFriend403ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse(w http.ResponseWriter) error

type DeleteFriend404ApplicationProblemPlusJSONResponse

type DeleteFriend404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteFriend404ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse

func (response DeleteFriend404ApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse(w http.ResponseWriter) error

type DeleteFriendRequestObject

type DeleteFriendRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteFriendResponseObject

type DeleteFriendResponseObject interface {
	VisitDeleteFriendResponse(w http.ResponseWriter) error
}

type DeleteFrienddefaultApplicationProblemPlusJSONResponse

type DeleteFrienddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteFrienddefaultApplicationProblemPlusJSONResponse) VisitDeleteFriendResponse

type DeleteInboundWebhook200JSONResponse

type DeleteInboundWebhook200JSONResponse StatusOk

func (DeleteInboundWebhook200JSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook200JSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhook400ApplicationProblemPlusJSONResponse

type DeleteInboundWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteInboundWebhook400ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook400ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhook401ApplicationProblemPlusJSONResponse

type DeleteInboundWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteInboundWebhook401ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook401ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhook403ApplicationProblemPlusJSONResponse

type DeleteInboundWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteInboundWebhook403ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook403ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhook404ApplicationProblemPlusJSONResponse

type DeleteInboundWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteInboundWebhook404ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook404ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhook429ApplicationProblemPlusJSONResponse

type DeleteInboundWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DeleteInboundWebhook429ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhook429ApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteInboundWebhookRequestObject

type DeleteInboundWebhookRequestObject struct {
	Id  IDPath        `json:"id"`
	Wid WebhookIDPath `json:"wid"`
}

type DeleteInboundWebhookResponseObject

type DeleteInboundWebhookResponseObject interface {
	VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error
}

type DeleteInboundWebhookdefaultApplicationProblemPlusJSONResponse

type DeleteInboundWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse

func (response DeleteInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeleteInboundWebhookResponse(w http.ResponseWriter) error

type DeleteMessage204Response

type DeleteMessage204Response struct {
}

func (DeleteMessage204Response) VisitDeleteMessageResponse

func (response DeleteMessage204Response) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessage400ApplicationProblemPlusJSONResponse

type DeleteMessage400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteMessage400ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

func (response DeleteMessage400ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessage401ApplicationProblemPlusJSONResponse

type DeleteMessage401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteMessage401ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

func (response DeleteMessage401ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessage403ApplicationProblemPlusJSONResponse

type DeleteMessage403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteMessage403ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

func (response DeleteMessage403ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessage404ApplicationProblemPlusJSONResponse

type DeleteMessage404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteMessage404ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

func (response DeleteMessage404ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessage429ApplicationProblemPlusJSONResponse

type DeleteMessage429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DeleteMessage429ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

func (response DeleteMessage429ApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse(w http.ResponseWriter) error

type DeleteMessageRequestObject

type DeleteMessageRequestObject struct {
	Id        IDPath        `json:"id"`
	MessageId MessageIDPath `json:"message_id"`
}

type DeleteMessageResponseObject

type DeleteMessageResponseObject interface {
	VisitDeleteMessageResponse(w http.ResponseWriter) error
}

type DeleteMessagedefaultApplicationProblemPlusJSONResponse

type DeleteMessagedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteMessagedefaultApplicationProblemPlusJSONResponse) VisitDeleteMessageResponse

type DeleteRole200JSONResponse

type DeleteRole200JSONResponse StatusOk

func (DeleteRole200JSONResponse) VisitDeleteRoleResponse

func (response DeleteRole200JSONResponse) VisitDeleteRoleResponse(w http.ResponseWriter) error

type DeleteRole400ApplicationProblemPlusJSONResponse

type DeleteRole400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteRole400ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse

func (response DeleteRole400ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse(w http.ResponseWriter) error

type DeleteRole401ApplicationProblemPlusJSONResponse

type DeleteRole401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteRole401ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse

func (response DeleteRole401ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse(w http.ResponseWriter) error

type DeleteRole403ApplicationProblemPlusJSONResponse

type DeleteRole403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteRole403ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse

func (response DeleteRole403ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse(w http.ResponseWriter) error

type DeleteRole404ApplicationProblemPlusJSONResponse

type DeleteRole404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteRole404ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse

func (response DeleteRole404ApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse(w http.ResponseWriter) error

type DeleteRoleRequestObject

type DeleteRoleRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteRoleResponseObject

type DeleteRoleResponseObject interface {
	VisitDeleteRoleResponse(w http.ResponseWriter) error
}

type DeleteRoledefaultApplicationProblemPlusJSONResponse

type DeleteRoledefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteRoledefaultApplicationProblemPlusJSONResponse) VisitDeleteRoleResponse

type DeleteServer200JSONResponse

type DeleteServer200JSONResponse StatusOk

func (DeleteServer200JSONResponse) VisitDeleteServerResponse

func (response DeleteServer200JSONResponse) VisitDeleteServerResponse(w http.ResponseWriter) error

type DeleteServer400ApplicationProblemPlusJSONResponse

type DeleteServer400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteServer400ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse

func (response DeleteServer400ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse(w http.ResponseWriter) error

type DeleteServer401ApplicationProblemPlusJSONResponse

type DeleteServer401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteServer401ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse

func (response DeleteServer401ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse(w http.ResponseWriter) error

type DeleteServer403ApplicationProblemPlusJSONResponse

type DeleteServer403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteServer403ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse

func (response DeleteServer403ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse(w http.ResponseWriter) error

type DeleteServer404ApplicationProblemPlusJSONResponse

type DeleteServer404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteServer404ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse

func (response DeleteServer404ApplicationProblemPlusJSONResponse) VisitDeleteServerResponse(w http.ResponseWriter) error

type DeleteServerRequestObject

type DeleteServerRequestObject struct {
	Id IDPath `json:"id"`
}

type DeleteServerResponseObject

type DeleteServerResponseObject interface {
	VisitDeleteServerResponse(w http.ResponseWriter) error
}

type DeleteServerWebhook200JSONResponse

type DeleteServerWebhook200JSONResponse StatusOk

func (DeleteServerWebhook200JSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook200JSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhook400ApplicationProblemPlusJSONResponse

type DeleteServerWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeleteServerWebhook400ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook400ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhook401ApplicationProblemPlusJSONResponse

type DeleteServerWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (DeleteServerWebhook401ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook401ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhook403ApplicationProblemPlusJSONResponse

type DeleteServerWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (DeleteServerWebhook403ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook403ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhook404ApplicationProblemPlusJSONResponse

type DeleteServerWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeleteServerWebhook404ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook404ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhook429ApplicationProblemPlusJSONResponse

type DeleteServerWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DeleteServerWebhook429ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhook429ApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerWebhookRequestObject

type DeleteServerWebhookRequestObject struct {
	Id  IDPath        `json:"id"`
	Wid WebhookIDPath `json:"wid"`
}

type DeleteServerWebhookResponseObject

type DeleteServerWebhookResponseObject interface {
	VisitDeleteServerWebhookResponse(w http.ResponseWriter) error
}

type DeleteServerWebhookdefaultApplicationProblemPlusJSONResponse

type DeleteServerWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse

func (response DeleteServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeleteServerWebhookResponse(w http.ResponseWriter) error

type DeleteServerdefaultApplicationProblemPlusJSONResponse

type DeleteServerdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteServerdefaultApplicationProblemPlusJSONResponse) VisitDeleteServerResponse

type DeliverInboundWebhook200JSONResponse

type DeliverInboundWebhook200JSONResponse StatusOk

func (DeliverInboundWebhook200JSONResponse) VisitDeliverInboundWebhookResponse

func (response DeliverInboundWebhook200JSONResponse) VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error

type DeliverInboundWebhook400ApplicationProblemPlusJSONResponse

type DeliverInboundWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DeliverInboundWebhook400ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse

func (response DeliverInboundWebhook400ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error

type DeliverInboundWebhook404ApplicationProblemPlusJSONResponse

type DeliverInboundWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DeliverInboundWebhook404ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse

func (response DeliverInboundWebhook404ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error

type DeliverInboundWebhook429ApplicationProblemPlusJSONResponse

type DeliverInboundWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DeliverInboundWebhook429ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse

func (response DeliverInboundWebhook429ApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error

type DeliverInboundWebhookJSONRequestBody

type DeliverInboundWebhookJSONRequestBody = InboundDeliveryRequest

DeliverInboundWebhookJSONRequestBody defines body for DeliverInboundWebhook for application/json ContentType.

type DeliverInboundWebhookRequestObject

type DeliverInboundWebhookRequestObject struct {
	Id     IDPath     `json:"id"`
	Secret SecretPath `json:"secret"`
	Body   *DeliverInboundWebhookJSONRequestBody
}

type DeliverInboundWebhookResponseObject

type DeliverInboundWebhookResponseObject interface {
	VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error
}

type DeliverInboundWebhookdefaultApplicationProblemPlusJSONResponse

type DeliverInboundWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeliverInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse

func (response DeliverInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitDeliverInboundWebhookResponse(w http.ResponseWriter) error

type DownloadAttachment200ApplicationoctetStreamResponse

type DownloadAttachment200ApplicationoctetStreamResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (DownloadAttachment200ApplicationoctetStreamResponse) VisitDownloadAttachmentResponse

func (response DownloadAttachment200ApplicationoctetStreamResponse) VisitDownloadAttachmentResponse(w http.ResponseWriter) error

type DownloadAttachment400ApplicationProblemPlusJSONResponse

type DownloadAttachment400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DownloadAttachment400ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse

func (response DownloadAttachment400ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse(w http.ResponseWriter) error

type DownloadAttachment404ApplicationProblemPlusJSONResponse

type DownloadAttachment404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DownloadAttachment404ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse

func (response DownloadAttachment404ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse(w http.ResponseWriter) error

type DownloadAttachment429ApplicationProblemPlusJSONResponse

type DownloadAttachment429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DownloadAttachment429ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse

func (response DownloadAttachment429ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse(w http.ResponseWriter) error

type DownloadAttachmentParams

type DownloadAttachmentParams struct {
	// Key 附件下载能力凭证(上传响应 url 中的 256 位 hex)。缺参由生成层 400; 空值或不匹配一律 404,不区分「不存在」与「凭证错误」。
	Key AttachmentKeyQuery `form:"key" json:"key"`
}

DownloadAttachmentParams defines parameters for DownloadAttachment.

type DownloadAttachmentRequestObject

type DownloadAttachmentRequestObject struct {
	Id     IDPath `json:"id"`
	Params DownloadAttachmentParams
}

type DownloadAttachmentResponseObject

type DownloadAttachmentResponseObject interface {
	VisitDownloadAttachmentResponse(w http.ResponseWriter) error
}

type DownloadAttachmentThumbnail200ApplicationoctetStreamResponse

type DownloadAttachmentThumbnail200ApplicationoctetStreamResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (DownloadAttachmentThumbnail200ApplicationoctetStreamResponse) VisitDownloadAttachmentThumbnailResponse

func (response DownloadAttachmentThumbnail200ApplicationoctetStreamResponse) VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error

type DownloadAttachmentThumbnail400ApplicationProblemPlusJSONResponse

type DownloadAttachmentThumbnail400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (DownloadAttachmentThumbnail400ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse

func (response DownloadAttachmentThumbnail400ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error

type DownloadAttachmentThumbnail404ApplicationProblemPlusJSONResponse

type DownloadAttachmentThumbnail404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (DownloadAttachmentThumbnail404ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse

func (response DownloadAttachmentThumbnail404ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error

type DownloadAttachmentThumbnail429ApplicationProblemPlusJSONResponse

type DownloadAttachmentThumbnail429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (DownloadAttachmentThumbnail429ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse

func (response DownloadAttachmentThumbnail429ApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error

type DownloadAttachmentThumbnailParams

type DownloadAttachmentThumbnailParams struct {
	// Key 附件下载能力凭证(上传响应 url 中的 256 位 hex)。缺参由生成层 400; 空值或不匹配一律 404,不区分「不存在」与「凭证错误」。
	Key AttachmentKeyQuery `form:"key" json:"key"`
}

DownloadAttachmentThumbnailParams defines parameters for DownloadAttachmentThumbnail.

type DownloadAttachmentThumbnailRequestObject

type DownloadAttachmentThumbnailRequestObject struct {
	Id     IDPath `json:"id"`
	Params DownloadAttachmentThumbnailParams
}

type DownloadAttachmentThumbnailResponseObject

type DownloadAttachmentThumbnailResponseObject interface {
	VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error
}

type DownloadAttachmentThumbnaildefaultApplicationProblemPlusJSONResponse

type DownloadAttachmentThumbnaildefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DownloadAttachmentThumbnaildefaultApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse

func (response DownloadAttachmentThumbnaildefaultApplicationProblemPlusJSONResponse) VisitDownloadAttachmentThumbnailResponse(w http.ResponseWriter) error

type DownloadAttachmentdefaultApplicationProblemPlusJSONResponse

type DownloadAttachmentdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DownloadAttachmentdefaultApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse

func (response DownloadAttachmentdefaultApplicationProblemPlusJSONResponse) VisitDownloadAttachmentResponse(w http.ResponseWriter) error

type EditMessage200JSONResponse

type EditMessage200JSONResponse Message

func (EditMessage200JSONResponse) VisitEditMessageResponse

func (response EditMessage200JSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessage400ApplicationProblemPlusJSONResponse

type EditMessage400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (EditMessage400ApplicationProblemPlusJSONResponse) VisitEditMessageResponse

func (response EditMessage400ApplicationProblemPlusJSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessage401ApplicationProblemPlusJSONResponse

type EditMessage401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (EditMessage401ApplicationProblemPlusJSONResponse) VisitEditMessageResponse

func (response EditMessage401ApplicationProblemPlusJSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessage403ApplicationProblemPlusJSONResponse

type EditMessage403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (EditMessage403ApplicationProblemPlusJSONResponse) VisitEditMessageResponse

func (response EditMessage403ApplicationProblemPlusJSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessage404ApplicationProblemPlusJSONResponse

type EditMessage404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (EditMessage404ApplicationProblemPlusJSONResponse) VisitEditMessageResponse

func (response EditMessage404ApplicationProblemPlusJSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessage429ApplicationProblemPlusJSONResponse

type EditMessage429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (EditMessage429ApplicationProblemPlusJSONResponse) VisitEditMessageResponse

func (response EditMessage429ApplicationProblemPlusJSONResponse) VisitEditMessageResponse(w http.ResponseWriter) error

type EditMessageJSONRequestBody

type EditMessageJSONRequestBody = EditMessageRequest

EditMessageJSONRequestBody defines body for EditMessage for application/json ContentType.

type EditMessageRequest

type EditMessageRequest struct {
	// Content 1–2000 字符
	Content string `json:"content"`

	// Mentions @提及用户 ID(#39):缺省 = 保持原提及不变;给出 = 整体替换, 空数组清除全部提及。去重,元素须 > 0;每个用户必须是该频道可见成员, 否则 400 bad_mention。
	Mentions *[]ID `json:"mentions,omitempty"`
}

EditMessageRequest defines model for EditMessageRequest.

type EditMessageRequestObject

type EditMessageRequestObject struct {
	Id        IDPath        `json:"id"`
	MessageId MessageIDPath `json:"message_id"`
	Body      *EditMessageJSONRequestBody
}

type EditMessageResponseObject

type EditMessageResponseObject interface {
	VisitEditMessageResponse(w http.ResponseWriter) error
}

type EditMessagedefaultApplicationProblemPlusJSONResponse

type EditMessagedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (EditMessagedefaultApplicationProblemPlusJSONResponse) VisitEditMessageResponse

type EmailCodeRequest

type EmailCodeRequest struct {
	Email   string                  `json:"email"`
	Purpose EmailCodeRequestPurpose `json:"purpose"`
}

EmailCodeRequest defines model for EmailCodeRequest.

type EmailCodeRequestPurpose

type EmailCodeRequestPurpose string

EmailCodeRequestPurpose defines model for EmailCodeRequest.Purpose.

const (
	Register EmailCodeRequestPurpose = "register"
	Reset    EmailCodeRequestPurpose = "reset"
)

Defines values for EmailCodeRequestPurpose.

func (EmailCodeRequestPurpose) Valid

func (e EmailCodeRequestPurpose) Valid() bool

Valid indicates whether the value is a known member of the EmailCodeRequestPurpose enum.

type Forbidden

type Forbidden = Problem

Forbidden RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type ForbiddenApplicationProblemPlusJSONResponse

type ForbiddenApplicationProblemPlusJSONResponse Problem

type FriendEntry

type FriendEntry struct {
	// ChannelId 对端当前语音频道 ID(#92,可选);与 server_id 同现同缺。 仅 accepted 且对端在线、查看者对该频道有 ViewChannel 权限时出现。
	ChannelId *ID    `json:"channel_id,omitempty"`
	Group     string `json:"group"`

	// Id 关系行 ID(请求数)
	Id ID `json:"id"`

	// Incoming true = 对端发起(我是被请求方)
	Incoming bool   `json:"incoming"`
	Remark   string `json:"remark"`

	// ServerId channel_id 所属服务器 ID(#92,可选);与 channel_id 同现同缺。
	ServerId *ID               `json:"server_id,omitempty"`
	Status   FriendEntryStatus `json:"status"`

	// User 对端 PublicUser;对端查询失败时为 null(仅 accept/patch 极端情况)
	User *PublicUser `json:"user"`
}

FriendEntry 好友条目。remark/group 仅发起方视角非空(被请求方恒空串)。 user 为 PublicUser(无 email)。 channel_id/server_id 是对端当前语音房快照(#92 好友频道 presence), 两字段必须同时出现或同时缺省:仅 accepted 且在线、且查看者对该频道有 ViewChannel 权限时出现;无权限/查询故障时键缺省(不得泄露频道)。 载荷不含频道名。

type FriendEntryStatus

type FriendEntryStatus string

FriendEntryStatus defines model for FriendEntry.Status.

const (
	Accepted FriendEntryStatus = "accepted"
	Blocked  FriendEntryStatus = "blocked"
	Pending  FriendEntryStatus = "pending"
)

Defines values for FriendEntryStatus.

func (FriendEntryStatus) Valid

func (e FriendEntryStatus) Valid() bool

Valid indicates whether the value is a known member of the FriendEntryStatus enum.

type GetConfig200JSONResponse

type GetConfig200JSONResponse ServerConfig

func (GetConfig200JSONResponse) VisitGetConfigResponse

func (response GetConfig200JSONResponse) VisitGetConfigResponse(w http.ResponseWriter) error

type GetConfigRequestObject

type GetConfigRequestObject struct {
}

type GetConfigResponseObject

type GetConfigResponseObject interface {
	VisitGetConfigResponse(w http.ResponseWriter) error
}

type GetConversation200JSONResponse

type GetConversation200JSONResponse Conversation

func (GetConversation200JSONResponse) VisitGetConversationResponse

func (response GetConversation200JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error

type GetConversation400ApplicationProblemPlusJSONResponse

type GetConversation400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (GetConversation400ApplicationProblemPlusJSONResponse) VisitGetConversationResponse

func (response GetConversation400ApplicationProblemPlusJSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error

type GetConversation401ApplicationProblemPlusJSONResponse

type GetConversation401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (GetConversation401ApplicationProblemPlusJSONResponse) VisitGetConversationResponse

func (response GetConversation401ApplicationProblemPlusJSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error

type GetConversation404ApplicationProblemPlusJSONResponse

type GetConversation404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (GetConversation404ApplicationProblemPlusJSONResponse) VisitGetConversationResponse

func (response GetConversation404ApplicationProblemPlusJSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error

type GetConversationRequestObject

type GetConversationRequestObject struct {
	Id IDPath `json:"id"`
}

type GetConversationResponseObject

type GetConversationResponseObject interface {
	VisitGetConversationResponse(w http.ResponseWriter) error
}

type GetConversationdefaultApplicationProblemPlusJSONResponse

type GetConversationdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetConversationdefaultApplicationProblemPlusJSONResponse) VisitGetConversationResponse

func (response GetConversationdefaultApplicationProblemPlusJSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error

type GetHealthz200JSONResponse

type GetHealthz200JSONResponse Healthz

func (GetHealthz200JSONResponse) VisitGetHealthzResponse

func (response GetHealthz200JSONResponse) VisitGetHealthzResponse(w http.ResponseWriter) error

type GetHealthz405ApplicationProblemPlusJSONResponse

type GetHealthz405ApplicationProblemPlusJSONResponse struct {
	MethodNotAllowedApplicationProblemPlusJSONResponse
}

func (GetHealthz405ApplicationProblemPlusJSONResponse) VisitGetHealthzResponse

func (response GetHealthz405ApplicationProblemPlusJSONResponse) VisitGetHealthzResponse(w http.ResponseWriter) error

type GetHealthzRequestObject

type GetHealthzRequestObject struct {
}

type GetHealthzResponseObject

type GetHealthzResponseObject interface {
	VisitGetHealthzResponse(w http.ResponseWriter) error
}

type GetLinkPreview200JSONResponse

type GetLinkPreview200JSONResponse LinkPreview

func (GetLinkPreview200JSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreview200JSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetLinkPreview400ApplicationProblemPlusJSONResponse

type GetLinkPreview400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (GetLinkPreview400ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreview400ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetLinkPreview401ApplicationProblemPlusJSONResponse

type GetLinkPreview401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (GetLinkPreview401ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreview401ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetLinkPreview404ApplicationProblemPlusJSONResponse

type GetLinkPreview404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (GetLinkPreview404ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreview404ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetLinkPreview429ApplicationProblemPlusJSONResponse

type GetLinkPreview429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (GetLinkPreview429ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreview429ApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetLinkPreviewParams

type GetLinkPreviewParams struct {
	// Url 目标页面地址(http/https,1–2048 字符)
	Url string `form:"url" json:"url"`
}

GetLinkPreviewParams defines parameters for GetLinkPreview.

type GetLinkPreviewRequestObject

type GetLinkPreviewRequestObject struct {
	Params GetLinkPreviewParams
}

type GetLinkPreviewResponseObject

type GetLinkPreviewResponseObject interface {
	VisitGetLinkPreviewResponse(w http.ResponseWriter) error
}

type GetLinkPreviewdefaultApplicationProblemPlusJSONResponse

type GetLinkPreviewdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetLinkPreviewdefaultApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse

func (response GetLinkPreviewdefaultApplicationProblemPlusJSONResponse) VisitGetLinkPreviewResponse(w http.ResponseWriter) error

type GetMe200JSONResponse

type GetMe200JSONResponse User

func (GetMe200JSONResponse) VisitGetMeResponse

func (response GetMe200JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error

type GetMe401ApplicationProblemPlusJSONResponse

type GetMe401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (GetMe401ApplicationProblemPlusJSONResponse) VisitGetMeResponse

type GetMe404ApplicationProblemPlusJSONResponse

type GetMe404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (GetMe404ApplicationProblemPlusJSONResponse) VisitGetMeResponse

type GetMeRequestObject

type GetMeRequestObject struct {
}

type GetMeResponseObject

type GetMeResponseObject interface {
	VisitGetMeResponse(w http.ResponseWriter) error
}

type GetMedefaultApplicationProblemPlusJSONResponse

type GetMedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetMedefaultApplicationProblemPlusJSONResponse) VisitGetMeResponse

type GetMessage200JSONResponse

type GetMessage200JSONResponse Message

func (GetMessage200JSONResponse) VisitGetMessageResponse

func (response GetMessage200JSONResponse) VisitGetMessageResponse(w http.ResponseWriter) error

type GetMessage400ApplicationProblemPlusJSONResponse

type GetMessage400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (GetMessage400ApplicationProblemPlusJSONResponse) VisitGetMessageResponse

func (response GetMessage400ApplicationProblemPlusJSONResponse) VisitGetMessageResponse(w http.ResponseWriter) error

type GetMessage401ApplicationProblemPlusJSONResponse

type GetMessage401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (GetMessage401ApplicationProblemPlusJSONResponse) VisitGetMessageResponse

func (response GetMessage401ApplicationProblemPlusJSONResponse) VisitGetMessageResponse(w http.ResponseWriter) error

type GetMessage403ApplicationProblemPlusJSONResponse

type GetMessage403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (GetMessage403ApplicationProblemPlusJSONResponse) VisitGetMessageResponse

func (response GetMessage403ApplicationProblemPlusJSONResponse) VisitGetMessageResponse(w http.ResponseWriter) error

type GetMessage404ApplicationProblemPlusJSONResponse

type GetMessage404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (GetMessage404ApplicationProblemPlusJSONResponse) VisitGetMessageResponse

func (response GetMessage404ApplicationProblemPlusJSONResponse) VisitGetMessageResponse(w http.ResponseWriter) error

type GetMessageRequestObject

type GetMessageRequestObject struct {
	Id        IDPath        `json:"id"`
	MessageId MessageIDPath `json:"message_id"`
}

type GetMessageResponseObject

type GetMessageResponseObject interface {
	VisitGetMessageResponse(w http.ResponseWriter) error
}

type GetMessagedefaultApplicationProblemPlusJSONResponse

type GetMessagedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetMessagedefaultApplicationProblemPlusJSONResponse) VisitGetMessageResponse

type GetSync200JSONResponse

type GetSync200JSONResponse SyncSnapshot

func (GetSync200JSONResponse) VisitGetSyncResponse

func (response GetSync200JSONResponse) VisitGetSyncResponse(w http.ResponseWriter) error

type GetSync401ApplicationProblemPlusJSONResponse

type GetSync401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (GetSync401ApplicationProblemPlusJSONResponse) VisitGetSyncResponse

func (response GetSync401ApplicationProblemPlusJSONResponse) VisitGetSyncResponse(w http.ResponseWriter) error

type GetSyncRequestObject

type GetSyncRequestObject struct {
}

type GetSyncResponseObject

type GetSyncResponseObject interface {
	VisitGetSyncResponse(w http.ResponseWriter) error
}

type GetSyncdefaultApplicationProblemPlusJSONResponse

type GetSyncdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetSyncdefaultApplicationProblemPlusJSONResponse) VisitGetSyncResponse

type Gone

type Gone = Problem

Gone RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type GoneApplicationProblemPlusJSONResponse

type GoneApplicationProblemPlusJSONResponse Problem

type GuestLogin201JSONResponse

type GuestLogin201JSONResponse TokenPair

func (GuestLogin201JSONResponse) VisitGuestLoginResponse

func (response GuestLogin201JSONResponse) VisitGuestLoginResponse(w http.ResponseWriter) error

type GuestLogin400ApplicationProblemPlusJSONResponse

type GuestLogin400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (GuestLogin400ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse

func (response GuestLogin400ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse(w http.ResponseWriter) error

type GuestLogin403ApplicationProblemPlusJSONResponse

type GuestLogin403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (GuestLogin403ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse

func (response GuestLogin403ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse(w http.ResponseWriter) error

type GuestLogin426ApplicationProblemPlusJSONResponse

type GuestLogin426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (GuestLogin426ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse

func (response GuestLogin426ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse(w http.ResponseWriter) error

type GuestLogin429ApplicationProblemPlusJSONResponse

type GuestLogin429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (GuestLogin429ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse

func (response GuestLogin429ApplicationProblemPlusJSONResponse) VisitGuestLoginResponse(w http.ResponseWriter) error

type GuestLoginJSONRequestBody

type GuestLoginJSONRequestBody = GuestRequest

GuestLoginJSONRequestBody defines body for GuestLogin for application/json ContentType.

type GuestLoginRequestObject

type GuestLoginRequestObject struct {
	Body *GuestLoginJSONRequestBody
}

type GuestLoginResponseObject

type GuestLoginResponseObject interface {
	VisitGuestLoginResponse(w http.ResponseWriter) error
}

type GuestLogindefaultApplicationProblemPlusJSONResponse

type GuestLogindefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GuestLogindefaultApplicationProblemPlusJSONResponse) VisitGuestLoginResponse

type GuestRequest

type GuestRequest struct {
	Device *string `json:"device,omitempty"`
}

GuestRequest 请求体可为空(老客户端兼容)。

type Healthz

type Healthz struct {
	Status HealthzStatus `json:"status"`

	// Version 服务端构建版本(未注入版本号的本地构建为 dev)
	Version string `json:"version"`
}

Healthz 部署探活响应。路径与方法被部署脚本依赖,不得变更。

type HealthzStatus

type HealthzStatus string

HealthzStatus defines model for Healthz.Status.

const (
	HealthzStatusOk HealthzStatus = "ok"
)

Defines values for HealthzStatus.

func (HealthzStatus) Valid

func (e HealthzStatus) Valid() bool

Valid indicates whether the value is a known member of the HealthzStatus enum.

type Hub

type Hub interface {
	Kick(uid, dev, reason string)
	KickChannel(channelID, reason string)
	// SetServerMuted 服务端强制闭麦/解禁(#36):目标不在该频道返回 signal.ErrNotInChannel。
	SetServerMuted(channelID, userID string, muted bool) error
	// BroadcastConversationChanged 会话变更通知(#38 B3):uids 为十进制用户 ID,
	// 动作见 signal.ConversationChangedData.Action。空列表不广播。
	BroadcastConversationChanged(uids []string, conversationID, action string)
	// BroadcastMessageEdited 消息编辑广播(#39):uids 为十进制用户 ID(调用方已按
	// 频道可见性过滤);editedAt 为 Unix 毫秒。
	BroadcastMessageEdited(uids []string, channelID, messageID, content string, editedAt int64, mentions []string)
	// BroadcastMessageDeleted 消息软删除广播(#39):目标口径同上。
	BroadcastMessageDeleted(uids []string, channelID, messageID string)
	// BroadcastChannelUnread 未读计数变更(#40):counts 按十进制 uid 给每个
	// 接收者自己的精确计数,只推给该用户(不进其他人的事件环)。空 map 不广播。
	BroadcastChannelUnread(channelID string, counts map[string]store.Unread)
	// BroadcastChannelAudio 语音频道音质变更(#46):uids 为十进制用户 ID
	//(调用方已按频道 ViewChannel 可见性过滤);0 表示跟随设置/默认帧长。
	BroadcastChannelAudio(uids []string, channelID string, bitrateKbps, frameMS int)
	// BroadcastVoicePriority 优先发言状态变更(#45):调用方只在频道覆盖变更后
	// 对 member 目标调用;实现只发给该语音房成员的全部在线连接(协议 ≥3)。
	// 角色/成员角色变更不实时广播,重进房由 channel.joined 的 MemberInfo.priority
	// 刷新,因此本方法不覆盖那些路径。
	BroadcastVoicePriority(channelID, userID string, priority bool)
	// RoomHasLegacyClients 该房间当前是否有协议 <3 的连接(#116):PATCH 启用
	// 10ms 帧长前检查,避免与不认识 10ms 的旧客户端混用;房间不存在返回 false。
	RoomHasLegacyClients(channelID string) bool
	// AfterMessagePersisted 消息创建后处理单一管线(P1-4/P2-1):落库成功后的
	// 广播 → 未读 → 推送 → 出站 webhook(webhook 由广播内的 T5 出口挂钩派发,
	// REST/入站不另直发)。WS chat.send / REST CreateMessage / 入站 webhook 投递
	// 三条入口共用同一实现。尽力而为:失败只记日志,不返回错误,绝不把已落库
	// 的消息拖成发送失败。senderUID 为十进制 uid,senderNick 为发送者昵称。
	AfterMessagePersisted(ctx context.Context, ch *store.Channel, msg *store.Message, senderUID, senderNick string)
}

Hub abstracts signal.Hub for logout/reset-password session kicking. Defined here to avoid an import cycle (signal imports store, api imports signal would cycle via main wiring).

type ICEServer

type ICEServer struct {
	// Credential TURN 短期凭证(HMAC-SHA1 base64);STUN 条目无此字段
	Credential *string `json:"credential,omitempty"`

	// Urls stun:/stuns:/turn:/turns: URL 列表
	Urls []string `json:"urls"`

	// Username TURN 短期用户名(<expiry_unix>:<uid>);STUN 条目无此字段
	Username *string `json:"username,omitempty"`
}

ICEServer 单条 ICE server(字段与 WebRTC RTCIceServer 对齐)。

type ID

type ID int64

ID REST wire 上的资源 ID(#31):JSON 一律字符串,避免 JS Number 精度丢失 (Snowflake ≈10^18 超出 2^53)。Unmarshal 双接受数字与字符串——请求侧老客户端 仍发数字不报错;响应侧只出字符串。 路径/查询参数保持十进制整数口径(URL 无精度问题),不在 JSON 范围内。

func (ID) MarshalJSON

func (id ID) MarshalJSON() ([]byte, error)

MarshalJSON 输出十进制字符串。

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(b []byte) error

UnmarshalJSON 接受 123、"123"、null(→0);其它形态报错。

type IDPath

type IDPath = int64

IDPath defines model for IDPath.

type InboundDeliveryRequest

type InboundDeliveryRequest struct {
	// Content 消息正文(与频道消息同限)
	Content string `json:"content"`
}

InboundDeliveryRequest 入站投递体(#52)。消息以 webhook 机器人身份落库。

type InboundWebhook

type InboundWebhook struct {
	CreatedAt Time `json:"created_at"`

	// Description 用途备注(如「CI 告警」)
	Description string `json:"description"`
	Id          ID     `json:"id"`

	// Url 投递路径(相对路径,含一次性 secret,仅创建 / reset_secret 响应)。 调用方自行拼服务器地址后使用。
	Url *string `json:"url,omitempty"`
}

InboundWebhook 频道级入站投递入口(#52)。url 形如 /api/v1/webhooks/{id}/{secret}, 只在创建与 reset_secret(PATCH)响应出现(含一次性 secret);列表响应 不含 secret,泄露即 PATCH reset_secret 轮换或删除重建。 **url 是相对路径**,不含服务器地址,调用方自行拼上 scheme + host + port 后使用。

type Internal

type Internal = Problem

Internal RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type InternalApplicationProblemPlusJSONResponse

type InternalApplicationProblemPlusJSONResponse Problem

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Invite

type Invite struct {
	Code      string `json:"code"`
	CreatorId ID     `json:"creator_id"`
	ExpiresAt *Time  `json:"expires_at,omitempty"`

	// MaxUses 0 = 不限
	MaxUses  int `json:"max_uses"`
	ServerId ID  `json:"server_id"`
	Uses     int `json:"uses"`
}

Invite 邀请码。ID 为十进制字符串(#31)。

type JoinServer200JSONResponse

type JoinServer200JSONResponse ServerInfo

func (JoinServer200JSONResponse) VisitJoinServerResponse

func (response JoinServer200JSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServer400ApplicationProblemPlusJSONResponse

type JoinServer400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (JoinServer400ApplicationProblemPlusJSONResponse) VisitJoinServerResponse

func (response JoinServer400ApplicationProblemPlusJSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServer401ApplicationProblemPlusJSONResponse

type JoinServer401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (JoinServer401ApplicationProblemPlusJSONResponse) VisitJoinServerResponse

func (response JoinServer401ApplicationProblemPlusJSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServer404ApplicationProblemPlusJSONResponse

type JoinServer404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (JoinServer404ApplicationProblemPlusJSONResponse) VisitJoinServerResponse

func (response JoinServer404ApplicationProblemPlusJSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServer409ApplicationProblemPlusJSONResponse

type JoinServer409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (JoinServer409ApplicationProblemPlusJSONResponse) VisitJoinServerResponse

func (response JoinServer409ApplicationProblemPlusJSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServer410ApplicationProblemPlusJSONResponse

type JoinServer410ApplicationProblemPlusJSONResponse struct {
	GoneApplicationProblemPlusJSONResponse
}

func (JoinServer410ApplicationProblemPlusJSONResponse) VisitJoinServerResponse

func (response JoinServer410ApplicationProblemPlusJSONResponse) VisitJoinServerResponse(w http.ResponseWriter) error

type JoinServerJSONRequestBody

type JoinServerJSONRequestBody = JoinServerRequest

JoinServerJSONRequestBody defines body for JoinServer for application/json ContentType.

type JoinServerRequest

type JoinServerRequest struct {
	Code string `json:"code"`
}

JoinServerRequest defines model for JoinServerRequest.

type JoinServerRequestObject

type JoinServerRequestObject struct {
	Body *JoinServerJSONRequestBody
}

type JoinServerResponseObject

type JoinServerResponseObject interface {
	VisitJoinServerResponse(w http.ResponseWriter) error
}

type JoinServerdefaultApplicationProblemPlusJSONResponse

type JoinServerdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (JoinServerdefaultApplicationProblemPlusJSONResponse) VisitJoinServerResponse

type LinkPreview

type LinkPreview struct {
	// Description 描述(OG 优先,回退 meta[name=description]);无则缺省
	Description *string `json:"description,omitempty"`

	// ImageUrl 预览图片绝对地址(og:image 优先,回退 twitter:image);无则缺省
	ImageUrl *string `json:"image_url,omitempty"`

	// SiteName 站点名(og:site_name);无则缺省
	SiteName *string `json:"site_name,omitempty"`

	// Title 标题(OG 优先,回退 <title>、站点名或 host)
	Title string `json:"title"`

	// Url 最终页面地址(跟随重定向后)
	Url string `json:"url"`
}

LinkPreview 链接预览(#42 B4)。url 为跟随重定向后的最终页面地址;文本已折叠空白、 去除控制字符并按 rune 截断(title 200 / description 500 / site_name 100)。 image_url 为绝对地址,仅 http(s) 且通过地址校验时给出;图片由客户端直接 加载,服务端不代理、不抓取。

type LinkPreviewFetcher

type LinkPreviewFetcher interface {
	Fetch(ctx context.Context, rawURL string) (*linkpreview.Preview, error)
}

LinkPreviewFetcher 链接预览抓取器(#42 B4)。生产传 *linkpreview.Fetcher, 测试注入桩。nil = 功能关闭:GET /api/v1/link-preview 一律 404 no_preview。

type ListAuditLog200JSONResponse

type ListAuditLog200JSONResponse []AuditLogEntry

func (ListAuditLog200JSONResponse) VisitListAuditLogResponse

func (response ListAuditLog200JSONResponse) VisitListAuditLogResponse(w http.ResponseWriter) error

type ListAuditLog400ApplicationProblemPlusJSONResponse

type ListAuditLog400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListAuditLog400ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse

func (response ListAuditLog400ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse(w http.ResponseWriter) error

type ListAuditLog401ApplicationProblemPlusJSONResponse

type ListAuditLog401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListAuditLog401ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse

func (response ListAuditLog401ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse(w http.ResponseWriter) error

type ListAuditLog403ApplicationProblemPlusJSONResponse

type ListAuditLog403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListAuditLog403ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse

func (response ListAuditLog403ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse(w http.ResponseWriter) error

type ListAuditLog404ApplicationProblemPlusJSONResponse

type ListAuditLog404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListAuditLog404ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse

func (response ListAuditLog404ApplicationProblemPlusJSONResponse) VisitListAuditLogResponse(w http.ResponseWriter) error

type ListAuditLogParams

type ListAuditLogParams struct {
	// Before 游标(上一页最旧一条的 id);0/缺省取最新页
	Before *int64 `form:"before,omitempty" json:"before,omitempty"`

	// Limit 每页条数(1–50)
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListAuditLogParams defines parameters for ListAuditLog.

type ListAuditLogRequestObject

type ListAuditLogRequestObject struct {
	Id     IDPath `json:"id"`
	Params ListAuditLogParams
}

type ListAuditLogResponseObject

type ListAuditLogResponseObject interface {
	VisitListAuditLogResponse(w http.ResponseWriter) error
}

type ListAuditLogdefaultApplicationProblemPlusJSONResponse

type ListAuditLogdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListAuditLogdefaultApplicationProblemPlusJSONResponse) VisitListAuditLogResponse

type ListChannelOverwrites200JSONResponse

type ListChannelOverwrites200JSONResponse []ChannelOverwrite

func (ListChannelOverwrites200JSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwrites200JSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannelOverwrites400ApplicationProblemPlusJSONResponse

type ListChannelOverwrites400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListChannelOverwrites400ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwrites400ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannelOverwrites401ApplicationProblemPlusJSONResponse

type ListChannelOverwrites401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListChannelOverwrites401ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwrites401ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannelOverwrites403ApplicationProblemPlusJSONResponse

type ListChannelOverwrites403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListChannelOverwrites403ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwrites403ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannelOverwrites404ApplicationProblemPlusJSONResponse

type ListChannelOverwrites404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListChannelOverwrites404ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwrites404ApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannelOverwritesRequestObject

type ListChannelOverwritesRequestObject struct {
	Id IDPath `json:"id"`
}

type ListChannelOverwritesResponseObject

type ListChannelOverwritesResponseObject interface {
	VisitListChannelOverwritesResponse(w http.ResponseWriter) error
}

type ListChannelOverwritesdefaultApplicationProblemPlusJSONResponse

type ListChannelOverwritesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListChannelOverwritesdefaultApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse

func (response ListChannelOverwritesdefaultApplicationProblemPlusJSONResponse) VisitListChannelOverwritesResponse(w http.ResponseWriter) error

type ListChannels200JSONResponse

type ListChannels200JSONResponse ServerChannels

func (ListChannels200JSONResponse) VisitListChannelsResponse

func (response ListChannels200JSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error

type ListChannels304Response

type ListChannels304Response struct {
}

func (ListChannels304Response) VisitListChannelsResponse

func (response ListChannels304Response) VisitListChannelsResponse(w http.ResponseWriter) error

type ListChannels400ApplicationProblemPlusJSONResponse

type ListChannels400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListChannels400ApplicationProblemPlusJSONResponse) VisitListChannelsResponse

func (response ListChannels400ApplicationProblemPlusJSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error

type ListChannels401ApplicationProblemPlusJSONResponse

type ListChannels401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListChannels401ApplicationProblemPlusJSONResponse) VisitListChannelsResponse

func (response ListChannels401ApplicationProblemPlusJSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error

type ListChannels403ApplicationProblemPlusJSONResponse

type ListChannels403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListChannels403ApplicationProblemPlusJSONResponse) VisitListChannelsResponse

func (response ListChannels403ApplicationProblemPlusJSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error

type ListChannelsParams

type ListChannelsParams struct {
	// IfNoneMatch 上次响应的 ETag;命中回 304(#31 协商缓存)
	IfNoneMatch *string `json:"If-None-Match,omitempty"`
}

ListChannelsParams defines parameters for ListChannels.

type ListChannelsRequestObject

type ListChannelsRequestObject struct {
	Id     IDPath `json:"id"`
	Params ListChannelsParams
}

type ListChannelsResponseObject

type ListChannelsResponseObject interface {
	VisitListChannelsResponse(w http.ResponseWriter) error
}

type ListChannelsdefaultApplicationProblemPlusJSONResponse

type ListChannelsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListChannelsdefaultApplicationProblemPlusJSONResponse) VisitListChannelsResponse

type ListConversations200JSONResponse

type ListConversations200JSONResponse []Conversation

func (ListConversations200JSONResponse) VisitListConversationsResponse

func (response ListConversations200JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error

type ListConversations401ApplicationProblemPlusJSONResponse

type ListConversations401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListConversations401ApplicationProblemPlusJSONResponse) VisitListConversationsResponse

func (response ListConversations401ApplicationProblemPlusJSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error

type ListConversationsRequestObject

type ListConversationsRequestObject struct {
}

type ListConversationsResponseObject

type ListConversationsResponseObject interface {
	VisitListConversationsResponse(w http.ResponseWriter) error
}

type ListConversationsdefaultApplicationProblemPlusJSONResponse

type ListConversationsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListConversationsdefaultApplicationProblemPlusJSONResponse) VisitListConversationsResponse

func (response ListConversationsdefaultApplicationProblemPlusJSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error

type ListDevices200JSONResponse

type ListDevices200JSONResponse PushDeviceList

func (ListDevices200JSONResponse) VisitListDevicesResponse

func (response ListDevices200JSONResponse) VisitListDevicesResponse(w http.ResponseWriter) error

type ListDevicesRequestObject

type ListDevicesRequestObject struct {
}

type ListDevicesResponseObject

type ListDevicesResponseObject interface {
	VisitListDevicesResponse(w http.ResponseWriter) error
}

type ListDevicesdefaultApplicationProblemPlusJSONResponse

type ListDevicesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListDevicesdefaultApplicationProblemPlusJSONResponse) VisitListDevicesResponse

type ListFriends200JSONResponse

type ListFriends200JSONResponse []FriendEntry

func (ListFriends200JSONResponse) VisitListFriendsResponse

func (response ListFriends200JSONResponse) VisitListFriendsResponse(w http.ResponseWriter) error

type ListFriends401ApplicationProblemPlusJSONResponse

type ListFriends401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListFriends401ApplicationProblemPlusJSONResponse) VisitListFriendsResponse

func (response ListFriends401ApplicationProblemPlusJSONResponse) VisitListFriendsResponse(w http.ResponseWriter) error

type ListFriendsRequestObject

type ListFriendsRequestObject struct {
}

type ListFriendsResponseObject

type ListFriendsResponseObject interface {
	VisitListFriendsResponse(w http.ResponseWriter) error
}

type ListFriendsdefaultApplicationProblemPlusJSONResponse

type ListFriendsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListFriendsdefaultApplicationProblemPlusJSONResponse) VisitListFriendsResponse

type ListInboundWebhooks200JSONResponse

type ListInboundWebhooks200JSONResponse []InboundWebhook

func (ListInboundWebhooks200JSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooks200JSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListInboundWebhooks400ApplicationProblemPlusJSONResponse

type ListInboundWebhooks400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListInboundWebhooks400ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooks400ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListInboundWebhooks401ApplicationProblemPlusJSONResponse

type ListInboundWebhooks401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListInboundWebhooks401ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooks401ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListInboundWebhooks403ApplicationProblemPlusJSONResponse

type ListInboundWebhooks403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListInboundWebhooks403ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooks403ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListInboundWebhooks404ApplicationProblemPlusJSONResponse

type ListInboundWebhooks404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListInboundWebhooks404ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooks404ApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListInboundWebhooksRequestObject

type ListInboundWebhooksRequestObject struct {
	Id IDPath `json:"id"`
}

type ListInboundWebhooksResponseObject

type ListInboundWebhooksResponseObject interface {
	VisitListInboundWebhooksResponse(w http.ResponseWriter) error
}

type ListInboundWebhooksdefaultApplicationProblemPlusJSONResponse

type ListInboundWebhooksdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListInboundWebhooksdefaultApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse

func (response ListInboundWebhooksdefaultApplicationProblemPlusJSONResponse) VisitListInboundWebhooksResponse(w http.ResponseWriter) error

type ListMentionCandidates200JSONResponse

type ListMentionCandidates200JSONResponse []MentionCandidate

func (ListMentionCandidates200JSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidates200JSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMentionCandidates400ApplicationProblemPlusJSONResponse

type ListMentionCandidates400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListMentionCandidates400ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidates400ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMentionCandidates401ApplicationProblemPlusJSONResponse

type ListMentionCandidates401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListMentionCandidates401ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidates401ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMentionCandidates403ApplicationProblemPlusJSONResponse

type ListMentionCandidates403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListMentionCandidates403ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidates403ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMentionCandidates404ApplicationProblemPlusJSONResponse

type ListMentionCandidates404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListMentionCandidates404ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidates404ApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMentionCandidatesRequestObject

type ListMentionCandidatesRequestObject struct {
	Id IDPath `json:"id"`
}

type ListMentionCandidatesResponseObject

type ListMentionCandidatesResponseObject interface {
	VisitListMentionCandidatesResponse(w http.ResponseWriter) error
}

type ListMentionCandidatesdefaultApplicationProblemPlusJSONResponse

type ListMentionCandidatesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListMentionCandidatesdefaultApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse

func (response ListMentionCandidatesdefaultApplicationProblemPlusJSONResponse) VisitListMentionCandidatesResponse(w http.ResponseWriter) error

type ListMessages200JSONResponse

type ListMessages200JSONResponse []Message

func (ListMessages200JSONResponse) VisitListMessagesResponse

func (response ListMessages200JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages400ApplicationProblemPlusJSONResponse

type ListMessages400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListMessages400ApplicationProblemPlusJSONResponse) VisitListMessagesResponse

func (response ListMessages400ApplicationProblemPlusJSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages401ApplicationProblemPlusJSONResponse

type ListMessages401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListMessages401ApplicationProblemPlusJSONResponse) VisitListMessagesResponse

func (response ListMessages401ApplicationProblemPlusJSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages403ApplicationProblemPlusJSONResponse

type ListMessages403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListMessages403ApplicationProblemPlusJSONResponse) VisitListMessagesResponse

func (response ListMessages403ApplicationProblemPlusJSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages404ApplicationProblemPlusJSONResponse

type ListMessages404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListMessages404ApplicationProblemPlusJSONResponse) VisitListMessagesResponse

func (response ListMessages404ApplicationProblemPlusJSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessagesParams

type ListMessagesParams struct {
	// Before 游标:只取 ID 小于该值的消息(缺省 = 最新一页;显式值须 > 0)
	Before *int64 `form:"before,omitempty" json:"before,omitempty"`

	// After 游标:只取 ID 大于该值的消息(向前翻更新;缺省 = 最旧一页;显式值须 > 0)
	After *int64 `form:"after,omitempty" json:"after,omitempty"`

	// BeforeId before 的旧别名(兼容一个版本,#31;与 before 同义,显式值须 > 0)
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	BeforeId *int64 `form:"before_id,omitempty" json:"before_id,omitempty"`

	// Limit 条数上限(1–50,缺省 50;显式越界返回 400 bad_limit)
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListMessagesParams defines parameters for ListMessages.

type ListMessagesRequestObject

type ListMessagesRequestObject struct {
	Id     IDPath `json:"id"`
	Params ListMessagesParams
}

type ListMessagesResponseObject

type ListMessagesResponseObject interface {
	VisitListMessagesResponse(w http.ResponseWriter) error
}

type ListMessagesdefaultApplicationProblemPlusJSONResponse

type ListMessagesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListMessagesdefaultApplicationProblemPlusJSONResponse) VisitListMessagesResponse

type ListRoles200JSONResponse

type ListRoles200JSONResponse []Role

func (ListRoles200JSONResponse) VisitListRolesResponse

func (response ListRoles200JSONResponse) VisitListRolesResponse(w http.ResponseWriter) error

type ListRoles400ApplicationProblemPlusJSONResponse

type ListRoles400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListRoles400ApplicationProblemPlusJSONResponse) VisitListRolesResponse

func (response ListRoles400ApplicationProblemPlusJSONResponse) VisitListRolesResponse(w http.ResponseWriter) error

type ListRoles401ApplicationProblemPlusJSONResponse

type ListRoles401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListRoles401ApplicationProblemPlusJSONResponse) VisitListRolesResponse

func (response ListRoles401ApplicationProblemPlusJSONResponse) VisitListRolesResponse(w http.ResponseWriter) error

type ListRoles403ApplicationProblemPlusJSONResponse

type ListRoles403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListRoles403ApplicationProblemPlusJSONResponse) VisitListRolesResponse

func (response ListRoles403ApplicationProblemPlusJSONResponse) VisitListRolesResponse(w http.ResponseWriter) error

type ListRoles404ApplicationProblemPlusJSONResponse

type ListRoles404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListRoles404ApplicationProblemPlusJSONResponse) VisitListRolesResponse

func (response ListRoles404ApplicationProblemPlusJSONResponse) VisitListRolesResponse(w http.ResponseWriter) error

type ListRolesRequestObject

type ListRolesRequestObject struct {
	Id IDPath `json:"id"`
}

type ListRolesResponseObject

type ListRolesResponseObject interface {
	VisitListRolesResponse(w http.ResponseWriter) error
}

type ListRolesdefaultApplicationProblemPlusJSONResponse

type ListRolesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListRolesdefaultApplicationProblemPlusJSONResponse) VisitListRolesResponse

type ListServerMembers200JSONResponse

type ListServerMembers200JSONResponse []MemberInfo

func (ListServerMembers200JSONResponse) VisitListServerMembersResponse

func (response ListServerMembers200JSONResponse) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerMembers304Response

type ListServerMembers304Response struct {
}

func (ListServerMembers304Response) VisitListServerMembersResponse

func (response ListServerMembers304Response) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerMembers400ApplicationProblemPlusJSONResponse

type ListServerMembers400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListServerMembers400ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse

func (response ListServerMembers400ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerMembers401ApplicationProblemPlusJSONResponse

type ListServerMembers401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListServerMembers401ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse

func (response ListServerMembers401ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerMembers403ApplicationProblemPlusJSONResponse

type ListServerMembers403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListServerMembers403ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse

func (response ListServerMembers403ApplicationProblemPlusJSONResponse) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerMembersParams

type ListServerMembersParams struct {
	// IfNoneMatch 上次响应的 ETag;命中回 304
	IfNoneMatch *string `json:"If-None-Match,omitempty"`
}

ListServerMembersParams defines parameters for ListServerMembers.

type ListServerMembersRequestObject

type ListServerMembersRequestObject struct {
	Id     IDPath `json:"id"`
	Params ListServerMembersParams
}

type ListServerMembersResponseObject

type ListServerMembersResponseObject interface {
	VisitListServerMembersResponse(w http.ResponseWriter) error
}

type ListServerMembersdefaultApplicationProblemPlusJSONResponse

type ListServerMembersdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListServerMembersdefaultApplicationProblemPlusJSONResponse) VisitListServerMembersResponse

func (response ListServerMembersdefaultApplicationProblemPlusJSONResponse) VisitListServerMembersResponse(w http.ResponseWriter) error

type ListServerWebhooks200JSONResponse

type ListServerWebhooks200JSONResponse []OutboundWebhook

func (ListServerWebhooks200JSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooks200JSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServerWebhooks400ApplicationProblemPlusJSONResponse

type ListServerWebhooks400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ListServerWebhooks400ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooks400ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServerWebhooks401ApplicationProblemPlusJSONResponse

type ListServerWebhooks401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListServerWebhooks401ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooks401ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServerWebhooks403ApplicationProblemPlusJSONResponse

type ListServerWebhooks403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ListServerWebhooks403ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooks403ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServerWebhooks404ApplicationProblemPlusJSONResponse

type ListServerWebhooks404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ListServerWebhooks404ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooks404ApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServerWebhooksRequestObject

type ListServerWebhooksRequestObject struct {
	Id IDPath `json:"id"`
}

type ListServerWebhooksResponseObject

type ListServerWebhooksResponseObject interface {
	VisitListServerWebhooksResponse(w http.ResponseWriter) error
}

type ListServerWebhooksdefaultApplicationProblemPlusJSONResponse

type ListServerWebhooksdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListServerWebhooksdefaultApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse

func (response ListServerWebhooksdefaultApplicationProblemPlusJSONResponse) VisitListServerWebhooksResponse(w http.ResponseWriter) error

type ListServers200JSONResponse

type ListServers200JSONResponse []ServerInfo

func (ListServers200JSONResponse) VisitListServersResponse

func (response ListServers200JSONResponse) VisitListServersResponse(w http.ResponseWriter) error

type ListServers401ApplicationProblemPlusJSONResponse

type ListServers401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListServers401ApplicationProblemPlusJSONResponse) VisitListServersResponse

func (response ListServers401ApplicationProblemPlusJSONResponse) VisitListServersResponse(w http.ResponseWriter) error

type ListServersRequestObject

type ListServersRequestObject struct {
}

type ListServersResponseObject

type ListServersResponseObject interface {
	VisitListServersResponse(w http.ResponseWriter) error
}

type ListServersdefaultApplicationProblemPlusJSONResponse

type ListServersdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListServersdefaultApplicationProblemPlusJSONResponse) VisitListServersResponse

type ListTokens200JSONResponse

type ListTokens200JSONResponse []ApiToken

func (ListTokens200JSONResponse) VisitListTokensResponse

func (response ListTokens200JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokens401ApplicationProblemPlusJSONResponse

type ListTokens401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListTokens401ApplicationProblemPlusJSONResponse) VisitListTokensResponse

func (response ListTokens401ApplicationProblemPlusJSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokensRequestObject

type ListTokensRequestObject struct {
}

type ListTokensResponseObject

type ListTokensResponseObject interface {
	VisitListTokensResponse(w http.ResponseWriter) error
}

type ListTokensdefaultApplicationProblemPlusJSONResponse

type ListTokensdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListTokensdefaultApplicationProblemPlusJSONResponse) VisitListTokensResponse

type ListUnreads200JSONResponse

type ListUnreads200JSONResponse Unreads

func (ListUnreads200JSONResponse) VisitListUnreadsResponse

func (response ListUnreads200JSONResponse) VisitListUnreadsResponse(w http.ResponseWriter) error

type ListUnreads401ApplicationProblemPlusJSONResponse

type ListUnreads401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (ListUnreads401ApplicationProblemPlusJSONResponse) VisitListUnreadsResponse

func (response ListUnreads401ApplicationProblemPlusJSONResponse) VisitListUnreadsResponse(w http.ResponseWriter) error

type ListUnreadsRequestObject

type ListUnreadsRequestObject struct {
}

type ListUnreadsResponseObject

type ListUnreadsResponseObject interface {
	VisitListUnreadsResponse(w http.ResponseWriter) error
}

type ListUnreadsdefaultApplicationProblemPlusJSONResponse

type ListUnreadsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListUnreadsdefaultApplicationProblemPlusJSONResponse) VisitListUnreadsResponse

type Login200JSONResponse

type Login200JSONResponse TokenPair

func (Login200JSONResponse) VisitLoginResponse

func (response Login200JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type Login400ApplicationProblemPlusJSONResponse

type Login400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (Login400ApplicationProblemPlusJSONResponse) VisitLoginResponse

type Login401ApplicationProblemPlusJSONResponse

type Login401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (Login401ApplicationProblemPlusJSONResponse) VisitLoginResponse

type Login426ApplicationProblemPlusJSONResponse

type Login426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (Login426ApplicationProblemPlusJSONResponse) VisitLoginResponse

type Login429ApplicationProblemPlusJSONResponse

type Login429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (Login429ApplicationProblemPlusJSONResponse) VisitLoginResponse

type LoginJSONRequestBody

type LoginJSONRequestBody = LoginRequest

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginRequest

type LoginRequest struct {
	Device   *string `json:"device,omitempty"`
	Email    string  `json:"email"`
	Password string  `json:"password"`
}

LoginRequest defines model for LoginRequest.

type LoginRequestObject

type LoginRequestObject struct {
	Body *LoginJSONRequestBody
}

type LoginResponseObject

type LoginResponseObject interface {
	VisitLoginResponse(w http.ResponseWriter) error
}

type LogindefaultApplicationProblemPlusJSONResponse

type LogindefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (LogindefaultApplicationProblemPlusJSONResponse) VisitLoginResponse

type Logout200JSONResponse

type Logout200JSONResponse StatusOk

func (Logout200JSONResponse) VisitLogoutResponse

func (response Logout200JSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type Logout400ApplicationProblemPlusJSONResponse

type Logout400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (Logout400ApplicationProblemPlusJSONResponse) VisitLogoutResponse

func (response Logout400ApplicationProblemPlusJSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type Logout401ApplicationProblemPlusJSONResponse

type Logout401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (Logout401ApplicationProblemPlusJSONResponse) VisitLogoutResponse

func (response Logout401ApplicationProblemPlusJSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type LogoutJSONRequestBody

type LogoutJSONRequestBody = LogoutRequest

LogoutJSONRequestBody defines body for Logout for application/json ContentType.

type LogoutRequest

type LogoutRequest struct {
	RefreshToken string `json:"refresh_token"`
}

LogoutRequest defines model for LogoutRequest.

type LogoutRequestObject

type LogoutRequestObject struct {
	Body *LogoutJSONRequestBody
}

type LogoutResponseObject

type LogoutResponseObject interface {
	VisitLogoutResponse(w http.ResponseWriter) error
}

type LogoutdefaultApplicationProblemPlusJSONResponse

type LogoutdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (LogoutdefaultApplicationProblemPlusJSONResponse) VisitLogoutResponse

type MarkChannelRead200JSONResponse

type MarkChannelRead200JSONResponse UnreadChannel

func (MarkChannelRead200JSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelRead200JSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkChannelRead400ApplicationProblemPlusJSONResponse

type MarkChannelRead400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (MarkChannelRead400ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelRead400ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkChannelRead401ApplicationProblemPlusJSONResponse

type MarkChannelRead401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (MarkChannelRead401ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelRead401ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkChannelRead403ApplicationProblemPlusJSONResponse

type MarkChannelRead403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (MarkChannelRead403ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelRead403ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkChannelRead404ApplicationProblemPlusJSONResponse

type MarkChannelRead404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (MarkChannelRead404ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelRead404ApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkChannelReadJSONRequestBody

type MarkChannelReadJSONRequestBody = MarkReadRequest

MarkChannelReadJSONRequestBody defines body for MarkChannelRead for application/json ContentType.

type MarkChannelReadRequestObject

type MarkChannelReadRequestObject struct {
	Id   IDPath `json:"id"`
	Body *MarkChannelReadJSONRequestBody
}

type MarkChannelReadResponseObject

type MarkChannelReadResponseObject interface {
	VisitMarkChannelReadResponse(w http.ResponseWriter) error
}

type MarkChannelReaddefaultApplicationProblemPlusJSONResponse

type MarkChannelReaddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (MarkChannelReaddefaultApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse

func (response MarkChannelReaddefaultApplicationProblemPlusJSONResponse) VisitMarkChannelReadResponse(w http.ResponseWriter) error

type MarkReadRequest

type MarkReadRequest struct {
	// LastMessageId 最后已读消息 ID(#40):必须存在且属于路径频道,否则 400 bad_read; 水位只前进,更旧的 ID 不会让计数回退。
	LastMessageId ID `json:"last_message_id"`
}

MarkReadRequest defines model for MarkReadRequest.

type MemberInfo

type MemberInfo struct {
	JoinedAt Time    `json:"joined_at"`
	Nickname *string `json:"nickname,omitempty"`

	// Online 在线态(presence:{uid} 存在即在线);不依赖好友关系
	Online bool           `json:"online"`
	Role   MemberInfoRole `json:"role"`

	// RoleIds 成员持有的角色 ID(含 @everyone;可选,旧响应缺省不回)
	RoleIds  *[]ID   `json:"role_ids,omitempty"`
	ServerId ID      `json:"server_id"`
	Tag      *string `json:"tag,omitempty"`
	UserId   ID      `json:"user_id"`
}

MemberInfo 服务器成员(内联昵称/tag,含在线态)。ID 为十进制字符串(#31)。

type MemberInfoRole

type MemberInfoRole string

MemberInfoRole defines model for MemberInfo.Role.

const (
	MemberInfoRoleAdmin  MemberInfoRole = "admin"
	MemberInfoRoleMember MemberInfoRole = "member"
	MemberInfoRoleOwner  MemberInfoRole = "owner"
)

Defines values for MemberInfoRole.

func (MemberInfoRole) Valid

func (e MemberInfoRole) Valid() bool

Valid indicates whether the value is a known member of the MemberInfoRole enum.

type MentionCandidate

type MentionCandidate struct {
	Nickname string `json:"nickname"`
	Tag      string `json:"tag"`
	UserId   ID     `json:"user_id"`
}

MentionCandidate @提及候选用户(#39):只含昵称/tag,不含 email。

type Message

type Message struct {
	// Attachments 消息附件元数据(#41,按附件 ID 升序);无附件或消息已软删时缺省。 url/thumbnail_url 为带能力 key 的相对路径,可直接放进 img 标签。
	Attachments *[]Attachment `json:"attachments,omitempty"`
	ChannelId   ID            `json:"channel_id"`
	Content     string        `json:"content"`
	CreatedAt   Time          `json:"created_at"`

	// DeletedAt 软删时间(#39);未删除时缺省
	DeletedAt *Time `json:"deleted_at,omitempty"`

	// EditedAt 首次编辑时间(#39);未编辑时缺省
	EditedAt *Time `json:"edited_at,omitempty"`
	Id       ID    `json:"id"`

	// Mentions 被 @ 的用户 ID(#39,升序去重);无提及时缺省
	Mentions *[]ID `json:"mentions,omitempty"`

	// Nonce 幂等键(#31);未带 nonce 的消息无此字段
	Nonce *string `json:"nonce,omitempty"`

	// ReplyPreview 回复目标预览(#39):只含跳转与展示所需字段,不含 email。目标已软删时 content 为空串、deleted=true;目标不存在(历史脏数据)时整个字段缺省。
	ReplyPreview *ReplyPreview `json:"reply_preview,omitempty"`

	// ReplyTo 回复目标消息 ID(#39);非回复消息缺省
	ReplyTo        *ID     `json:"reply_to,omitempty"`
	SenderNickname *string `json:"sender_nickname,omitempty"`
	SenderTag      *string `json:"sender_tag,omitempty"`
	UserId         ID      `json:"user_id"`
}

Message 文字频道消息(发送者昵称/tag 内联,不含邮箱)。ID 为十进制字符串(#31)。 #39:edited_at/deleted_at 为编辑/软删时间;reply_to 为回复目标 ID, reply_preview 为跳转预览;mentions 为被 @ 的用户 ID(升序去重)。 软删消息 content 为空串、deleted_at 有值,仍出现在列表与单条响应里供回复引用, 但不返回 attachments(即使附件行仍在库里)。 #41:attachments 为消息携带的附件元数据(按附件 ID 升序);有附件时 content 允许为空串(纯附件消息),没有附件时 content 至少 1 个字符。

type MessageIDPath

type MessageIDPath = int64

MessageIDPath defines model for MessageIDPath.

type MethodNotAllowed

type MethodNotAllowed = Problem

MethodNotAllowed RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type MethodNotAllowedApplicationProblemPlusJSONResponse

type MethodNotAllowedApplicationProblemPlusJSONResponse Problem

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound = Problem

NotFound RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type NotFoundApplicationProblemPlusJSONResponse

type NotFoundApplicationProblemPlusJSONResponse Problem

type OidcAuthorize200JSONResponse

type OidcAuthorize200JSONResponse OidcAuthorizeResponse

func (OidcAuthorize200JSONResponse) VisitOidcAuthorizeResponse

func (response OidcAuthorize200JSONResponse) VisitOidcAuthorizeResponse(w http.ResponseWriter) error

type OidcAuthorize400ApplicationProblemPlusJSONResponse

type OidcAuthorize400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (OidcAuthorize400ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse

func (response OidcAuthorize400ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse(w http.ResponseWriter) error

type OidcAuthorize404ApplicationProblemPlusJSONResponse

type OidcAuthorize404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (OidcAuthorize404ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse

func (response OidcAuthorize404ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse(w http.ResponseWriter) error

type OidcAuthorize426ApplicationProblemPlusJSONResponse

type OidcAuthorize426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (OidcAuthorize426ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse

func (response OidcAuthorize426ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse(w http.ResponseWriter) error

type OidcAuthorize429ApplicationProblemPlusJSONResponse

type OidcAuthorize429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (OidcAuthorize429ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse

func (response OidcAuthorize429ApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse(w http.ResponseWriter) error

type OidcAuthorizeJSONRequestBody

type OidcAuthorizeJSONRequestBody = OidcAuthorizeRequest

OidcAuthorizeJSONRequestBody defines body for OidcAuthorize for application/json ContentType.

type OidcAuthorizeRequest

type OidcAuthorizeRequest struct {
	// Device 设备类型 desktop/mobile;空 = desktop
	Device *string `json:"device,omitempty"`
}

OidcAuthorizeRequest 请求体可为空(设备类型回落 desktop)。

type OidcAuthorizeRequestObject

type OidcAuthorizeRequestObject struct {
	Body *OidcAuthorizeJSONRequestBody
}

type OidcAuthorizeResponse

type OidcAuthorizeResponse struct {
	// Url IdP 授权页 URL(含 state 与 PKCE code_challenge);直接重定向浏览器
	Url string `json:"url"`
}

OidcAuthorizeResponse defines model for OidcAuthorizeResponse.

type OidcAuthorizeResponseObject

type OidcAuthorizeResponseObject interface {
	VisitOidcAuthorizeResponse(w http.ResponseWriter) error
}

type OidcAuthorizedefaultApplicationProblemPlusJSONResponse

type OidcAuthorizedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (OidcAuthorizedefaultApplicationProblemPlusJSONResponse) VisitOidcAuthorizeResponse

type OidcCallback200JSONResponse

type OidcCallback200JSONResponse TokenPair

func (OidcCallback200JSONResponse) VisitOidcCallbackResponse

func (response OidcCallback200JSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback400ApplicationProblemPlusJSONResponse

type OidcCallback400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (OidcCallback400ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse

func (response OidcCallback400ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback404ApplicationProblemPlusJSONResponse

type OidcCallback404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (OidcCallback404ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse

func (response OidcCallback404ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback426ApplicationProblemPlusJSONResponse

type OidcCallback426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (OidcCallback426ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse

func (response OidcCallback426ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback429ApplicationProblemPlusJSONResponse

type OidcCallback429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (OidcCallback429ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse

func (response OidcCallback429ApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallbackJSONRequestBody

type OidcCallbackJSONRequestBody = OidcCallbackRequest

OidcCallbackJSONRequestBody defines body for OidcCallback for application/json ContentType.

type OidcCallbackRequest

type OidcCallbackRequest struct {
	// Code IdP 重定向回 redirect_url 时携带的授权码
	Code string `json:"code"`

	// State IdP 原样带回的 state(服务端一次性消费)
	State string `json:"state"`
}

OidcCallbackRequest defines model for OidcCallbackRequest.

type OidcCallbackRequestObject

type OidcCallbackRequestObject struct {
	Body *OidcCallbackJSONRequestBody
}

type OidcCallbackResponseObject

type OidcCallbackResponseObject interface {
	VisitOidcCallbackResponse(w http.ResponseWriter) error
}

type OidcCallbackdefaultApplicationProblemPlusJSONResponse

type OidcCallbackdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (OidcCallbackdefaultApplicationProblemPlusJSONResponse) VisitOidcCallbackResponse

type OptBool

type OptBool struct {
	Set  bool
	Null bool
	Val  bool
}

OptBool 合并补丁布尔字段:缺省不改;null 按未设置处理(布尔无「清空」语义)。

func (*OptBool) UnmarshalJSON

func (o *OptBool) UnmarshalJSON(b []byte) error

type OptID

type OptID struct {
	Set  bool
	Null bool
	Val  ID
}

OptID 合并补丁 ID 字段(数字/字符串双接受;null = 清除)。

func (OptID) Clearing

func (o OptID) Clearing() bool

Clearing 是否显式要求清除(null)。

func (OptID) Get

func (o OptID) Get() (ID, bool)

Get 有值返回 (值, true)。

func (*OptID) UnmarshalJSON

func (o *OptID) UnmarshalJSON(b []byte) error

UnmarshalJSON 三态解析。

type OptInt

type OptInt struct {
	Set  bool
	Null bool
	Val  int
}

OptInt 合并补丁整数字段。

func (OptInt) Clearing

func (o OptInt) Clearing() bool

Clearing 是否显式要求清除(null)。

func (OptInt) Get

func (o OptInt) Get() (int, bool)

Get 有值返回 (值, true)。

func (*OptInt) UnmarshalJSON

func (o *OptInt) UnmarshalJSON(b []byte) error

UnmarshalJSON 三态解析。

type OptString

type OptString struct {
	Set  bool
	Null bool
	Val  string
}

OptString 合并补丁字符串字段。

func (OptString) Clearing

func (o OptString) Clearing() bool

Clearing 是否显式要求清除(null)。

func (OptString) Get

func (o OptString) Get() (string, bool)

Get 有值返回 (值, true);null/缺省返回 false。

func (*OptString) UnmarshalJSON

func (o *OptString) UnmarshalJSON(b []byte) error

UnmarshalJSON 三态解析:缺省(不调用)、null、字符串值。

type OptStrings

type OptStrings struct {
	Set  bool
	Null bool
	Val  []string
}

OptStrings 合并补丁字符串数组字段:缺省不改;null = 清空(由 handler 决定是否合法)。

func (*OptStrings) UnmarshalJSON

func (o *OptStrings) UnmarshalJSON(b []byte) error

type OutboundWebhook

type OutboundWebhook struct {
	CreatedAt Time `json:"created_at"`

	// Disabled 是否已停用(熔断自动停用或手动停用)
	Disabled bool `json:"disabled"`

	// DisabledReason 停用原因(熔断为 consecutive_failures);正常运行不带
	DisabledReason *string `json:"disabled_reason,omitempty"`

	// Events 订阅的事件白名单子集
	Events []OutboundWebhookEvents `json:"events"`
	Id     ID                      `json:"id"`

	// Secret 一次性明文(仅创建 / reset_secret 的 PATCH 响应)
	Secret *string `json:"secret,omitempty"`

	// Url 投递目标(POST,application/json)。默认保持已发布的完整 url 响应; 部署者启用 LITETALK_WEBHOOK_REDACT_URL 后,仅订阅创建者与服务器 owner 看到完整值,其余 ManageServer 成员看到 scheme://host/… 展示掩码 (路径/查询串常内嵌第三方凭证)。展示掩码不能回写为投递目标,创建与 改址响应总是调用方自己提交的完整地址。
	Url string `json:"url"`
}

OutboundWebhook 出站事件订阅(#52)。secret 是出站投递的 HMAC-SHA256 签名密钥(64 位 hex), 只在创建响应或 reset_secret 的 PATCH 响应里出现一次,任何其他响应永不回传。 接收方校验签名:取 X-LiteTalk-Timestamp(unix 秒),与本地时刻相差超过 ±5 分钟即拒绝(防重放);以共享 secret 为密钥对 "<timestamp>.<原始请求体>" 计算 HMAC-SHA256,与 X-LiteTalk-Signature 头的 sha256=<hex> 部分做常数时间比对。

type OutboundWebhookEvents

type OutboundWebhookEvents string

OutboundWebhookEvents defines model for OutboundWebhook.Events.

const (
	OutboundWebhookEventsChannelCreated OutboundWebhookEvents = "channel.created"
	OutboundWebhookEventsChannelDeleted OutboundWebhookEvents = "channel.deleted"
	OutboundWebhookEventsMemberJoined   OutboundWebhookEvents = "member.joined"
	OutboundWebhookEventsMemberLeft     OutboundWebhookEvents = "member.left"
	OutboundWebhookEventsMessageCreated OutboundWebhookEvents = "message.created"
)

Defines values for OutboundWebhookEvents.

func (OutboundWebhookEvents) Valid

func (e OutboundWebhookEvents) Valid() bool

Valid indicates whether the value is a known member of the OutboundWebhookEvents enum.

type PasswordResetRequest

type PasswordResetRequest struct {
	Code     string `json:"code"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

PasswordResetRequest defines model for PasswordResetRequest.

type PatchCategory200JSONResponse

type PatchCategory200JSONResponse CategoryInfo

func (PatchCategory200JSONResponse) VisitPatchCategoryResponse

func (response PatchCategory200JSONResponse) VisitPatchCategoryResponse(w http.ResponseWriter) error

type PatchCategory400ApplicationProblemPlusJSONResponse

type PatchCategory400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchCategory400ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse

func (response PatchCategory400ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse(w http.ResponseWriter) error

type PatchCategory401ApplicationProblemPlusJSONResponse

type PatchCategory401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchCategory401ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse

func (response PatchCategory401ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse(w http.ResponseWriter) error

type PatchCategory403ApplicationProblemPlusJSONResponse

type PatchCategory403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchCategory403ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse

func (response PatchCategory403ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse(w http.ResponseWriter) error

type PatchCategory404ApplicationProblemPlusJSONResponse

type PatchCategory404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchCategory404ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse

func (response PatchCategory404ApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse(w http.ResponseWriter) error

type PatchCategoryApplicationMergePatchPlusJSONRequestBody

type PatchCategoryApplicationMergePatchPlusJSONRequestBody = PatchCategoryRequest

PatchCategoryApplicationMergePatchPlusJSONRequestBody defines body for PatchCategory for application/merge-patch+json ContentType.

type PatchCategoryBody

type PatchCategoryBody struct {
	Name     OptString
	Position OptInt
}

PatchCategoryBody PATCH /categories/{id} 合并补丁体(name/position)。

func (*PatchCategoryBody) UnmarshalJSON

func (b *PatchCategoryBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchCategoryJSONRequestBody

type PatchCategoryJSONRequestBody = PatchCategoryRequest

PatchCategoryJSONRequestBody defines body for PatchCategory for application/json ContentType.

type PatchCategoryRequest

type PatchCategoryRequest = PatchCategoryBody

PatchCategoryRequest JSON Merge Patch(RFC 7396,#31):缺省 = 不改,null = 清空(name 不可清, 空值被校验拒 400;position 的 null 拒 400),值 = 设置。 name 与 position 至少给一个。

type PatchCategoryRequestObject

type PatchCategoryRequestObject struct {
	Id                                IDPath `json:"id"`
	JSONBody                          *PatchCategoryJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchCategoryApplicationMergePatchPlusJSONRequestBody
}

type PatchCategoryResponseObject

type PatchCategoryResponseObject interface {
	VisitPatchCategoryResponse(w http.ResponseWriter) error
}

type PatchCategorydefaultApplicationProblemPlusJSONResponse

type PatchCategorydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchCategorydefaultApplicationProblemPlusJSONResponse) VisitPatchCategoryResponse

type PatchChannel200JSONResponse

type PatchChannel200JSONResponse ChannelInfo

func (PatchChannel200JSONResponse) VisitPatchChannelResponse

func (response PatchChannel200JSONResponse) VisitPatchChannelResponse(w http.ResponseWriter) error

type PatchChannel400ApplicationProblemPlusJSONResponse

type PatchChannel400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchChannel400ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse

func (response PatchChannel400ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse(w http.ResponseWriter) error

type PatchChannel401ApplicationProblemPlusJSONResponse

type PatchChannel401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchChannel401ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse

func (response PatchChannel401ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse(w http.ResponseWriter) error

type PatchChannel403ApplicationProblemPlusJSONResponse

type PatchChannel403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchChannel403ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse

func (response PatchChannel403ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse(w http.ResponseWriter) error

type PatchChannel404ApplicationProblemPlusJSONResponse

type PatchChannel404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchChannel404ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse

func (response PatchChannel404ApplicationProblemPlusJSONResponse) VisitPatchChannelResponse(w http.ResponseWriter) error

type PatchChannelApplicationMergePatchPlusJSONRequestBody

type PatchChannelApplicationMergePatchPlusJSONRequestBody = PatchChannelRequest

PatchChannelApplicationMergePatchPlusJSONRequestBody defines body for PatchChannel for application/merge-patch+json ContentType.

type PatchChannelBody

type PatchChannelBody struct {
	Name             OptString
	Type             OptString
	CategoryID       OptID
	Position         OptInt
	Password         OptString
	UserLimit        OptInt
	ParentID         OptID
	AudioBitrateKbps OptInt
	AudioFrameMs     OptInt
}

PatchChannelBody PATCH /channels/{id} 合并补丁体(name/type/category_id/position/ password/user_limit/parent_id,#37;audio_bitrate_kbps/audio_frame_ms,#46)。 password 三态:缺省不改、null/"" 清除、非空设置;parent_id 的 null/0 = 提升顶层; user_limit 与两个音质字段的 null 拒 400(音质用 0 清零)。

func (*PatchChannelBody) UnmarshalJSON

func (b *PatchChannelBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchChannelJSONRequestBody

type PatchChannelJSONRequestBody = PatchChannelRequest

PatchChannelJSONRequestBody defines body for PatchChannel for application/json ContentType.

type PatchChannelRequest

type PatchChannelRequest = PatchChannelBody

PatchChannelRequest JSON Merge Patch(RFC 7396,#31):缺省 = 不改,null = 清空(name/type 不可清,空值被校验拒 400;category_id 的 null = 移出分类;position 的 null 拒 400——「删除位置」无语义),值 = 设置。#37:password 三态 (缺省不改、null/空串清除、非空设置);user_limit 的 null 拒 400; parent_id 的 null/0 = 提升顶层、值 = 设置父级。#46:audio_bitrate_kbps / audio_frame_ms 缺省不改,0 = 清零(跟随/默认),null 拒 400。

type PatchChannelRequestObject

type PatchChannelRequestObject struct {
	Id                                IDPath `json:"id"`
	JSONBody                          *PatchChannelJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchChannelApplicationMergePatchPlusJSONRequestBody
}

type PatchChannelResponseObject

type PatchChannelResponseObject interface {
	VisitPatchChannelResponse(w http.ResponseWriter) error
}

type PatchChanneldefaultApplicationProblemPlusJSONResponse

type PatchChanneldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchChanneldefaultApplicationProblemPlusJSONResponse) VisitPatchChannelResponse

type PatchConversation200JSONResponse

type PatchConversation200JSONResponse Conversation

func (PatchConversation200JSONResponse) VisitPatchConversationResponse

func (response PatchConversation200JSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversation400ApplicationProblemPlusJSONResponse

type PatchConversation400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchConversation400ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversation400ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversation401ApplicationProblemPlusJSONResponse

type PatchConversation401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchConversation401ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversation401ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversation403ApplicationProblemPlusJSONResponse

type PatchConversation403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchConversation403ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversation403ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversation404ApplicationProblemPlusJSONResponse

type PatchConversation404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchConversation404ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversation404ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversation429ApplicationProblemPlusJSONResponse

type PatchConversation429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (PatchConversation429ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversation429ApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchConversationApplicationMergePatchPlusJSONRequestBody

type PatchConversationApplicationMergePatchPlusJSONRequestBody = PatchConversationRequest

PatchConversationApplicationMergePatchPlusJSONRequestBody defines body for PatchConversation for application/merge-patch+json ContentType.

type PatchConversationBody

type PatchConversationBody struct {
	Name OptString
}

PatchConversationBody PATCH /conversations/{id} 合并补丁体(name,#38 B2)。 缺省不改;null/空串在 handler 里按必填字段校验拒 400,不做「清空」语义。

func (*PatchConversationBody) UnmarshalJSON

func (b *PatchConversationBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchConversationJSONRequestBody

type PatchConversationJSONRequestBody = PatchConversationRequest

PatchConversationJSONRequestBody defines body for PatchConversation for application/json ContentType.

type PatchConversationRequest

type PatchConversationRequest = PatchConversationBody

PatchConversationRequest JSON Merge Patch(RFC 7396):缺省 = 不改;name 为 1–64 字符, null/空串被校验拒 400。仅 group owner 可写。

type PatchConversationRequestObject

type PatchConversationRequestObject struct {
	Id                                IDPath `json:"id"`
	JSONBody                          *PatchConversationJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchConversationApplicationMergePatchPlusJSONRequestBody
}

type PatchConversationResponseObject

type PatchConversationResponseObject interface {
	VisitPatchConversationResponse(w http.ResponseWriter) error
}

type PatchConversationdefaultApplicationProblemPlusJSONResponse

type PatchConversationdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchConversationdefaultApplicationProblemPlusJSONResponse) VisitPatchConversationResponse

func (response PatchConversationdefaultApplicationProblemPlusJSONResponse) VisitPatchConversationResponse(w http.ResponseWriter) error

type PatchFriend200JSONResponse

type PatchFriend200JSONResponse FriendEntry

func (PatchFriend200JSONResponse) VisitPatchFriendResponse

func (response PatchFriend200JSONResponse) VisitPatchFriendResponse(w http.ResponseWriter) error

type PatchFriend400ApplicationProblemPlusJSONResponse

type PatchFriend400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchFriend400ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse

func (response PatchFriend400ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse(w http.ResponseWriter) error

type PatchFriend401ApplicationProblemPlusJSONResponse

type PatchFriend401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchFriend401ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse

func (response PatchFriend401ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse(w http.ResponseWriter) error

type PatchFriend403ApplicationProblemPlusJSONResponse

type PatchFriend403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchFriend403ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse

func (response PatchFriend403ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse(w http.ResponseWriter) error

type PatchFriend404ApplicationProblemPlusJSONResponse

type PatchFriend404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchFriend404ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse

func (response PatchFriend404ApplicationProblemPlusJSONResponse) VisitPatchFriendResponse(w http.ResponseWriter) error

type PatchFriendApplicationMergePatchPlusJSONRequestBody

type PatchFriendApplicationMergePatchPlusJSONRequestBody = PatchFriendRequest

PatchFriendApplicationMergePatchPlusJSONRequestBody defines body for PatchFriend for application/merge-patch+json ContentType.

type PatchFriendBody

type PatchFriendBody struct {
	Remark OptString
	Group  OptString
}

PatchFriendBody PATCH /friends/{id} 合并补丁体(remark/group)。

func (*PatchFriendBody) UnmarshalJSON

func (b *PatchFriendBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchFriendJSONRequestBody

type PatchFriendJSONRequestBody = PatchFriendRequest

PatchFriendJSONRequestBody defines body for PatchFriend for application/json ContentType.

type PatchFriendRequest

type PatchFriendRequest = PatchFriendBody

PatchFriendRequest JSON Merge Patch(RFC 7396,#31):缺省 = 不改,null/空串 = 清除备注/ 移出分组,值 = 设置。仅发起方向可写。

type PatchFriendRequestObject

type PatchFriendRequestObject struct {
	Id                                IDPath `json:"id"`
	JSONBody                          *PatchFriendJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchFriendApplicationMergePatchPlusJSONRequestBody
}

type PatchFriendResponseObject

type PatchFriendResponseObject interface {
	VisitPatchFriendResponse(w http.ResponseWriter) error
}

type PatchFrienddefaultApplicationProblemPlusJSONResponse

type PatchFrienddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchFrienddefaultApplicationProblemPlusJSONResponse) VisitPatchFriendResponse

type PatchInboundWebhook200JSONResponse

type PatchInboundWebhook200JSONResponse InboundWebhook

func (PatchInboundWebhook200JSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook200JSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhook400ApplicationProblemPlusJSONResponse

type PatchInboundWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchInboundWebhook400ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook400ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhook401ApplicationProblemPlusJSONResponse

type PatchInboundWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchInboundWebhook401ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook401ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhook403ApplicationProblemPlusJSONResponse

type PatchInboundWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchInboundWebhook403ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook403ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhook404ApplicationProblemPlusJSONResponse

type PatchInboundWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchInboundWebhook404ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook404ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhook429ApplicationProblemPlusJSONResponse

type PatchInboundWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (PatchInboundWebhook429ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhook429ApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchInboundWebhookApplicationMergePatchPlusJSONRequestBody

type PatchInboundWebhookApplicationMergePatchPlusJSONRequestBody = PatchInboundWebhookRequest

PatchInboundWebhookApplicationMergePatchPlusJSONRequestBody defines body for PatchInboundWebhook for application/merge-patch+json ContentType.

type PatchInboundWebhookBody

type PatchInboundWebhookBody struct {
	ResetSecret OptBool
}

PatchInboundWebhookBody PATCH /channels/{id}/inbound-webhooks/{wid} 合并补丁体 (P2-7):入站入口只支持 reset_secret 一键——端点存在的唯一意义是轮换泄露的 URL,其余键没有可改的字段。

func (*PatchInboundWebhookBody) UnmarshalJSON

func (b *PatchInboundWebhookBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchInboundWebhookJSONRequestBody

type PatchInboundWebhookJSONRequestBody = PatchInboundWebhookRequest

PatchInboundWebhookJSONRequestBody defines body for PatchInboundWebhook for application/json ContentType.

type PatchInboundWebhookRequest

type PatchInboundWebhookRequest = PatchInboundWebhookBody

PatchInboundWebhookRequest JSON Merge Patch(RFC 7396):入站入口只支持 reset_secret 一个可选键, 且必须为 true(空补丁/reset_secret≠true 由实现拒 400 bad_request)。 reset_secret=true 换新 secret 并只在本次响应返回投递路径(含一次性明文), 旧 URL 立即失效。

type PatchInboundWebhookRequestObject

type PatchInboundWebhookRequestObject struct {
	Id                                IDPath        `json:"id"`
	Wid                               WebhookIDPath `json:"wid"`
	JSONBody                          *PatchInboundWebhookJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchInboundWebhookApplicationMergePatchPlusJSONRequestBody
}

type PatchInboundWebhookResponseObject

type PatchInboundWebhookResponseObject interface {
	VisitPatchInboundWebhookResponse(w http.ResponseWriter) error
}

type PatchInboundWebhookdefaultApplicationProblemPlusJSONResponse

type PatchInboundWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse

func (response PatchInboundWebhookdefaultApplicationProblemPlusJSONResponse) VisitPatchInboundWebhookResponse(w http.ResponseWriter) error

type PatchMe200JSONResponse

type PatchMe200JSONResponse User

func (PatchMe200JSONResponse) VisitPatchMeResponse

func (response PatchMe200JSONResponse) VisitPatchMeResponse(w http.ResponseWriter) error

type PatchMe400ApplicationProblemPlusJSONResponse

type PatchMe400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchMe400ApplicationProblemPlusJSONResponse) VisitPatchMeResponse

func (response PatchMe400ApplicationProblemPlusJSONResponse) VisitPatchMeResponse(w http.ResponseWriter) error

type PatchMe401ApplicationProblemPlusJSONResponse

type PatchMe401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchMe401ApplicationProblemPlusJSONResponse) VisitPatchMeResponse

func (response PatchMe401ApplicationProblemPlusJSONResponse) VisitPatchMeResponse(w http.ResponseWriter) error

type PatchMe409ApplicationProblemPlusJSONResponse

type PatchMe409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (PatchMe409ApplicationProblemPlusJSONResponse) VisitPatchMeResponse

func (response PatchMe409ApplicationProblemPlusJSONResponse) VisitPatchMeResponse(w http.ResponseWriter) error

type PatchMeApplicationMergePatchPlusJSONRequestBody

type PatchMeApplicationMergePatchPlusJSONRequestBody = PatchMeRequest

PatchMeApplicationMergePatchPlusJSONRequestBody defines body for PatchMe for application/merge-patch+json ContentType.

type PatchMeBody

type PatchMeBody struct {
	Nickname OptString
}

PatchMeBody PATCH /users/me 合并补丁体(仅 nickname)。

func (*PatchMeBody) UnmarshalJSON

func (b *PatchMeBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码(键存在性见 decodeMergePatch)。

type PatchMeJSONRequestBody

type PatchMeJSONRequestBody = PatchMeRequest

PatchMeJSONRequestBody defines body for PatchMe for application/json ContentType.

type PatchMeRequest

type PatchMeRequest = PatchMeBody

PatchMeRequest JSON Merge Patch(RFC 7396,#31):缺省 = 不改,null = 清空(昵称不可清, 空值被校验拒 400),值 = 设置。部分更新(当前仅 nickname)。

type PatchMeRequestObject

type PatchMeRequestObject struct {
	JSONBody                          *PatchMeJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchMeApplicationMergePatchPlusJSONRequestBody
}

type PatchMeResponseObject

type PatchMeResponseObject interface {
	VisitPatchMeResponse(w http.ResponseWriter) error
}

type PatchMedefaultApplicationProblemPlusJSONResponse

type PatchMedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchMedefaultApplicationProblemPlusJSONResponse) VisitPatchMeResponse

type PatchServer200JSONResponse

type PatchServer200JSONResponse ServerInfo

func (PatchServer200JSONResponse) VisitPatchServerResponse

func (response PatchServer200JSONResponse) VisitPatchServerResponse(w http.ResponseWriter) error

type PatchServer400ApplicationProblemPlusJSONResponse

type PatchServer400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchServer400ApplicationProblemPlusJSONResponse) VisitPatchServerResponse

func (response PatchServer400ApplicationProblemPlusJSONResponse) VisitPatchServerResponse(w http.ResponseWriter) error

type PatchServer401ApplicationProblemPlusJSONResponse

type PatchServer401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchServer401ApplicationProblemPlusJSONResponse) VisitPatchServerResponse

func (response PatchServer401ApplicationProblemPlusJSONResponse) VisitPatchServerResponse(w http.ResponseWriter) error

type PatchServer403ApplicationProblemPlusJSONResponse

type PatchServer403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchServer403ApplicationProblemPlusJSONResponse) VisitPatchServerResponse

func (response PatchServer403ApplicationProblemPlusJSONResponse) VisitPatchServerResponse(w http.ResponseWriter) error

type PatchServer404ApplicationProblemPlusJSONResponse

type PatchServer404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchServer404ApplicationProblemPlusJSONResponse) VisitPatchServerResponse

func (response PatchServer404ApplicationProblemPlusJSONResponse) VisitPatchServerResponse(w http.ResponseWriter) error

type PatchServerApplicationMergePatchPlusJSONRequestBody

type PatchServerApplicationMergePatchPlusJSONRequestBody = PatchServerRequest

PatchServerApplicationMergePatchPlusJSONRequestBody defines body for PatchServer for application/merge-patch+json ContentType.

type PatchServerBody

type PatchServerBody struct {
	Name      OptString
	IconName  OptString
	IconColor OptString
}

PatchServerBody PATCH /servers/{id} 合并补丁体(name/icon_name/icon_color)。

func (*PatchServerBody) UnmarshalJSON

func (b *PatchServerBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码。

type PatchServerJSONRequestBody

type PatchServerJSONRequestBody = PatchServerRequest

PatchServerJSONRequestBody defines body for PatchServer for application/json ContentType.

type PatchServerRequest

type PatchServerRequest = PatchServerBody

PatchServerRequest JSON Merge Patch(RFC 7396,#31):缺省 = 不改,null = 清空(名称/图标 不可清,空值被校验拒 400),值 = 设置。

type PatchServerRequestObject

type PatchServerRequestObject struct {
	Id                                IDPath `json:"id"`
	JSONBody                          *PatchServerJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchServerApplicationMergePatchPlusJSONRequestBody
}

type PatchServerResponseObject

type PatchServerResponseObject interface {
	VisitPatchServerResponse(w http.ResponseWriter) error
}

type PatchServerWebhook200JSONResponse

type PatchServerWebhook200JSONResponse OutboundWebhook

func (PatchServerWebhook200JSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook200JSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhook400ApplicationProblemPlusJSONResponse

type PatchServerWebhook400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (PatchServerWebhook400ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook400ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhook401ApplicationProblemPlusJSONResponse

type PatchServerWebhook401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PatchServerWebhook401ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook401ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhook403ApplicationProblemPlusJSONResponse

type PatchServerWebhook403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (PatchServerWebhook403ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook403ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhook404ApplicationProblemPlusJSONResponse

type PatchServerWebhook404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (PatchServerWebhook404ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook404ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhook429ApplicationProblemPlusJSONResponse

type PatchServerWebhook429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (PatchServerWebhook429ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhook429ApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerWebhookApplicationMergePatchPlusJSONRequestBody

type PatchServerWebhookApplicationMergePatchPlusJSONRequestBody = PatchWebhookRequest

PatchServerWebhookApplicationMergePatchPlusJSONRequestBody defines body for PatchServerWebhook for application/merge-patch+json ContentType.

type PatchServerWebhookJSONRequestBody

type PatchServerWebhookJSONRequestBody = PatchWebhookRequest

PatchServerWebhookJSONRequestBody defines body for PatchServerWebhook for application/json ContentType.

type PatchServerWebhookRequestObject

type PatchServerWebhookRequestObject struct {
	Id                                IDPath        `json:"id"`
	Wid                               WebhookIDPath `json:"wid"`
	JSONBody                          *PatchServerWebhookJSONRequestBody
	ApplicationMergePatchPlusJSONBody *PatchServerWebhookApplicationMergePatchPlusJSONRequestBody
}

type PatchServerWebhookResponseObject

type PatchServerWebhookResponseObject interface {
	VisitPatchServerWebhookResponse(w http.ResponseWriter) error
}

type PatchServerWebhookdefaultApplicationProblemPlusJSONResponse

type PatchServerWebhookdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse

func (response PatchServerWebhookdefaultApplicationProblemPlusJSONResponse) VisitPatchServerWebhookResponse(w http.ResponseWriter) error

type PatchServerdefaultApplicationProblemPlusJSONResponse

type PatchServerdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (PatchServerdefaultApplicationProblemPlusJSONResponse) VisitPatchServerResponse

type PatchWebhookBody

type PatchWebhookBody struct {
	Url         OptString
	Events      OptStrings
	Enabled     OptBool
	ResetSecret OptBool
}

PatchWebhookBody PATCH /servers/{id}/webhooks/{wid} 合并补丁体(#52): url / events / enabled / reset_secret 四键,缺省不改。

func (*PatchWebhookBody) UnmarshalJSON

func (b *PatchWebhookBody) UnmarshalJSON(data []byte) error

UnmarshalJSON 三态解码(键存在性由 decodeMergePatch 探测)。

type PatchWebhookRequest

type PatchWebhookRequest = PatchWebhookBody

PatchWebhookRequest JSON Merge Patch(RFC 7396,#52):url / events / enabled / reset_secret 四个 可选键,缺省不改。reset_secret=true 换新 secret 并只在本次响应返回明文, 旧 secret 立即失效;enabled=true 手动重新启用并清零连续失败计数。

type PostRtcCredentials200JSONResponse

type PostRtcCredentials200JSONResponse RtcCredentials

func (PostRtcCredentials200JSONResponse) VisitPostRtcCredentialsResponse

func (response PostRtcCredentials200JSONResponse) VisitPostRtcCredentialsResponse(w http.ResponseWriter) error

type PostRtcCredentials401ApplicationProblemPlusJSONResponse

type PostRtcCredentials401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (PostRtcCredentials401ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse

func (response PostRtcCredentials401ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse(w http.ResponseWriter) error

type PostRtcCredentials405ApplicationProblemPlusJSONResponse

type PostRtcCredentials405ApplicationProblemPlusJSONResponse struct {
	MethodNotAllowedApplicationProblemPlusJSONResponse
}

func (PostRtcCredentials405ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse

func (response PostRtcCredentials405ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse(w http.ResponseWriter) error

type PostRtcCredentials503ApplicationProblemPlusJSONResponse

type PostRtcCredentials503ApplicationProblemPlusJSONResponse struct {
	TurnUnavailableApplicationProblemPlusJSONResponse
}

func (PostRtcCredentials503ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse

func (response PostRtcCredentials503ApplicationProblemPlusJSONResponse) VisitPostRtcCredentialsResponse(w http.ResponseWriter) error

type PostRtcCredentialsRequestObject

type PostRtcCredentialsRequestObject struct {
}

type PostRtcCredentialsResponseObject

type PostRtcCredentialsResponseObject interface {
	VisitPostRtcCredentialsResponse(w http.ResponseWriter) error
}

type PresenceReader

type PresenceReader interface {
	Get(ctx context.Context, key string) (string, error)
}

PresenceReader 在线状态读取(#11):presence:{uid} 存在 = 在线。 store.KV 满足;nil 时 user.online 恒 false。键格式与 signal 包手工同步。

type Problem

type Problem struct {
	// Code 机器可读错误码(扩展字段)
	Code string `json:"code"`

	// Detail 本次出错的中文提示
	Detail string `json:"detail"`

	// Message 兼容旧客户端的提示字段(与 detail 同值,至少保留一个版本)
	Message *string `json:"message,omitempty"`

	// Status HTTP 状态码(与响应行一致)
	Status int32 `json:"status"`

	// Title 问题类型摘要(随 status 定,不随实例变)
	Title string `json:"title"`

	// Type 问题类型 URI(urn:litetalk:error:<code>)
	Type string `json:"type"`
}

Problem RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type PublicUser

type PublicUser struct {
	CreatedAt     Time   `json:"created_at"`
	EmailVerified bool   `json:"email_verified"`
	Id            ID     `json:"id"`
	IsGuest       bool   `json:"is_guest"`
	Nickname      string `json:"nickname"`

	// Online 在线态(presence);仅已接受好友关系填真实值(成员视图用 MemberInfo.online),其余恒 false
	Online    bool   `json:"online"`
	Status    int32  `json:"status"`
	Tag       string `json:"tag"`
	UpdatedAt Time   `json:"updated_at"`
}

PublicUser 对外用户视图(好友/成员等他人信息),不含 email。ID 为十进制字符串(#31)。

type PushDevice

type PushDevice struct {
	CreatedAt  Time               `json:"created_at"`
	Id         ID                 `json:"id"`
	LastSeenAt Time               `json:"last_seen_at"`
	Platform   PushDevicePlatform `json:"platform"`
}

PushDevice 已注册的移动推送设备(#53)。不含 push_token——生产凭据等价物一律不回显。

type PushDeviceList

type PushDeviceList struct {
	Devices []PushDevice `json:"devices"`
}

PushDeviceList defines model for PushDeviceList.

type PushDevicePlatform

type PushDevicePlatform string

PushDevicePlatform defines model for PushDevice.Platform.

const (
	PushDevicePlatformAndroid PushDevicePlatform = "android"
	PushDevicePlatformIos     PushDevicePlatform = "ios"
)

Defines values for PushDevicePlatform.

func (PushDevicePlatform) Valid

func (e PushDevicePlatform) Valid() bool

Valid indicates whether the value is a known member of the PushDevicePlatform enum.

type RateLimited

type RateLimited = Problem

RateLimited RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type RateLimitedApplicationProblemPlusJSONResponse

type RateLimitedApplicationProblemPlusJSONResponse Problem

type Refresh200JSONResponse

type Refresh200JSONResponse TokenPair

func (Refresh200JSONResponse) VisitRefreshResponse

func (response Refresh200JSONResponse) VisitRefreshResponse(w http.ResponseWriter) error

type Refresh400ApplicationProblemPlusJSONResponse

type Refresh400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (Refresh400ApplicationProblemPlusJSONResponse) VisitRefreshResponse

func (response Refresh400ApplicationProblemPlusJSONResponse) VisitRefreshResponse(w http.ResponseWriter) error

type Refresh401ApplicationProblemPlusJSONResponse

type Refresh401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (Refresh401ApplicationProblemPlusJSONResponse) VisitRefreshResponse

func (response Refresh401ApplicationProblemPlusJSONResponse) VisitRefreshResponse(w http.ResponseWriter) error

type Refresh426ApplicationProblemPlusJSONResponse

type Refresh426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (Refresh426ApplicationProblemPlusJSONResponse) VisitRefreshResponse

func (response Refresh426ApplicationProblemPlusJSONResponse) VisitRefreshResponse(w http.ResponseWriter) error

type RefreshJSONRequestBody

type RefreshJSONRequestBody = RefreshRequest

RefreshJSONRequestBody defines body for Refresh for application/json ContentType.

type RefreshRequest

type RefreshRequest struct {
	RefreshToken string `json:"refresh_token"`
}

RefreshRequest defines model for RefreshRequest.

type RefreshRequestObject

type RefreshRequestObject struct {
	Body *RefreshJSONRequestBody
}

type RefreshResponseObject

type RefreshResponseObject interface {
	VisitRefreshResponse(w http.ResponseWriter) error
}

type RefreshdefaultApplicationProblemPlusJSONResponse

type RefreshdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RefreshdefaultApplicationProblemPlusJSONResponse) VisitRefreshResponse

type Register201JSONResponse

type Register201JSONResponse TokenPair

func (Register201JSONResponse) VisitRegisterResponse

func (response Register201JSONResponse) VisitRegisterResponse(w http.ResponseWriter) error

type Register400ApplicationProblemPlusJSONResponse

type Register400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (Register400ApplicationProblemPlusJSONResponse) VisitRegisterResponse

func (response Register400ApplicationProblemPlusJSONResponse) VisitRegisterResponse(w http.ResponseWriter) error

type Register409ApplicationProblemPlusJSONResponse

type Register409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (Register409ApplicationProblemPlusJSONResponse) VisitRegisterResponse

func (response Register409ApplicationProblemPlusJSONResponse) VisitRegisterResponse(w http.ResponseWriter) error

type Register426ApplicationProblemPlusJSONResponse

type Register426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (Register426ApplicationProblemPlusJSONResponse) VisitRegisterResponse

func (response Register426ApplicationProblemPlusJSONResponse) VisitRegisterResponse(w http.ResponseWriter) error

type Register429ApplicationProblemPlusJSONResponse

type Register429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (Register429ApplicationProblemPlusJSONResponse) VisitRegisterResponse

func (response Register429ApplicationProblemPlusJSONResponse) VisitRegisterResponse(w http.ResponseWriter) error

type RegisterDevice200JSONResponse

type RegisterDevice200JSONResponse PushDevice

func (RegisterDevice200JSONResponse) VisitRegisterDeviceResponse

func (response RegisterDevice200JSONResponse) VisitRegisterDeviceResponse(w http.ResponseWriter) error

type RegisterDevice201JSONResponse

type RegisterDevice201JSONResponse PushDevice

func (RegisterDevice201JSONResponse) VisitRegisterDeviceResponse

func (response RegisterDevice201JSONResponse) VisitRegisterDeviceResponse(w http.ResponseWriter) error

type RegisterDevice400ApplicationProblemPlusJSONResponse

type RegisterDevice400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (RegisterDevice400ApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse

func (response RegisterDevice400ApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse(w http.ResponseWriter) error

type RegisterDevice429ApplicationProblemPlusJSONResponse

type RegisterDevice429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (RegisterDevice429ApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse

func (response RegisterDevice429ApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse(w http.ResponseWriter) error

type RegisterDeviceJSONRequestBody

type RegisterDeviceJSONRequestBody = RegisterDeviceRequest

RegisterDeviceJSONRequestBody defines body for RegisterDevice for application/json ContentType.

type RegisterDeviceRequest

type RegisterDeviceRequest struct {
	Platform RegisterDeviceRequestPlatform `json:"platform"`

	// PushToken 推送通道设备凭据;服务端只存不回显,日志一律打码。
	PushToken string `json:"push_token"`
}

RegisterDeviceRequest 设备注册(#53)。push_token 是推送通道设备凭据(FCM token / APNs token / ntfy topic)。

type RegisterDeviceRequestObject

type RegisterDeviceRequestObject struct {
	Body *RegisterDeviceJSONRequestBody
}

type RegisterDeviceRequestPlatform

type RegisterDeviceRequestPlatform string

RegisterDeviceRequestPlatform defines model for RegisterDeviceRequest.Platform.

const (
	RegisterDeviceRequestPlatformAndroid RegisterDeviceRequestPlatform = "android"
	RegisterDeviceRequestPlatformIos     RegisterDeviceRequestPlatform = "ios"
)

Defines values for RegisterDeviceRequestPlatform.

func (RegisterDeviceRequestPlatform) Valid

Valid indicates whether the value is a known member of the RegisterDeviceRequestPlatform enum.

type RegisterDeviceResponseObject

type RegisterDeviceResponseObject interface {
	VisitRegisterDeviceResponse(w http.ResponseWriter) error
}

type RegisterDevicedefaultApplicationProblemPlusJSONResponse

type RegisterDevicedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RegisterDevicedefaultApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse

func (response RegisterDevicedefaultApplicationProblemPlusJSONResponse) VisitRegisterDeviceResponse(w http.ResponseWriter) error

type RegisterJSONRequestBody

type RegisterJSONRequestBody = RegisterRequest

RegisterJSONRequestBody defines body for Register for application/json ContentType.

type RegisterRequest

type RegisterRequest struct {
	// Bootstrap 管理员邀请码(可选;空 = 不使用)
	Bootstrap *string `json:"bootstrap,omitempty"`

	// Code 邮箱验证码(simple 模式忽略)
	Code *string `json:"code,omitempty"`

	// Device 设备类型 desktop/mobile;空 = desktop
	Device *string `json:"device,omitempty"`
	Email  string  `json:"email"`

	// Nickname 2–16 字符
	Nickname string `json:"nickname"`

	// Password 8–72 字节
	Password string `json:"password"`
}

RegisterRequest defines model for RegisterRequest.

type RegisterRequestObject

type RegisterRequestObject struct {
	Body *RegisterJSONRequestBody
}

type RegisterResponseObject

type RegisterResponseObject interface {
	VisitRegisterResponse(w http.ResponseWriter) error
}

type RegisterdefaultApplicationProblemPlusJSONResponse

type RegisterdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RegisterdefaultApplicationProblemPlusJSONResponse) VisitRegisterResponse

type RemoveConversationMember200JSONResponse

type RemoveConversationMember200JSONResponse Conversation

func (RemoveConversationMember200JSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember200JSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMember204Response

type RemoveConversationMember204Response struct {
}

func (RemoveConversationMember204Response) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember204Response) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMember400ApplicationProblemPlusJSONResponse

type RemoveConversationMember400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (RemoveConversationMember400ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember400ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMember401ApplicationProblemPlusJSONResponse

type RemoveConversationMember401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (RemoveConversationMember401ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember401ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMember403ApplicationProblemPlusJSONResponse

type RemoveConversationMember403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (RemoveConversationMember403ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember403ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMember404ApplicationProblemPlusJSONResponse

type RemoveConversationMember404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (RemoveConversationMember404ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMember404ApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type RemoveConversationMemberRequestObject

type RemoveConversationMemberRequestObject struct {
	Id     IDPath     `json:"id"`
	UserId UserIDPath `json:"user_id"`
}

type RemoveConversationMemberResponseObject

type RemoveConversationMemberResponseObject interface {
	VisitRemoveConversationMemberResponse(w http.ResponseWriter) error
}

type RemoveConversationMemberdefaultApplicationProblemPlusJSONResponse

type RemoveConversationMemberdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RemoveConversationMemberdefaultApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse

func (response RemoveConversationMemberdefaultApplicationProblemPlusJSONResponse) VisitRemoveConversationMemberResponse(w http.ResponseWriter) error

type ReplyPreview

type ReplyPreview struct {
	// Content 目标消息正文;已软删时为空串
	Content string `json:"content"`

	// Deleted 目标消息是否已软删
	Deleted bool `json:"deleted"`
	Id      ID   `json:"id"`

	// Nickname 目标消息发送者昵称(发送时快照,非当前昵称)
	Nickname string `json:"nickname"`
	UserId   ID     `json:"user_id"`
}

ReplyPreview 回复目标预览(#39):只含跳转与展示所需字段,不含 email。目标已软删时 content 为空串、deleted=true;目标不存在(历史脏数据)时整个字段缺省。

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ResetPassword200JSONResponse

type ResetPassword200JSONResponse StatusOk

func (ResetPassword200JSONResponse) VisitResetPasswordResponse

func (response ResetPassword200JSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPassword400ApplicationProblemPlusJSONResponse

type ResetPassword400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (ResetPassword400ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

func (response ResetPassword400ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPassword403ApplicationProblemPlusJSONResponse

type ResetPassword403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (ResetPassword403ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

func (response ResetPassword403ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPassword404ApplicationProblemPlusJSONResponse

type ResetPassword404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (ResetPassword404ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

func (response ResetPassword404ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPassword426ApplicationProblemPlusJSONResponse

type ResetPassword426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (ResetPassword426ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

func (response ResetPassword426ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPassword429ApplicationProblemPlusJSONResponse

type ResetPassword429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (ResetPassword429ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

func (response ResetPassword429ApplicationProblemPlusJSONResponse) VisitResetPasswordResponse(w http.ResponseWriter) error

type ResetPasswordJSONRequestBody

type ResetPasswordJSONRequestBody = PasswordResetRequest

ResetPasswordJSONRequestBody defines body for ResetPassword for application/json ContentType.

type ResetPasswordRequestObject

type ResetPasswordRequestObject struct {
	Body *ResetPasswordJSONRequestBody
}

type ResetPasswordResponseObject

type ResetPasswordResponseObject interface {
	VisitResetPasswordResponse(w http.ResponseWriter) error
}

type ResetPassworddefaultApplicationProblemPlusJSONResponse

type ResetPassworddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ResetPassworddefaultApplicationProblemPlusJSONResponse) VisitResetPasswordResponse

type RevokeToken200JSONResponse

type RevokeToken200JSONResponse StatusOk

func (RevokeToken200JSONResponse) VisitRevokeTokenResponse

func (response RevokeToken200JSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeToken400ApplicationProblemPlusJSONResponse

type RevokeToken400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (RevokeToken400ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

func (response RevokeToken400ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeToken401ApplicationProblemPlusJSONResponse

type RevokeToken401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (RevokeToken401ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

func (response RevokeToken401ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeToken404ApplicationProblemPlusJSONResponse

type RevokeToken404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (RevokeToken404ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

func (response RevokeToken404ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeToken429ApplicationProblemPlusJSONResponse

type RevokeToken429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (RevokeToken429ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

func (response RevokeToken429ApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeTokenRequestObject

type RevokeTokenRequestObject struct {
	Id IDPath `json:"id"`
}

type RevokeTokenResponseObject

type RevokeTokenResponseObject interface {
	VisitRevokeTokenResponse(w http.ResponseWriter) error
}

type RevokeTokendefaultApplicationProblemPlusJSONResponse

type RevokeTokendefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RevokeTokendefaultApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

type Role

type Role struct {
	// Builtin 内置角色(@everyone/admin/owner)不可改删
	Builtin bool `json:"builtin"`

	// Color #RRGGBB
	Color     string `json:"color"`
	CreatedAt Time   `json:"created_at"`
	Id        ID     `json:"id"`
	Name      string `json:"name"`

	// Permissions 十进制权限位串(只用低 15 位)
	Permissions string `json:"permissions"`

	// Position 层级序(越大越高);@everyone=0、admin=1、owner=2
	Position  int  `json:"position"`
	ServerId  ID   `json:"server_id"`
	UpdatedAt Time `json:"updated_at"`
}

Role 服务器角色(#35 B4)。permissions 为十进制字符串(低 15 位位掩码)。ID 为十进制字符串(#31)。

type RtcCredentials

type RtcCredentials struct {
	// ExpiresAt 凭证过期时刻(unix 秒)
	ExpiresAt  int64       `json:"expiresAt"`
	IceServers []ICEServer `json:"iceServers"`
}

RtcCredentials TURN/STUN 短期凭证;iceServers 可直接填入 WebRTC 配置。

type SearchMessages200JSONResponse

type SearchMessages200JSONResponse []Message

func (SearchMessages200JSONResponse) VisitSearchMessagesResponse

func (response SearchMessages200JSONResponse) VisitSearchMessagesResponse(w http.ResponseWriter) error

type SearchMessages400ApplicationProblemPlusJSONResponse

type SearchMessages400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (SearchMessages400ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse

func (response SearchMessages400ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse(w http.ResponseWriter) error

type SearchMessages401ApplicationProblemPlusJSONResponse

type SearchMessages401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (SearchMessages401ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse

func (response SearchMessages401ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse(w http.ResponseWriter) error

type SearchMessages429ApplicationProblemPlusJSONResponse

type SearchMessages429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (SearchMessages429ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse

func (response SearchMessages429ApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse(w http.ResponseWriter) error

type SearchMessagesParams

type SearchMessagesParams struct {
	// Q 搜索词(trim 后 1–100 字符;中文按子串匹配)
	Q string `form:"q" json:"q"`

	// Limit 条数上限(1–50,缺省 20;显式越界返回 400 bad_limit)
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

SearchMessagesParams defines parameters for SearchMessages.

type SearchMessagesRequestObject

type SearchMessagesRequestObject struct {
	Params SearchMessagesParams
}

type SearchMessagesResponseObject

type SearchMessagesResponseObject interface {
	VisitSearchMessagesResponse(w http.ResponseWriter) error
}

type SearchMessagesdefaultApplicationProblemPlusJSONResponse

type SearchMessagesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (SearchMessagesdefaultApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse

func (response SearchMessagesdefaultApplicationProblemPlusJSONResponse) VisitSearchMessagesResponse(w http.ResponseWriter) error

type SecretPath

type SecretPath = string

SecretPath defines model for SecretPath.

type SendEmailCode200JSONResponse

type SendEmailCode200JSONResponse StatusOk

func (SendEmailCode200JSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode200JSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCode400ApplicationProblemPlusJSONResponse

type SendEmailCode400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (SendEmailCode400ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode400ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCode404ApplicationProblemPlusJSONResponse

type SendEmailCode404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (SendEmailCode404ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode404ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCode409ApplicationProblemPlusJSONResponse

type SendEmailCode409ApplicationProblemPlusJSONResponse struct {
	ConflictApplicationProblemPlusJSONResponse
}

func (SendEmailCode409ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode409ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCode426ApplicationProblemPlusJSONResponse

type SendEmailCode426ApplicationProblemPlusJSONResponse struct {
	ClientUpgradeRequiredApplicationProblemPlusJSONResponse
}

func (SendEmailCode426ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode426ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCode429ApplicationProblemPlusJSONResponse

type SendEmailCode429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (SendEmailCode429ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

func (response SendEmailCode429ApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse(w http.ResponseWriter) error

type SendEmailCodeJSONRequestBody

type SendEmailCodeJSONRequestBody = EmailCodeRequest

SendEmailCodeJSONRequestBody defines body for SendEmailCode for application/json ContentType.

type SendEmailCodeRequestObject

type SendEmailCodeRequestObject struct {
	Body *SendEmailCodeJSONRequestBody
}

type SendEmailCodeResponseObject

type SendEmailCodeResponseObject interface {
	VisitSendEmailCodeResponse(w http.ResponseWriter) error
}

type SendEmailCodedefaultApplicationProblemPlusJSONResponse

type SendEmailCodedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (SendEmailCodedefaultApplicationProblemPlusJSONResponse) VisitSendEmailCodeResponse

type ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	http.Handler
}

ServeMux is an abstraction of http.ServeMux.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server API 依赖集合。

func New

func New(cfg Config) *Server

New 构造 API Server。

func (*Server) AcceptFriendRequest

AcceptFriendRequest POST /api/v1/friends/requests/{id}/accept

func (*Server) AddConversationMembers

AddConversationMembers POST /api/v1/conversations/{id}/members(group owner 加人)

func (*Server) CreateCategory

CreateCategory POST /api/v1/servers/{id}/categories(需 ManageChannels,#35 B3)。 分类允许为空(创建后暂未归入频道),position 按当前数量追加。

func (*Server) CreateChannel

CreateChannel POST /api/v1/servers/{id}/channels(需 ManageChannels,#35 B3)

func (*Server) CreateConversation

CreateConversation POST /api/v1/conversations(direct 幂等 / group 建群)

func (*Server) CreateFriendRequest

CreateFriendRequest POST /api/v1/friends/requests(按 昵称#tag 添加)

func (*Server) CreateInboundWebhook

CreateInboundWebhook POST /api/v1/channels/{id}/inbound-webhooks: 响应带一次性投递 URL(含 secret 明文)。

func (*Server) CreateInvite

CreateInvite POST /api/v1/servers/{id}/invites(需 ManageServer,#35 B3)

func (*Server) CreateMessage

CreateMessage POST /api/v1/channels/{id}/messages(≤2000 字 + 频控 + nonce 幂等,#31) nonce 幂等:同频道同用户同 nonce 只落一条,重复提交回读原消息 200(弱网重试对账)。 幂等判断先于频控:重试撞上配额时也必须拿回原消息,而不是 429(审查 P2)。 #41:attachment_ids 最多 10 个、正整数、不可重复;带附件时 content 允许为空串 (纯附件消息),没有附件时仍要求 1–2000 字符。

func (*Server) CreateRole

CreateRole POST /api/v1/servers/{id}/roles(需 ManageRoles)

func (*Server) CreateServer

CreateServer POST /api/v1/servers

func (*Server) CreateServerWebhook

CreateServerWebhook POST /api/v1/servers/{id}/webhooks:URL 过 SSRF 校验、 事件过白名单校验,secret 只在响应出现一次。创建者(Principal.UserID)落 creator_id,投递侧按其当前频道可见性收窄(P1-5);订阅了频道维度事件却对 能产生该事件的频道全无 ViewChannel(message.created 看文字频道,channel.* 看任意频道)的订阅永远空转,创建即拒绝(见 requireSubscribedChannelView)。

func (*Server) CreateToken

CreateToken POST /api/v1/tokens:仅限 JWT 主体(P1-1,先于频控与 body 校验)。 校验 scope 白名单 → 生成明文 → 落库 → 响应带一次性明文。空 scopes 明确 400 (空 scope = 无权限,不是全权限);未知/重复 scope 同样 400。

func (*Server) DeleteCategory

DeleteCategory DELETE /api/v1/categories/{id}(需 ManageChannels,#35 B3)。 默认仅删空分类:分类下仍有频道且未带 with_channels=1 → 409 category_not_empty, 防止误删;显式带参才级联删除分类及其下全部频道(含消息,单事务)。

func (*Server) DeleteChannel

DeleteChannel DELETE /api/v1/channels/{id}(需 ManageChannels,#35 B3) 级联删除子频道(行级在 Store),并把父与全部语音子频道的房间成员踢出(#37)。

func (*Server) DeleteChannelOverwrite

DeleteChannelOverwrite DELETE /api/v1/channels/{id}/overwrites/{target_type}/{target_id}

func (*Server) DeleteConversation

DeleteConversation DELETE /api/v1/conversations/{id} direct 任一方可删(双方消失);group 仅 owner;硬删消息与成员(Store 级联)。

func (*Server) DeleteDevice

DeleteDevice DELETE /api/v1/devices/{id}:只能删自己的设备。他人设备与不存在 统一 404——不泄露「设备是否存在」这一跨用户信息。

func (*Server) DeleteFriend

DeleteFriend DELETE /api/v1/friends/{id}

func (*Server) DeleteInboundWebhook

DeleteInboundWebhook DELETE /api/v1/channels/{id}/inbound-webhooks/{wid}(P2-7): 入口行删除后旧投递 URL 即失效(投递侧回读不到该 id,一律 404)。

func (*Server) DeleteMessage

DeleteMessage DELETE /api/v1/channels/{id}/messages/{message_id}(#39,软删) 作者可删自己的消息;服务器频道另有 ManageServer(管理员/服主)可删他人; 会话(私聊/群聊)仅作者。行保留供回复引用,重复删除 404 message_deleted。

func (*Server) DeleteRole

DeleteRole DELETE /api/v1/roles/{id}(需 ManageRoles;builtin 403)

func (*Server) DeleteServer

DeleteServer DELETE /api/v1/servers/{id}(仅 owner)。 不走 ManageServer:管理员只是「代管」,拆服权只属于服主(#35 B3 保持 owner-only)。

func (*Server) DeleteServerWebhook

DeleteServerWebhook DELETE /api/v1/servers/{id}/webhooks/{wid}:立即不再投递。

func (*Server) DeliverInboundWebhook

DeliverInboundWebhook POST /api/v1/webhooks/{id}/{secret}(免 Bearer): secret 常数时间比对,失败一律 404;消息以占位机器人身份落库。

func (*Server) DownloadAttachment

DownloadAttachment GET /api/v1/attachments/{id}?key=...(免 Bearer)。

func (*Server) DownloadAttachmentThumbnail

DownloadAttachmentThumbnail GET /api/v1/attachments/{id}/thumbnail?key=...(免 Bearer)。

func (*Server) EditMessage

EditMessage PATCH /api/v1/channels/{id}/messages/{message_id}(#39,仅作者) mentions 缺省 = 保持原提及;给出 = 整体替换(空数组清除)。成功后置 edited_at。

func (*Server) GetConfig

GetConfig GET /api/v1/config(免鉴权): 返回服务端能力开关,客户端据此适配注册/找回密码 UI。 mail_configured 表示发信通道是否为真实投递(非 Console 打印)。 self_host 一键自托管形态(SQLite/进程内单机部署);bootstrap_required 管理员邀请码是否尚未被消费(注册页提示「等待管理员邀请」,#26/#27)。 push_enabled 移动推送是否已配置可用通道(#53;false = 仅不派发, /devices 注册端点仍可用)。 oidc_enabled OIDC 登录是否配置完整(#54;false 时 /auth/oidc/* 一律 404)。

func (*Server) GetConversation

GetConversation GET /api/v1/conversations/{id}(仅参与者)

func (*Server) GetHealthz

GetHealthz GET /api/v1/healthz(免鉴权,#77 收编)。 部署脚本/探针依赖该路径与方法,响应形状固定为 {status:"ok", version}。

func (*Server) GetLinkPreview

GetLinkPreview GET /api/v1/link-preview?url=(#42 B4)

func (*Server) GetMe

GetMe GET /api/v1/users/me(自响应含 email)

func (*Server) GetMessage

GetMessage GET /api/v1/channels/{id}/messages/{message_id}(#39) 软删消息仍返回(content 为空、deleted_at 有值),供回复跳转。

func (*Server) GetSync

GetSync GET /api/v1/sync(#78):事件续传失败(gateway.invalid_session)后的 聚合快照,一次请求恢复服务器/频道/好友视图。

归属校验:ServersOfUser 本身按 server_members 关联过滤,这里仍逐服复核 Member——store 实现变动或未来加缓存时,不能把非成员服务器/频道泄露出去。 非成员(理论不可达)直接跳过并记日志,而不是让整个快照失败。

性能:store 没有批量取分类/频道的接口,这里是逐服 N+1;本端点只在续传 失败时低频触发,先接受,后续可随 store 批量接口一起收口。 recent_messages 未包含在快照内:按「用户全部服务器的文字频道」逐频道取 最近消息的响应体积不可控(频道数 × 每频道条数 × 2000 字),而客户端已有 seenChans 范围的消息补拉,聚合端点只解决服务器/频道/好友视图。

func (*Server) GuestLogin

GuestLogin POST /api/v1/auth/guest(simple 模式专属,免注册一键进入)。 生成临时身份:游客-XXXX + 占位邮箱 + 空密码哈希(无法密码登录), 签发与普通注册同构的令牌对;客户端靠 refresh_token 维持身份。

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler 返回挂载全部路由的 http.Handler(前缀 /api/v1)。 路由表由 api.gen.go 按 openapi.yaml 注册;authMux 在注册时对非免鉴权 路由包 auth 中间件(顺序与旧 s.auth(s.handleXxx) 一致)。

func (*Server) JoinServer

JoinServer POST /api/v1/servers/join(邀请码)

func (*Server) ListAuditLog

ListAuditLog GET /api/v1/servers/{id}/audit-log(P1-2 双判定)。 scope 腿:JWT 主体不受 scope 上限约束(行为不变);令牌主体必须显式持有 admin.read——审计面是 admin.read 的消费端点,guild.manage 不再顺带可读。 角色腿:纯角色 ManageServer(authz.RoleCanInServer,不做 scope 交集)。 两腿缺一不可:admin.read 归零后借位过门的路已断,只读令牌拿不到审计, 角色不够的管理令牌同样拿不到。

func (*Server) ListChannelOverwrites

ListChannelOverwrites GET /api/v1/channels/{id}/overwrites(需 ManageChannels)

func (*Server) ListChannels

ListChannels GET /api/v1/servers/{id}/channels(v0.1.2 补缺口)。 返回分类与频道两个数组,频道带 category_id;前端按分类归组渲染。 成员可读,但只返回其有 ViewChannel 的频道(#35 B3);分类按「至少有一个可见 频道」过滤(#102),持 ManageChannels 时保留空分类以便管理。

func (*Server) ListConversations

ListConversations GET /api/v1/conversations(当前用户参与的 direct/group)

func (*Server) ListDevices

ListDevices GET /api/v1/devices:当前用户的全部设备(不含 push_token)。

func (*Server) ListFriends

ListFriends GET /api/v1/friends

func (*Server) ListInboundWebhooks

ListInboundWebhooks GET /api/v1/channels/{id}/inbound-webhooks(ManageChannels)。

func (*Server) ListMentionCandidates

ListMentionCandidates GET /api/v1/channels/{id}/mention-candidates(#39) 服务器频道 = 该服对频道有 ViewChannel 的成员;会话频道 = 会话成员。 输出按 nickname、user_id 升序,不含 email;空结果为 []。

func (*Server) ListMessages

ListMessages GET /api/v1/channels/{id}/messages?before=&after=&limit=(游标分页 50 条,#31) 游标语义:before 取更旧一页(ID 小于游标最新 limit 条)、after 取更新一页, 均按旧→新正序返回。禁 offset。before_id 是 before 的旧别名(兼容一个版本)。 参数 fail-closed:显式 limit 越界 400 bad_limit,显式游标 <= 0 400 bad_cursor。

func (*Server) ListRoles

ListRoles GET /api/v1/servers/{id}/roles(成员可读)

func (*Server) ListServerMembers

ListServerMembers GET /api/v1/servers/{id}/members

func (*Server) ListServerWebhooks

ListServerWebhooks GET /api/v1/servers/{id}/webhooks(ManageServer)。

func (*Server) ListServers

ListServers GET /api/v1/servers

func (*Server) ListTokens

ListTokens GET /api/v1/tokens(只回元数据,无 token 字段;仅限 JWT 主体,P1-1)。

func (*Server) ListUnreads

ListUnreads GET /api/v1/unreads(#40) 返回当前用户全部可见频道的未读/提及计数与按服务器聚合的计数;两类数组都 含 0 值项并按 ID 升序。服务器聚合只统计服务器文字频道,不含 direct/group。

func (*Server) Login

Login POST /api/v1/auth/login(限流 5 次/min/IP)

func (*Server) Logout

Logout POST /api/v1/auth/logout 吊销前先校验令牌哈希与存储一致(P1):否则伪造 "<uid>.x" 即可吊销他人 refresh。

func (*Server) MarkChannelRead

MarkChannelRead PUT /api/v1/channels/{id}/read(#40) 水位只前进(store 原子取 max);消息必须存在且属于路径频道。成功后回最新 计数,并经 hub 把 channel.unread 推给当前用户的全部会话(多设备同步)。

func (*Server) OidcAuthorize

OidcAuthorize POST /api/v1/auth/oidc/authorize:生成 state(服务端存 5 分钟、 一次性消费)与 PKCE,返回 IdP 授权页 URL。code_verifier 明文不出服务端。

func (*Server) OidcCallback

OidcCallback POST /api/v1/auth/oidc/callback:state 一次性消费 → 授权码换 ID Token(PKCE + RS256 验签)→ 绑定或建号 → 签发与本地登录同构的令牌对。

func (*Server) PatchCategory

PatchCategory PATCH /api/v1/categories/{id}(需 ManageChannels,#35 B3)。 name/position 都可选但至少给一个;position 为目标序(0-based),服务端把该分类 移到此位置并重排同服务器其它分类为 0..n-1(相对顺序保持)。分类名复用 validCategoryName(与 POST 同一口径),不单独收紧。 同时给 name 与 position 时先重排、读回再改名,避免把旧 position 写回(#16)。

func (*Server) PatchChannel

PatchChannel PATCH /api/v1/channels/{id}(需 ManageChannels,#35 B3)

func (*Server) PatchConversation

PatchConversation PATCH /api/v1/conversations/{id}(group owner 改名)

func (*Server) PatchFriend

PatchFriend PATCH /api/v1/friends/{id}(设置备注/分组,v0.1.2)。 仅发起方向(friendships.user_id == 当前用户)可改——备注是发起方的本地视图, 被请求方改自己方向的行需要 user_id 是自己,而好友关系行的 user_id 只有一方。

func (*Server) PatchInboundWebhook

PatchInboundWebhook PATCH /api/v1/channels/{id}/inbound-webhooks/{wid} (Merge Patch,P2-7):reset_secret=true 换新 secret——旧投递 URL 立即失效, 新明文(url 字段)只在本次响应返回一次。空补丁/reset_secret≠true 一律 400: 静默 200 会让调用方误以为已轮换。归属校验与创建同口径(inboundChannel), wid 不属于该频道与不存在统一 404。

func (*Server) PatchMe

PatchMe PATCH /api/v1/users/me(昵称可改;无头像字段) Merge Patch(#31):缺省不改,null 清空(昵称不可清 → 校验拒 400)。

func (*Server) PatchServer

PatchServer PATCH /api/v1/servers/{id}(需 ManageServer,#35 B3)

func (*Server) PatchServerWebhook

PatchServerWebhook PATCH /api/v1/servers/{id}/webhooks/{wid}(Merge Patch): url / events 增量改;reset_secret=true 换新 secret(旧 secret 立即失效,明文只在 本次响应返回);enabled=true 手动重新启用并清零连续失败计数(熔断恢复唯一途径)。

func (*Server) PostRtcCredentials

PostRtcCredentials POST /api/v1/rtc/credentials(#77 收编)。 鉴权方式与信令一致:Authorization: Bearer 或 ?token=,由 main 注入的 RTCAuth 解析 uid(保留 dev 令牌兜底)。未配置 TURN 密钥时返回 503, 客户端据此降级为直连,不阻断进房。

func (*Server) Refresh

Refresh POST /api/v1/auth/refresh(旋转刷新令牌)

func (*Server) Register

Register POST /api/v1/auth/register(限流 10 次/h/IP:防批量注册与 bcrypt CPU 放大)

func (*Server) RegisterDevice

RegisterDevice POST /api/v1/devices:幂等注册。同一 push_token 重复注册 = 更新 platform/last_seen(200 既有设备),新设备 201。

func (*Server) RemoveConversationMember

RemoveConversationMember DELETE /api/v1/conversations/{id}/members/{user_id} owner 可移除任意成员或自己退出;普通成员只能移除自己(leave)。 owner 退出时把 owner 转给最早加入的剩余成员;最后一人退出时会话删除(204)。

func (*Server) ResetPassword

ResetPassword POST /api/v1/auth/password/reset

func (*Server) RevokeToken

RevokeToken DELETE /api/v1/tokens/{id}:吊销立即生效(校验路径不缓存 Principal)。 主体口径(P1-1):任何主体都可吊销**自己握着的那张**令牌(pat/bot 按 TokenID 匹配——凭据泄露后的自毁通道);管理其它令牌(含本人的其它令牌)仅限 JWT。 跨用户访问他人令牌与不存在统一 404(不可区分,避免枚举);重复吊销幂等 200。

func (*Server) SearchMessages

SearchMessages GET /api/v1/search?q=&limit=(#42 B1)

func (*Server) SendEmailCode

SendEmailCode POST /api/v1/auth/email-code(限流 10 次/h/IP:防对批量邮箱轰炸发信)

func (*Server) SetChannelOverwrite

SetChannelOverwrite PUT /api/v1/channels/{id}/overwrites/{target_type}/{target_id}

func (*Server) SetMemberRoles

SetMemberRoles PUT /api/v1/servers/{id}/members/{user_id}/roles(需 ManageRoles)

func (*Server) SetServerMuted

SetServerMuted PUT /api/v1/channels/{id}/members/{user_id}/server-mute(需 MuteMembers)

func (*Server) UpdateRole

UpdateRole PATCH /api/v1/roles/{id}(需 ManageRoles;builtin 403)

func (*Server) UploadAttachment

UploadAttachment POST /api/v1/attachments(multipart,登录可传)。 scope 门(P1-3 顺带):上传此前只查登录,attachments.write 形同虚设—— JWT 主体恒过,令牌主体须显式持有该 scope。

type ServerChannels

type ServerChannels struct {
	Categories []CategoryInfo `json:"categories"`
	Channels   []ChannelInfo  `json:"channels"`
}

ServerChannels 分类与频道两数组(空为 [],非 null)。

type ServerConfig

type ServerConfig struct {
	// AuthMode full=验证码流程;simple=免验证码(私域);oidc=仅 OIDC 登录(密码/注册入口全部关闭)
	AuthMode ServerConfigAuthMode `json:"auth_mode"`

	// BootstrapRequired 管理员邀请码未消费(注册页提示等待管理员邀请)
	BootstrapRequired bool `json:"bootstrap_required"`

	// MailConfigured 发信通道为真实投递(非 Console 打印)
	MailConfigured bool `json:"mail_configured"`

	// OidcEnabled OIDC 登录已启用(LITETALK_OIDC_* 配置完整;false 时 /auth/oidc/* 返回 404,前端不显示 OIDC 按钮)
	OidcEnabled *bool `json:"oidc_enabled,omitempty"`

	// PushEnabled 移动推送已启用(LITETALK_PUSH_PROVIDER 配置了可用通道;false 时 /devices 仍可注册,仅不派发)
	PushEnabled *bool `json:"push_enabled,omitempty"`

	// SelfHost 一键自托管形态(SQLite/进程内单机部署)
	SelfHost bool `json:"self_host"`
}

ServerConfig defines model for ServerConfig.

type ServerConfigAuthMode

type ServerConfigAuthMode string

ServerConfigAuthMode full=验证码流程;simple=免验证码(私域);oidc=仅 OIDC 登录(密码/注册入口全部关闭)

const (
	Full   ServerConfigAuthMode = "full"
	Oidc   ServerConfigAuthMode = "oidc"
	Simple ServerConfigAuthMode = "simple"
)

Defines values for ServerConfigAuthMode.

func (ServerConfigAuthMode) Valid

func (e ServerConfigAuthMode) Valid() bool

Valid indicates whether the value is a known member of the ServerConfigAuthMode enum.

type ServerInfo

type ServerInfo struct {
	CreatedAt Time `json:"created_at"`

	// IconColor #RRGGBB
	IconColor string `json:"icon_color"`
	IconName  string `json:"icon_name"`
	Id        ID     `json:"id"`
	Name      string `json:"name"`
	OwnerId   ID     `json:"owner_id"`
}

ServerInfo 服务器(群组)。图标为预设 Lucide 图标名 + 颜色,无图片。ID 为十进制字符串(#31)。

type ServerInterface

type ServerInterface interface {
	// UploadAttachment 上传附件(multipart,登录可传)
	// (POST /api/v1/attachments)
	UploadAttachment(w http.ResponseWriter, r *http.Request)
	// DownloadAttachment 下载附件(能力 URL,免 Bearer)
	// (GET /api/v1/attachments/{id})
	DownloadAttachment(w http.ResponseWriter, r *http.Request, id IDPath, params DownloadAttachmentParams)
	// DownloadAttachmentThumbnail 下载图片缩略图(能力 URL,免 Bearer)
	// (GET /api/v1/attachments/{id}/thumbnail)
	DownloadAttachmentThumbnail(w http.ResponseWriter, r *http.Request, id IDPath, params DownloadAttachmentThumbnailParams)
	// SendEmailCode 发送邮箱验证码
	// (POST /api/v1/auth/email-code)
	SendEmailCode(w http.ResponseWriter, r *http.Request)
	// GuestLogin 游客一键进入(simple 模式专属)
	// (POST /api/v1/auth/guest)
	GuestLogin(w http.ResponseWriter, r *http.Request)
	// Login 邮箱密码登录
	// (POST /api/v1/auth/login)
	Login(w http.ResponseWriter, r *http.Request)
	// Logout 登出并吊销 refresh_token
	// (POST /api/v1/auth/logout)
	Logout(w http.ResponseWriter, r *http.Request)
	// OidcAuthorize 发起 OIDC 登录(返回 IdP 授权页 URL)
	// (POST /api/v1/auth/oidc/authorize)
	OidcAuthorize(w http.ResponseWriter, r *http.Request)
	// OidcCallback OIDC 回调(code+state 换本地令牌对)
	// (POST /api/v1/auth/oidc/callback)
	OidcCallback(w http.ResponseWriter, r *http.Request)
	// ResetPassword 邮箱验证码重置密码
	// (POST /api/v1/auth/password/reset)
	ResetPassword(w http.ResponseWriter, r *http.Request)
	// Refresh 刷新令牌(旋转 refresh_token)
	// (POST /api/v1/auth/refresh)
	Refresh(w http.ResponseWriter, r *http.Request)
	// Register 邮箱注册(simple 模式免验证码)
	// (POST /api/v1/auth/register)
	Register(w http.ResponseWriter, r *http.Request)
	// DeleteCategory 删除分类(owner/admin,默认仅删空分类)
	// (DELETE /api/v1/categories/{id})
	DeleteCategory(w http.ResponseWriter, r *http.Request, id IDPath, params DeleteCategoryParams)
	// PatchCategory 改分类名/排序(owner/admin)
	// (PATCH /api/v1/categories/{id})
	PatchCategory(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteChannel 删除频道(owner/admin)
	// (DELETE /api/v1/channels/{id})
	DeleteChannel(w http.ResponseWriter, r *http.Request, id IDPath)
	// PatchChannel 改频道(owner/admin)
	// (PATCH /api/v1/channels/{id})
	PatchChannel(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListInboundWebhooks 频道入站 Webhook 列表(ManageChannels)
	// (GET /api/v1/channels/{id}/inbound-webhooks)
	ListInboundWebhooks(w http.ResponseWriter, r *http.Request, id IDPath)
	// CreateInboundWebhook 创建频道入站 Webhook(ManageChannels;响应含一次性投递 URL)
	// (POST /api/v1/channels/{id}/inbound-webhooks)
	CreateInboundWebhook(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteInboundWebhook 删除入站 Webhook(ManageChannels)
	// (DELETE /api/v1/channels/{id}/inbound-webhooks/{wid})
	DeleteInboundWebhook(w http.ResponseWriter, r *http.Request, id IDPath, wid WebhookIDPath)
	// PatchInboundWebhook 轮换入站 Webhook secret(ManageChannels;Merge Patch)
	// (PATCH /api/v1/channels/{id}/inbound-webhooks/{wid})
	PatchInboundWebhook(w http.ResponseWriter, r *http.Request, id IDPath, wid WebhookIDPath)
	// SetServerMuted 服务端强制闭麦/解禁(需 MuteMembers,#36)
	// (PUT /api/v1/channels/{id}/members/{user_id}/server-mute)
	SetServerMuted(w http.ResponseWriter, r *http.Request, id IDPath, userId UserIDPath)
	// ListMentionCandidates @提及候选用户
	// (GET /api/v1/channels/{id}/mention-candidates)
	ListMentionCandidates(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListMessages 消息分页(游标,倒序取页正序返回)
	// (GET /api/v1/channels/{id}/messages)
	ListMessages(w http.ResponseWriter, r *http.Request, id IDPath, params ListMessagesParams)
	// CreateMessage 发送文字消息(≤2000 字 + 频控 20/分 + nonce 幂等)
	// (POST /api/v1/channels/{id}/messages)
	CreateMessage(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteMessage 删除消息(软删:作者或管理员)
	// (DELETE /api/v1/channels/{id}/messages/{message_id})
	DeleteMessage(w http.ResponseWriter, r *http.Request, id IDPath, messageId MessageIDPath)
	// GetMessage 单条消息
	// (GET /api/v1/channels/{id}/messages/{message_id})
	GetMessage(w http.ResponseWriter, r *http.Request, id IDPath, messageId MessageIDPath)
	// EditMessage 编辑消息(仅作者)
	// (PATCH /api/v1/channels/{id}/messages/{message_id})
	EditMessage(w http.ResponseWriter, r *http.Request, id IDPath, messageId MessageIDPath)
	// ListChannelOverwrites 频道覆盖列表(需 ManageChannels)
	// (GET /api/v1/channels/{id}/overwrites)
	ListChannelOverwrites(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteChannelOverwrite 删除频道覆盖(需 ManageChannels,#35 B4)
	// (DELETE /api/v1/channels/{id}/overwrites/{target_type}/{target_id})
	DeleteChannelOverwrite(w http.ResponseWriter, r *http.Request, id IDPath, targetType DeleteChannelOverwriteParamsTargetType, targetId TargetIDPath)
	// SetChannelOverwrite upsert 频道覆盖(需 ManageChannels,#35 B4)
	// (PUT /api/v1/channels/{id}/overwrites/{target_type}/{target_id})
	SetChannelOverwrite(w http.ResponseWriter, r *http.Request, id IDPath, targetType SetChannelOverwriteParamsTargetType, targetId TargetIDPath)
	// MarkChannelRead 标记频道已读(水位只前进)
	// (PUT /api/v1/channels/{id}/read)
	MarkChannelRead(w http.ResponseWriter, r *http.Request, id IDPath)
	// GetConfig 服务端能力开关
	// (GET /api/v1/config)
	GetConfig(w http.ResponseWriter, r *http.Request)
	// ListConversations 我的私聊/群私聊列表
	// (GET /api/v1/conversations)
	ListConversations(w http.ResponseWriter, r *http.Request)
	// CreateConversation 创建私聊/群私聊
	// (POST /api/v1/conversations)
	CreateConversation(w http.ResponseWriter, r *http.Request)
	// DeleteConversation 删除会话(direct 任一方;group 仅 owner)
	// (DELETE /api/v1/conversations/{id})
	DeleteConversation(w http.ResponseWriter, r *http.Request, id IDPath)
	// GetConversation 会话详情(仅参与者)
	// (GET /api/v1/conversations/{id})
	GetConversation(w http.ResponseWriter, r *http.Request, id IDPath)
	// PatchConversation 群聊改名(仅 owner)
	// (PATCH /api/v1/conversations/{id})
	PatchConversation(w http.ResponseWriter, r *http.Request, id IDPath)
	// AddConversationMembers 群聊加人(仅 owner)
	// (POST /api/v1/conversations/{id}/members)
	AddConversationMembers(w http.ResponseWriter, r *http.Request, id IDPath)
	// RemoveConversationMember 移除/退出群聊成员
	// (DELETE /api/v1/conversations/{id}/members/{user_id})
	RemoveConversationMember(w http.ResponseWriter, r *http.Request, id IDPath, userId UserIDPath)
	// ListDevices 列出自己的推送设备
	// (GET /api/v1/devices)
	ListDevices(w http.ResponseWriter, r *http.Request)
	// RegisterDevice 注册推送设备(同 push_token 幂等更新)
	// (POST /api/v1/devices)
	RegisterDevice(w http.ResponseWriter, r *http.Request)
	// DeleteDevice 注销推送设备
	// (DELETE /api/v1/devices/{id})
	DeleteDevice(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListFriends 好友与好友请求列表
	// (GET /api/v1/friends)
	ListFriends(w http.ResponseWriter, r *http.Request)
	// CreateFriendRequest 按 昵称#tag 发起好友请求
	// (POST /api/v1/friends/requests)
	CreateFriendRequest(w http.ResponseWriter, r *http.Request)
	// AcceptFriendRequest 接受好友请求(仅被请求方)
	// (POST /api/v1/friends/requests/{id}/accept)
	AcceptFriendRequest(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteFriend 删除好友关系(双方任一方向)
	// (DELETE /api/v1/friends/{id})
	DeleteFriend(w http.ResponseWriter, r *http.Request, id IDPath)
	// PatchFriend 设置备注/分组(仅发起方)
	// (PATCH /api/v1/friends/{id})
	PatchFriend(w http.ResponseWriter, r *http.Request, id IDPath)
	// GetHealthz 健康检查(部署探活)
	// (GET /api/v1/healthz)
	GetHealthz(w http.ResponseWriter, r *http.Request)
	// GetLinkPreview 抓取链接预览
	// (GET /api/v1/link-preview)
	GetLinkPreview(w http.ResponseWriter, r *http.Request, params GetLinkPreviewParams)
	// DeleteRole 删除自定义角色(需 ManageRoles,builtin 403)
	// (DELETE /api/v1/roles/{id})
	DeleteRole(w http.ResponseWriter, r *http.Request, id IDPath)
	// UpdateRole 更新自定义角色(需 ManageRoles,builtin 403)
	// (PATCH /api/v1/roles/{id})
	UpdateRole(w http.ResponseWriter, r *http.Request, id IDPath)
	// PostRtcCredentials 签发 TURN 短期凭证
	// (POST /api/v1/rtc/credentials)
	PostRtcCredentials(w http.ResponseWriter, r *http.Request)
	// SearchMessages 搜索当前用户可见频道内的消息
	// (GET /api/v1/search)
	SearchMessages(w http.ResponseWriter, r *http.Request, params SearchMessagesParams)
	// ListServers 我所在的服务器列表
	// (GET /api/v1/servers)
	ListServers(w http.ResponseWriter, r *http.Request)
	// CreateServer 创建服务器(创建者自动成为 owner)
	// (POST /api/v1/servers)
	CreateServer(w http.ResponseWriter, r *http.Request)
	// JoinServer 凭邀请码加入服务器
	// (POST /api/v1/servers/join)
	JoinServer(w http.ResponseWriter, r *http.Request)
	// DeleteServer 解散服务器(仅 owner)
	// (DELETE /api/v1/servers/{id})
	DeleteServer(w http.ResponseWriter, r *http.Request, id IDPath)
	// PatchServer 改服务器名称/图标(owner/admin)
	// (PATCH /api/v1/servers/{id})
	PatchServer(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListAuditLog 审计日志倒序游标(需 ManageServer)
	// (GET /api/v1/servers/{id}/audit-log)
	ListAuditLog(w http.ResponseWriter, r *http.Request, id IDPath, params ListAuditLogParams)
	// CreateCategory 创建分类(owner/admin)
	// (POST /api/v1/servers/{id}/categories)
	CreateCategory(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListChannels 服务器的分类与频道(成员可读)
	// (GET /api/v1/servers/{id}/channels)
	ListChannels(w http.ResponseWriter, r *http.Request, id IDPath, params ListChannelsParams)
	// CreateChannel 创建频道(owner/admin)
	// (POST /api/v1/servers/{id}/channels)
	CreateChannel(w http.ResponseWriter, r *http.Request, id IDPath)
	// CreateInvite 创建邀请码(owner/admin)
	// (POST /api/v1/servers/{id}/invites)
	CreateInvite(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListServerMembers 服务器成员列表(成员可读)
	// (GET /api/v1/servers/{id}/members)
	ListServerMembers(w http.ResponseWriter, r *http.Request, id IDPath, params ListServerMembersParams)
	// SetMemberRoles 全量替换成员角色(需 ManageRoles,#35 B4)
	// (PUT /api/v1/servers/{id}/members/{user_id}/roles)
	SetMemberRoles(w http.ResponseWriter, r *http.Request, id IDPath, userId UserIDPath)
	// ListRoles 服务器角色列表(成员可读)
	// (GET /api/v1/servers/{id}/roles)
	ListRoles(w http.ResponseWriter, r *http.Request, id IDPath)
	// CreateRole 创建自定义角色(需 ManageRoles,#35 B4)
	// (POST /api/v1/servers/{id}/roles)
	CreateRole(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListServerWebhooks 出站 Webhook 订阅列表(ManageServer)
	// (GET /api/v1/servers/{id}/webhooks)
	ListServerWebhooks(w http.ResponseWriter, r *http.Request, id IDPath)
	// CreateServerWebhook 创建出站订阅(ManageServer;响应含一次性 secret)
	// (POST /api/v1/servers/{id}/webhooks)
	CreateServerWebhook(w http.ResponseWriter, r *http.Request, id IDPath)
	// DeleteServerWebhook 删除出站订阅(ManageServer)
	// (DELETE /api/v1/servers/{id}/webhooks/{wid})
	DeleteServerWebhook(w http.ResponseWriter, r *http.Request, id IDPath, wid WebhookIDPath)
	// PatchServerWebhook 改出站订阅(ManageServer;Merge Patch)
	// (PATCH /api/v1/servers/{id}/webhooks/{wid})
	PatchServerWebhook(w http.ResponseWriter, r *http.Request, id IDPath, wid WebhookIDPath)
	// GetSync 事件续传失败后的聚合快照
	// (GET /api/v1/sync)
	GetSync(w http.ResponseWriter, r *http.Request)
	// ListTokens 当前用户的令牌列表(只含元数据)
	// (GET /api/v1/tokens)
	ListTokens(w http.ResponseWriter, r *http.Request)
	// CreateToken 创建个人访问令牌(响应含一次性明文)
	// (POST /api/v1/tokens)
	CreateToken(w http.ResponseWriter, r *http.Request)
	// RevokeToken 吊销令牌(立即生效)
	// (DELETE /api/v1/tokens/{id})
	RevokeToken(w http.ResponseWriter, r *http.Request, id IDPath)
	// ListUnreads 全部可见频道与服务器的未读/提及计数
	// (GET /api/v1/unreads)
	ListUnreads(w http.ResponseWriter, r *http.Request)
	// GetMe 当前用户(自响应,含 email)
	// (GET /api/v1/users/me)
	GetMe(w http.ResponseWriter, r *http.Request)
	// PatchMe 改昵称(无头像字段)
	// (PATCH /api/v1/users/me)
	PatchMe(w http.ResponseWriter, r *http.Request)
	// DeliverInboundWebhook 入站投递入口(免鉴权;全服务唯一免 Bearer 端点)
	// (POST /api/v1/webhooks/{id}/{secret})
	DeliverInboundWebhook(w http.ResponseWriter, r *http.Request, id IDPath, secret SecretPath)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) AcceptFriendRequest

func (siw *ServerInterfaceWrapper) AcceptFriendRequest(w http.ResponseWriter, r *http.Request)

AcceptFriendRequest operation middleware

func (*ServerInterfaceWrapper) AddConversationMembers

func (siw *ServerInterfaceWrapper) AddConversationMembers(w http.ResponseWriter, r *http.Request)

AddConversationMembers operation middleware

func (*ServerInterfaceWrapper) CreateCategory

func (siw *ServerInterfaceWrapper) CreateCategory(w http.ResponseWriter, r *http.Request)

CreateCategory operation middleware

func (*ServerInterfaceWrapper) CreateChannel

func (siw *ServerInterfaceWrapper) CreateChannel(w http.ResponseWriter, r *http.Request)

CreateChannel operation middleware

func (*ServerInterfaceWrapper) CreateConversation

func (siw *ServerInterfaceWrapper) CreateConversation(w http.ResponseWriter, r *http.Request)

CreateConversation operation middleware

func (*ServerInterfaceWrapper) CreateFriendRequest

func (siw *ServerInterfaceWrapper) CreateFriendRequest(w http.ResponseWriter, r *http.Request)

CreateFriendRequest operation middleware

func (*ServerInterfaceWrapper) CreateInboundWebhook

func (siw *ServerInterfaceWrapper) CreateInboundWebhook(w http.ResponseWriter, r *http.Request)

CreateInboundWebhook operation middleware

func (*ServerInterfaceWrapper) CreateInvite

func (siw *ServerInterfaceWrapper) CreateInvite(w http.ResponseWriter, r *http.Request)

CreateInvite operation middleware

func (*ServerInterfaceWrapper) CreateMessage

func (siw *ServerInterfaceWrapper) CreateMessage(w http.ResponseWriter, r *http.Request)

CreateMessage operation middleware

func (*ServerInterfaceWrapper) CreateRole

func (siw *ServerInterfaceWrapper) CreateRole(w http.ResponseWriter, r *http.Request)

CreateRole operation middleware

func (*ServerInterfaceWrapper) CreateServer

func (siw *ServerInterfaceWrapper) CreateServer(w http.ResponseWriter, r *http.Request)

CreateServer operation middleware

func (*ServerInterfaceWrapper) CreateServerWebhook

func (siw *ServerInterfaceWrapper) CreateServerWebhook(w http.ResponseWriter, r *http.Request)

CreateServerWebhook operation middleware

func (*ServerInterfaceWrapper) CreateToken

func (siw *ServerInterfaceWrapper) CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken operation middleware

func (*ServerInterfaceWrapper) DeleteCategory

func (siw *ServerInterfaceWrapper) DeleteCategory(w http.ResponseWriter, r *http.Request)

DeleteCategory operation middleware

func (*ServerInterfaceWrapper) DeleteChannel

func (siw *ServerInterfaceWrapper) DeleteChannel(w http.ResponseWriter, r *http.Request)

DeleteChannel operation middleware

func (*ServerInterfaceWrapper) DeleteChannelOverwrite

func (siw *ServerInterfaceWrapper) DeleteChannelOverwrite(w http.ResponseWriter, r *http.Request)

DeleteChannelOverwrite operation middleware

func (*ServerInterfaceWrapper) DeleteConversation

func (siw *ServerInterfaceWrapper) DeleteConversation(w http.ResponseWriter, r *http.Request)

DeleteConversation operation middleware

func (*ServerInterfaceWrapper) DeleteDevice

func (siw *ServerInterfaceWrapper) DeleteDevice(w http.ResponseWriter, r *http.Request)

DeleteDevice operation middleware

func (*ServerInterfaceWrapper) DeleteFriend

func (siw *ServerInterfaceWrapper) DeleteFriend(w http.ResponseWriter, r *http.Request)

DeleteFriend operation middleware

func (*ServerInterfaceWrapper) DeleteInboundWebhook

func (siw *ServerInterfaceWrapper) DeleteInboundWebhook(w http.ResponseWriter, r *http.Request)

DeleteInboundWebhook operation middleware

func (*ServerInterfaceWrapper) DeleteMessage

func (siw *ServerInterfaceWrapper) DeleteMessage(w http.ResponseWriter, r *http.Request)

DeleteMessage operation middleware

func (*ServerInterfaceWrapper) DeleteRole

func (siw *ServerInterfaceWrapper) DeleteRole(w http.ResponseWriter, r *http.Request)

DeleteRole operation middleware

func (*ServerInterfaceWrapper) DeleteServer

func (siw *ServerInterfaceWrapper) DeleteServer(w http.ResponseWriter, r *http.Request)

DeleteServer operation middleware

func (*ServerInterfaceWrapper) DeleteServerWebhook

func (siw *ServerInterfaceWrapper) DeleteServerWebhook(w http.ResponseWriter, r *http.Request)

DeleteServerWebhook operation middleware

func (*ServerInterfaceWrapper) DeliverInboundWebhook

func (siw *ServerInterfaceWrapper) DeliverInboundWebhook(w http.ResponseWriter, r *http.Request)

DeliverInboundWebhook operation middleware

func (*ServerInterfaceWrapper) DownloadAttachment

func (siw *ServerInterfaceWrapper) DownloadAttachment(w http.ResponseWriter, r *http.Request)

DownloadAttachment operation middleware

func (*ServerInterfaceWrapper) DownloadAttachmentThumbnail

func (siw *ServerInterfaceWrapper) DownloadAttachmentThumbnail(w http.ResponseWriter, r *http.Request)

DownloadAttachmentThumbnail operation middleware

func (*ServerInterfaceWrapper) EditMessage

func (siw *ServerInterfaceWrapper) EditMessage(w http.ResponseWriter, r *http.Request)

EditMessage operation middleware

func (*ServerInterfaceWrapper) GetConfig

func (siw *ServerInterfaceWrapper) GetConfig(w http.ResponseWriter, r *http.Request)

GetConfig operation middleware

func (*ServerInterfaceWrapper) GetConversation

func (siw *ServerInterfaceWrapper) GetConversation(w http.ResponseWriter, r *http.Request)

GetConversation operation middleware

func (*ServerInterfaceWrapper) GetHealthz

func (siw *ServerInterfaceWrapper) GetHealthz(w http.ResponseWriter, r *http.Request)

GetHealthz operation middleware

func (*ServerInterfaceWrapper) GetLinkPreview

func (siw *ServerInterfaceWrapper) GetLinkPreview(w http.ResponseWriter, r *http.Request)

GetLinkPreview operation middleware

func (*ServerInterfaceWrapper) GetMe

GetMe operation middleware

func (*ServerInterfaceWrapper) GetMessage

func (siw *ServerInterfaceWrapper) GetMessage(w http.ResponseWriter, r *http.Request)

GetMessage operation middleware

func (*ServerInterfaceWrapper) GetSync

GetSync operation middleware

func (*ServerInterfaceWrapper) GuestLogin

func (siw *ServerInterfaceWrapper) GuestLogin(w http.ResponseWriter, r *http.Request)

GuestLogin operation middleware

func (*ServerInterfaceWrapper) JoinServer

func (siw *ServerInterfaceWrapper) JoinServer(w http.ResponseWriter, r *http.Request)

JoinServer operation middleware

func (*ServerInterfaceWrapper) ListAuditLog

func (siw *ServerInterfaceWrapper) ListAuditLog(w http.ResponseWriter, r *http.Request)

ListAuditLog operation middleware

func (*ServerInterfaceWrapper) ListChannelOverwrites

func (siw *ServerInterfaceWrapper) ListChannelOverwrites(w http.ResponseWriter, r *http.Request)

ListChannelOverwrites operation middleware

func (*ServerInterfaceWrapper) ListChannels

func (siw *ServerInterfaceWrapper) ListChannels(w http.ResponseWriter, r *http.Request)

ListChannels operation middleware

func (*ServerInterfaceWrapper) ListConversations

func (siw *ServerInterfaceWrapper) ListConversations(w http.ResponseWriter, r *http.Request)

ListConversations operation middleware

func (*ServerInterfaceWrapper) ListDevices

func (siw *ServerInterfaceWrapper) ListDevices(w http.ResponseWriter, r *http.Request)

ListDevices operation middleware

func (*ServerInterfaceWrapper) ListFriends

func (siw *ServerInterfaceWrapper) ListFriends(w http.ResponseWriter, r *http.Request)

ListFriends operation middleware

func (*ServerInterfaceWrapper) ListInboundWebhooks

func (siw *ServerInterfaceWrapper) ListInboundWebhooks(w http.ResponseWriter, r *http.Request)

ListInboundWebhooks operation middleware

func (*ServerInterfaceWrapper) ListMentionCandidates

func (siw *ServerInterfaceWrapper) ListMentionCandidates(w http.ResponseWriter, r *http.Request)

ListMentionCandidates operation middleware

func (*ServerInterfaceWrapper) ListMessages

func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)

ListMessages operation middleware

func (*ServerInterfaceWrapper) ListRoles

func (siw *ServerInterfaceWrapper) ListRoles(w http.ResponseWriter, r *http.Request)

ListRoles operation middleware

func (*ServerInterfaceWrapper) ListServerMembers

func (siw *ServerInterfaceWrapper) ListServerMembers(w http.ResponseWriter, r *http.Request)

ListServerMembers operation middleware

func (*ServerInterfaceWrapper) ListServerWebhooks

func (siw *ServerInterfaceWrapper) ListServerWebhooks(w http.ResponseWriter, r *http.Request)

ListServerWebhooks operation middleware

func (*ServerInterfaceWrapper) ListServers

func (siw *ServerInterfaceWrapper) ListServers(w http.ResponseWriter, r *http.Request)

ListServers operation middleware

func (*ServerInterfaceWrapper) ListTokens

func (siw *ServerInterfaceWrapper) ListTokens(w http.ResponseWriter, r *http.Request)

ListTokens operation middleware

func (*ServerInterfaceWrapper) ListUnreads

func (siw *ServerInterfaceWrapper) ListUnreads(w http.ResponseWriter, r *http.Request)

ListUnreads operation middleware

func (*ServerInterfaceWrapper) Login

Login operation middleware

func (*ServerInterfaceWrapper) Logout

Logout operation middleware

func (*ServerInterfaceWrapper) MarkChannelRead

func (siw *ServerInterfaceWrapper) MarkChannelRead(w http.ResponseWriter, r *http.Request)

MarkChannelRead operation middleware

func (*ServerInterfaceWrapper) OidcAuthorize

func (siw *ServerInterfaceWrapper) OidcAuthorize(w http.ResponseWriter, r *http.Request)

OidcAuthorize operation middleware

func (*ServerInterfaceWrapper) OidcCallback

func (siw *ServerInterfaceWrapper) OidcCallback(w http.ResponseWriter, r *http.Request)

OidcCallback operation middleware

func (*ServerInterfaceWrapper) PatchCategory

func (siw *ServerInterfaceWrapper) PatchCategory(w http.ResponseWriter, r *http.Request)

PatchCategory operation middleware

func (*ServerInterfaceWrapper) PatchChannel

func (siw *ServerInterfaceWrapper) PatchChannel(w http.ResponseWriter, r *http.Request)

PatchChannel operation middleware

func (*ServerInterfaceWrapper) PatchConversation

func (siw *ServerInterfaceWrapper) PatchConversation(w http.ResponseWriter, r *http.Request)

PatchConversation operation middleware

func (*ServerInterfaceWrapper) PatchFriend

func (siw *ServerInterfaceWrapper) PatchFriend(w http.ResponseWriter, r *http.Request)

PatchFriend operation middleware

func (*ServerInterfaceWrapper) PatchInboundWebhook

func (siw *ServerInterfaceWrapper) PatchInboundWebhook(w http.ResponseWriter, r *http.Request)

PatchInboundWebhook operation middleware

func (*ServerInterfaceWrapper) PatchMe

PatchMe operation middleware

func (*ServerInterfaceWrapper) PatchServer

func (siw *ServerInterfaceWrapper) PatchServer(w http.ResponseWriter, r *http.Request)

PatchServer operation middleware

func (*ServerInterfaceWrapper) PatchServerWebhook

func (siw *ServerInterfaceWrapper) PatchServerWebhook(w http.ResponseWriter, r *http.Request)

PatchServerWebhook operation middleware

func (*ServerInterfaceWrapper) PostRtcCredentials

func (siw *ServerInterfaceWrapper) PostRtcCredentials(w http.ResponseWriter, r *http.Request)

PostRtcCredentials operation middleware

func (*ServerInterfaceWrapper) Refresh

Refresh operation middleware

func (*ServerInterfaceWrapper) Register

func (siw *ServerInterfaceWrapper) Register(w http.ResponseWriter, r *http.Request)

Register operation middleware

func (*ServerInterfaceWrapper) RegisterDevice

func (siw *ServerInterfaceWrapper) RegisterDevice(w http.ResponseWriter, r *http.Request)

RegisterDevice operation middleware

func (*ServerInterfaceWrapper) RemoveConversationMember

func (siw *ServerInterfaceWrapper) RemoveConversationMember(w http.ResponseWriter, r *http.Request)

RemoveConversationMember operation middleware

func (*ServerInterfaceWrapper) ResetPassword

func (siw *ServerInterfaceWrapper) ResetPassword(w http.ResponseWriter, r *http.Request)

ResetPassword operation middleware

func (*ServerInterfaceWrapper) RevokeToken

func (siw *ServerInterfaceWrapper) RevokeToken(w http.ResponseWriter, r *http.Request)

RevokeToken operation middleware

func (*ServerInterfaceWrapper) SearchMessages

func (siw *ServerInterfaceWrapper) SearchMessages(w http.ResponseWriter, r *http.Request)

SearchMessages operation middleware

func (*ServerInterfaceWrapper) SendEmailCode

func (siw *ServerInterfaceWrapper) SendEmailCode(w http.ResponseWriter, r *http.Request)

SendEmailCode operation middleware

func (*ServerInterfaceWrapper) SetChannelOverwrite

func (siw *ServerInterfaceWrapper) SetChannelOverwrite(w http.ResponseWriter, r *http.Request)

SetChannelOverwrite operation middleware

func (*ServerInterfaceWrapper) SetMemberRoles

func (siw *ServerInterfaceWrapper) SetMemberRoles(w http.ResponseWriter, r *http.Request)

SetMemberRoles operation middleware

func (*ServerInterfaceWrapper) SetServerMuted

func (siw *ServerInterfaceWrapper) SetServerMuted(w http.ResponseWriter, r *http.Request)

SetServerMuted operation middleware

func (*ServerInterfaceWrapper) UpdateRole

func (siw *ServerInterfaceWrapper) UpdateRole(w http.ResponseWriter, r *http.Request)

UpdateRole operation middleware

func (*ServerInterfaceWrapper) UploadAttachment

func (siw *ServerInterfaceWrapper) UploadAttachment(w http.ResponseWriter, r *http.Request)

UploadAttachment operation middleware

type ServerMuteRequest

type ServerMuteRequest struct {
	// Muted true=服务端强制闭麦;false=解禁恢复转发
	Muted bool `json:"muted"`
}

ServerMuteRequest defines model for ServerMuteRequest.

type SetChannelOverwrite200JSONResponse

type SetChannelOverwrite200JSONResponse ChannelOverwrite

func (SetChannelOverwrite200JSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwrite200JSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetChannelOverwrite400ApplicationProblemPlusJSONResponse

type SetChannelOverwrite400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (SetChannelOverwrite400ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwrite400ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetChannelOverwrite401ApplicationProblemPlusJSONResponse

type SetChannelOverwrite401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (SetChannelOverwrite401ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwrite401ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetChannelOverwrite403ApplicationProblemPlusJSONResponse

type SetChannelOverwrite403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (SetChannelOverwrite403ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwrite403ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetChannelOverwrite404ApplicationProblemPlusJSONResponse

type SetChannelOverwrite404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (SetChannelOverwrite404ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwrite404ApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetChannelOverwriteJSONRequestBody

type SetChannelOverwriteJSONRequestBody = SetOverwriteRequest

SetChannelOverwriteJSONRequestBody defines body for SetChannelOverwrite for application/json ContentType.

type SetChannelOverwriteParamsTargetType

type SetChannelOverwriteParamsTargetType string

SetChannelOverwriteParamsTargetType defines parameters for SetChannelOverwrite.

const (
	SetChannelOverwriteParamsTargetTypeMember SetChannelOverwriteParamsTargetType = "member"
	SetChannelOverwriteParamsTargetTypeRole   SetChannelOverwriteParamsTargetType = "role"
)

Defines values for SetChannelOverwriteParamsTargetType.

func (SetChannelOverwriteParamsTargetType) Valid

Valid indicates whether the value is a known member of the SetChannelOverwriteParamsTargetType enum.

type SetChannelOverwriteRequestObject

type SetChannelOverwriteRequestObject struct {
	Id         IDPath                              `json:"id"`
	TargetType SetChannelOverwriteParamsTargetType `json:"target_type"`
	TargetId   TargetIDPath                        `json:"target_id"`
	Body       *SetChannelOverwriteJSONRequestBody
}

type SetChannelOverwriteResponseObject

type SetChannelOverwriteResponseObject interface {
	VisitSetChannelOverwriteResponse(w http.ResponseWriter) error
}

type SetChannelOverwritedefaultApplicationProblemPlusJSONResponse

type SetChannelOverwritedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (SetChannelOverwritedefaultApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse

func (response SetChannelOverwritedefaultApplicationProblemPlusJSONResponse) VisitSetChannelOverwriteResponse(w http.ResponseWriter) error

type SetMemberRoles200JSONResponse

type SetMemberRoles200JSONResponse StatusOk

func (SetMemberRoles200JSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRoles200JSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetMemberRoles400ApplicationProblemPlusJSONResponse

type SetMemberRoles400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (SetMemberRoles400ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRoles400ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetMemberRoles401ApplicationProblemPlusJSONResponse

type SetMemberRoles401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (SetMemberRoles401ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRoles401ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetMemberRoles403ApplicationProblemPlusJSONResponse

type SetMemberRoles403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (SetMemberRoles403ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRoles403ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetMemberRoles404ApplicationProblemPlusJSONResponse

type SetMemberRoles404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (SetMemberRoles404ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRoles404ApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetMemberRolesJSONRequestBody

type SetMemberRolesJSONRequestBody = SetMemberRolesRequest

SetMemberRolesJSONRequestBody defines body for SetMemberRoles for application/json ContentType.

type SetMemberRolesRequest

type SetMemberRolesRequest struct {
	// RoleIds 全量替换(@everyone 强制保留;owner builtin 不可分配)
	RoleIds []ID `json:"role_ids"`
}

SetMemberRolesRequest defines model for SetMemberRolesRequest.

type SetMemberRolesRequestObject

type SetMemberRolesRequestObject struct {
	Id     IDPath     `json:"id"`
	UserId UserIDPath `json:"user_id"`
	Body   *SetMemberRolesJSONRequestBody
}

type SetMemberRolesResponseObject

type SetMemberRolesResponseObject interface {
	VisitSetMemberRolesResponse(w http.ResponseWriter) error
}

type SetMemberRolesdefaultApplicationProblemPlusJSONResponse

type SetMemberRolesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (SetMemberRolesdefaultApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse

func (response SetMemberRolesdefaultApplicationProblemPlusJSONResponse) VisitSetMemberRolesResponse(w http.ResponseWriter) error

type SetOverwriteRequest

type SetOverwriteRequest struct {
	// Allow 十进制权限位串;只允许 ChannelPermissionMask 内的位
	Allow string `json:"allow"`

	// Deny 十进制权限位串;只允许 ChannelPermissionMask 内的位
	Deny string `json:"deny"`
}

SetOverwriteRequest defines model for SetOverwriteRequest.

type SetServerMuted200JSONResponse

type SetServerMuted200JSONResponse StatusOk

func (SetServerMuted200JSONResponse) VisitSetServerMutedResponse

func (response SetServerMuted200JSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type SetServerMuted400ApplicationProblemPlusJSONResponse

type SetServerMuted400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (SetServerMuted400ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse

func (response SetServerMuted400ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type SetServerMuted401ApplicationProblemPlusJSONResponse

type SetServerMuted401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (SetServerMuted401ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse

func (response SetServerMuted401ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type SetServerMuted403ApplicationProblemPlusJSONResponse

type SetServerMuted403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (SetServerMuted403ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse

func (response SetServerMuted403ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type SetServerMuted404ApplicationProblemPlusJSONResponse

type SetServerMuted404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (SetServerMuted404ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse

func (response SetServerMuted404ApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type SetServerMutedJSONRequestBody

type SetServerMutedJSONRequestBody = ServerMuteRequest

SetServerMutedJSONRequestBody defines body for SetServerMuted for application/json ContentType.

type SetServerMutedRequestObject

type SetServerMutedRequestObject struct {
	Id     IDPath     `json:"id"`
	UserId UserIDPath `json:"user_id"`
	Body   *SetServerMutedJSONRequestBody
}

type SetServerMutedResponseObject

type SetServerMutedResponseObject interface {
	VisitSetServerMutedResponse(w http.ResponseWriter) error
}

type SetServerMuteddefaultApplicationProblemPlusJSONResponse

type SetServerMuteddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (SetServerMuteddefaultApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse

func (response SetServerMuteddefaultApplicationProblemPlusJSONResponse) VisitSetServerMutedResponse(w http.ResponseWriter) error

type StatusOk

type StatusOk struct {
	Status StatusOkStatus `json:"status"`
}

StatusOk 删除/吊销类操作的固定成功体。

type StatusOkStatus

type StatusOkStatus string

StatusOkStatus defines model for StatusOk.Status.

const (
	StatusOkStatusOk StatusOkStatus = "ok"
)

Defines values for StatusOkStatus.

func (StatusOkStatus) Valid

func (e StatusOkStatus) Valid() bool

Valid indicates whether the value is a known member of the StatusOkStatus enum.

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// UploadAttachment 上传附件(multipart,登录可传)
	// (POST /api/v1/attachments)
	UploadAttachment(ctx context.Context, request UploadAttachmentRequestObject) (UploadAttachmentResponseObject, error)
	// DownloadAttachment 下载附件(能力 URL,免 Bearer)
	// (GET /api/v1/attachments/{id})
	DownloadAttachment(ctx context.Context, request DownloadAttachmentRequestObject) (DownloadAttachmentResponseObject, error)
	// DownloadAttachmentThumbnail 下载图片缩略图(能力 URL,免 Bearer)
	// (GET /api/v1/attachments/{id}/thumbnail)
	DownloadAttachmentThumbnail(ctx context.Context, request DownloadAttachmentThumbnailRequestObject) (DownloadAttachmentThumbnailResponseObject, error)
	// SendEmailCode 发送邮箱验证码
	// (POST /api/v1/auth/email-code)
	SendEmailCode(ctx context.Context, request SendEmailCodeRequestObject) (SendEmailCodeResponseObject, error)
	// GuestLogin 游客一键进入(simple 模式专属)
	// (POST /api/v1/auth/guest)
	GuestLogin(ctx context.Context, request GuestLoginRequestObject) (GuestLoginResponseObject, error)
	// Login 邮箱密码登录
	// (POST /api/v1/auth/login)
	Login(ctx context.Context, request LoginRequestObject) (LoginResponseObject, error)
	// Logout 登出并吊销 refresh_token
	// (POST /api/v1/auth/logout)
	Logout(ctx context.Context, request LogoutRequestObject) (LogoutResponseObject, error)
	// OidcAuthorize 发起 OIDC 登录(返回 IdP 授权页 URL)
	// (POST /api/v1/auth/oidc/authorize)
	OidcAuthorize(ctx context.Context, request OidcAuthorizeRequestObject) (OidcAuthorizeResponseObject, error)
	// OidcCallback OIDC 回调(code+state 换本地令牌对)
	// (POST /api/v1/auth/oidc/callback)
	OidcCallback(ctx context.Context, request OidcCallbackRequestObject) (OidcCallbackResponseObject, error)
	// ResetPassword 邮箱验证码重置密码
	// (POST /api/v1/auth/password/reset)
	ResetPassword(ctx context.Context, request ResetPasswordRequestObject) (ResetPasswordResponseObject, error)
	// Refresh 刷新令牌(旋转 refresh_token)
	// (POST /api/v1/auth/refresh)
	Refresh(ctx context.Context, request RefreshRequestObject) (RefreshResponseObject, error)
	// Register 邮箱注册(simple 模式免验证码)
	// (POST /api/v1/auth/register)
	Register(ctx context.Context, request RegisterRequestObject) (RegisterResponseObject, error)
	// DeleteCategory 删除分类(owner/admin,默认仅删空分类)
	// (DELETE /api/v1/categories/{id})
	DeleteCategory(ctx context.Context, request DeleteCategoryRequestObject) (DeleteCategoryResponseObject, error)
	// PatchCategory 改分类名/排序(owner/admin)
	// (PATCH /api/v1/categories/{id})
	PatchCategory(ctx context.Context, request PatchCategoryRequestObject) (PatchCategoryResponseObject, error)
	// DeleteChannel 删除频道(owner/admin)
	// (DELETE /api/v1/channels/{id})
	DeleteChannel(ctx context.Context, request DeleteChannelRequestObject) (DeleteChannelResponseObject, error)
	// PatchChannel 改频道(owner/admin)
	// (PATCH /api/v1/channels/{id})
	PatchChannel(ctx context.Context, request PatchChannelRequestObject) (PatchChannelResponseObject, error)
	// ListInboundWebhooks 频道入站 Webhook 列表(ManageChannels)
	// (GET /api/v1/channels/{id}/inbound-webhooks)
	ListInboundWebhooks(ctx context.Context, request ListInboundWebhooksRequestObject) (ListInboundWebhooksResponseObject, error)
	// CreateInboundWebhook 创建频道入站 Webhook(ManageChannels;响应含一次性投递 URL)
	// (POST /api/v1/channels/{id}/inbound-webhooks)
	CreateInboundWebhook(ctx context.Context, request CreateInboundWebhookRequestObject) (CreateInboundWebhookResponseObject, error)
	// DeleteInboundWebhook 删除入站 Webhook(ManageChannels)
	// (DELETE /api/v1/channels/{id}/inbound-webhooks/{wid})
	DeleteInboundWebhook(ctx context.Context, request DeleteInboundWebhookRequestObject) (DeleteInboundWebhookResponseObject, error)
	// PatchInboundWebhook 轮换入站 Webhook secret(ManageChannels;Merge Patch)
	// (PATCH /api/v1/channels/{id}/inbound-webhooks/{wid})
	PatchInboundWebhook(ctx context.Context, request PatchInboundWebhookRequestObject) (PatchInboundWebhookResponseObject, error)
	// SetServerMuted 服务端强制闭麦/解禁(需 MuteMembers,#36)
	// (PUT /api/v1/channels/{id}/members/{user_id}/server-mute)
	SetServerMuted(ctx context.Context, request SetServerMutedRequestObject) (SetServerMutedResponseObject, error)
	// ListMentionCandidates @提及候选用户
	// (GET /api/v1/channels/{id}/mention-candidates)
	ListMentionCandidates(ctx context.Context, request ListMentionCandidatesRequestObject) (ListMentionCandidatesResponseObject, error)
	// ListMessages 消息分页(游标,倒序取页正序返回)
	// (GET /api/v1/channels/{id}/messages)
	ListMessages(ctx context.Context, request ListMessagesRequestObject) (ListMessagesResponseObject, error)
	// CreateMessage 发送文字消息(≤2000 字 + 频控 20/分 + nonce 幂等)
	// (POST /api/v1/channels/{id}/messages)
	CreateMessage(ctx context.Context, request CreateMessageRequestObject) (CreateMessageResponseObject, error)
	// DeleteMessage 删除消息(软删:作者或管理员)
	// (DELETE /api/v1/channels/{id}/messages/{message_id})
	DeleteMessage(ctx context.Context, request DeleteMessageRequestObject) (DeleteMessageResponseObject, error)
	// GetMessage 单条消息
	// (GET /api/v1/channels/{id}/messages/{message_id})
	GetMessage(ctx context.Context, request GetMessageRequestObject) (GetMessageResponseObject, error)
	// EditMessage 编辑消息(仅作者)
	// (PATCH /api/v1/channels/{id}/messages/{message_id})
	EditMessage(ctx context.Context, request EditMessageRequestObject) (EditMessageResponseObject, error)
	// ListChannelOverwrites 频道覆盖列表(需 ManageChannels)
	// (GET /api/v1/channels/{id}/overwrites)
	ListChannelOverwrites(ctx context.Context, request ListChannelOverwritesRequestObject) (ListChannelOverwritesResponseObject, error)
	// DeleteChannelOverwrite 删除频道覆盖(需 ManageChannels,#35 B4)
	// (DELETE /api/v1/channels/{id}/overwrites/{target_type}/{target_id})
	DeleteChannelOverwrite(ctx context.Context, request DeleteChannelOverwriteRequestObject) (DeleteChannelOverwriteResponseObject, error)
	// SetChannelOverwrite upsert 频道覆盖(需 ManageChannels,#35 B4)
	// (PUT /api/v1/channels/{id}/overwrites/{target_type}/{target_id})
	SetChannelOverwrite(ctx context.Context, request SetChannelOverwriteRequestObject) (SetChannelOverwriteResponseObject, error)
	// MarkChannelRead 标记频道已读(水位只前进)
	// (PUT /api/v1/channels/{id}/read)
	MarkChannelRead(ctx context.Context, request MarkChannelReadRequestObject) (MarkChannelReadResponseObject, error)
	// GetConfig 服务端能力开关
	// (GET /api/v1/config)
	GetConfig(ctx context.Context, request GetConfigRequestObject) (GetConfigResponseObject, error)
	// ListConversations 我的私聊/群私聊列表
	// (GET /api/v1/conversations)
	ListConversations(ctx context.Context, request ListConversationsRequestObject) (ListConversationsResponseObject, error)
	// CreateConversation 创建私聊/群私聊
	// (POST /api/v1/conversations)
	CreateConversation(ctx context.Context, request CreateConversationRequestObject) (CreateConversationResponseObject, error)
	// DeleteConversation 删除会话(direct 任一方;group 仅 owner)
	// (DELETE /api/v1/conversations/{id})
	DeleteConversation(ctx context.Context, request DeleteConversationRequestObject) (DeleteConversationResponseObject, error)
	// GetConversation 会话详情(仅参与者)
	// (GET /api/v1/conversations/{id})
	GetConversation(ctx context.Context, request GetConversationRequestObject) (GetConversationResponseObject, error)
	// PatchConversation 群聊改名(仅 owner)
	// (PATCH /api/v1/conversations/{id})
	PatchConversation(ctx context.Context, request PatchConversationRequestObject) (PatchConversationResponseObject, error)
	// AddConversationMembers 群聊加人(仅 owner)
	// (POST /api/v1/conversations/{id}/members)
	AddConversationMembers(ctx context.Context, request AddConversationMembersRequestObject) (AddConversationMembersResponseObject, error)
	// RemoveConversationMember 移除/退出群聊成员
	// (DELETE /api/v1/conversations/{id}/members/{user_id})
	RemoveConversationMember(ctx context.Context, request RemoveConversationMemberRequestObject) (RemoveConversationMemberResponseObject, error)
	// ListDevices 列出自己的推送设备
	// (GET /api/v1/devices)
	ListDevices(ctx context.Context, request ListDevicesRequestObject) (ListDevicesResponseObject, error)
	// RegisterDevice 注册推送设备(同 push_token 幂等更新)
	// (POST /api/v1/devices)
	RegisterDevice(ctx context.Context, request RegisterDeviceRequestObject) (RegisterDeviceResponseObject, error)
	// DeleteDevice 注销推送设备
	// (DELETE /api/v1/devices/{id})
	DeleteDevice(ctx context.Context, request DeleteDeviceRequestObject) (DeleteDeviceResponseObject, error)
	// ListFriends 好友与好友请求列表
	// (GET /api/v1/friends)
	ListFriends(ctx context.Context, request ListFriendsRequestObject) (ListFriendsResponseObject, error)
	// CreateFriendRequest 按 昵称#tag 发起好友请求
	// (POST /api/v1/friends/requests)
	CreateFriendRequest(ctx context.Context, request CreateFriendRequestRequestObject) (CreateFriendRequestResponseObject, error)
	// AcceptFriendRequest 接受好友请求(仅被请求方)
	// (POST /api/v1/friends/requests/{id}/accept)
	AcceptFriendRequest(ctx context.Context, request AcceptFriendRequestRequestObject) (AcceptFriendRequestResponseObject, error)
	// DeleteFriend 删除好友关系(双方任一方向)
	// (DELETE /api/v1/friends/{id})
	DeleteFriend(ctx context.Context, request DeleteFriendRequestObject) (DeleteFriendResponseObject, error)
	// PatchFriend 设置备注/分组(仅发起方)
	// (PATCH /api/v1/friends/{id})
	PatchFriend(ctx context.Context, request PatchFriendRequestObject) (PatchFriendResponseObject, error)
	// GetHealthz 健康检查(部署探活)
	// (GET /api/v1/healthz)
	GetHealthz(ctx context.Context, request GetHealthzRequestObject) (GetHealthzResponseObject, error)
	// GetLinkPreview 抓取链接预览
	// (GET /api/v1/link-preview)
	GetLinkPreview(ctx context.Context, request GetLinkPreviewRequestObject) (GetLinkPreviewResponseObject, error)
	// DeleteRole 删除自定义角色(需 ManageRoles,builtin 403)
	// (DELETE /api/v1/roles/{id})
	DeleteRole(ctx context.Context, request DeleteRoleRequestObject) (DeleteRoleResponseObject, error)
	// UpdateRole 更新自定义角色(需 ManageRoles,builtin 403)
	// (PATCH /api/v1/roles/{id})
	UpdateRole(ctx context.Context, request UpdateRoleRequestObject) (UpdateRoleResponseObject, error)
	// PostRtcCredentials 签发 TURN 短期凭证
	// (POST /api/v1/rtc/credentials)
	PostRtcCredentials(ctx context.Context, request PostRtcCredentialsRequestObject) (PostRtcCredentialsResponseObject, error)
	// SearchMessages 搜索当前用户可见频道内的消息
	// (GET /api/v1/search)
	SearchMessages(ctx context.Context, request SearchMessagesRequestObject) (SearchMessagesResponseObject, error)
	// ListServers 我所在的服务器列表
	// (GET /api/v1/servers)
	ListServers(ctx context.Context, request ListServersRequestObject) (ListServersResponseObject, error)
	// CreateServer 创建服务器(创建者自动成为 owner)
	// (POST /api/v1/servers)
	CreateServer(ctx context.Context, request CreateServerRequestObject) (CreateServerResponseObject, error)
	// JoinServer 凭邀请码加入服务器
	// (POST /api/v1/servers/join)
	JoinServer(ctx context.Context, request JoinServerRequestObject) (JoinServerResponseObject, error)
	// DeleteServer 解散服务器(仅 owner)
	// (DELETE /api/v1/servers/{id})
	DeleteServer(ctx context.Context, request DeleteServerRequestObject) (DeleteServerResponseObject, error)
	// PatchServer 改服务器名称/图标(owner/admin)
	// (PATCH /api/v1/servers/{id})
	PatchServer(ctx context.Context, request PatchServerRequestObject) (PatchServerResponseObject, error)
	// ListAuditLog 审计日志倒序游标(需 ManageServer)
	// (GET /api/v1/servers/{id}/audit-log)
	ListAuditLog(ctx context.Context, request ListAuditLogRequestObject) (ListAuditLogResponseObject, error)
	// CreateCategory 创建分类(owner/admin)
	// (POST /api/v1/servers/{id}/categories)
	CreateCategory(ctx context.Context, request CreateCategoryRequestObject) (CreateCategoryResponseObject, error)
	// ListChannels 服务器的分类与频道(成员可读)
	// (GET /api/v1/servers/{id}/channels)
	ListChannels(ctx context.Context, request ListChannelsRequestObject) (ListChannelsResponseObject, error)
	// CreateChannel 创建频道(owner/admin)
	// (POST /api/v1/servers/{id}/channels)
	CreateChannel(ctx context.Context, request CreateChannelRequestObject) (CreateChannelResponseObject, error)
	// CreateInvite 创建邀请码(owner/admin)
	// (POST /api/v1/servers/{id}/invites)
	CreateInvite(ctx context.Context, request CreateInviteRequestObject) (CreateInviteResponseObject, error)
	// ListServerMembers 服务器成员列表(成员可读)
	// (GET /api/v1/servers/{id}/members)
	ListServerMembers(ctx context.Context, request ListServerMembersRequestObject) (ListServerMembersResponseObject, error)
	// SetMemberRoles 全量替换成员角色(需 ManageRoles,#35 B4)
	// (PUT /api/v1/servers/{id}/members/{user_id}/roles)
	SetMemberRoles(ctx context.Context, request SetMemberRolesRequestObject) (SetMemberRolesResponseObject, error)
	// ListRoles 服务器角色列表(成员可读)
	// (GET /api/v1/servers/{id}/roles)
	ListRoles(ctx context.Context, request ListRolesRequestObject) (ListRolesResponseObject, error)
	// CreateRole 创建自定义角色(需 ManageRoles,#35 B4)
	// (POST /api/v1/servers/{id}/roles)
	CreateRole(ctx context.Context, request CreateRoleRequestObject) (CreateRoleResponseObject, error)
	// ListServerWebhooks 出站 Webhook 订阅列表(ManageServer)
	// (GET /api/v1/servers/{id}/webhooks)
	ListServerWebhooks(ctx context.Context, request ListServerWebhooksRequestObject) (ListServerWebhooksResponseObject, error)
	// CreateServerWebhook 创建出站订阅(ManageServer;响应含一次性 secret)
	// (POST /api/v1/servers/{id}/webhooks)
	CreateServerWebhook(ctx context.Context, request CreateServerWebhookRequestObject) (CreateServerWebhookResponseObject, error)
	// DeleteServerWebhook 删除出站订阅(ManageServer)
	// (DELETE /api/v1/servers/{id}/webhooks/{wid})
	DeleteServerWebhook(ctx context.Context, request DeleteServerWebhookRequestObject) (DeleteServerWebhookResponseObject, error)
	// PatchServerWebhook 改出站订阅(ManageServer;Merge Patch)
	// (PATCH /api/v1/servers/{id}/webhooks/{wid})
	PatchServerWebhook(ctx context.Context, request PatchServerWebhookRequestObject) (PatchServerWebhookResponseObject, error)
	// GetSync 事件续传失败后的聚合快照
	// (GET /api/v1/sync)
	GetSync(ctx context.Context, request GetSyncRequestObject) (GetSyncResponseObject, error)
	// ListTokens 当前用户的令牌列表(只含元数据)
	// (GET /api/v1/tokens)
	ListTokens(ctx context.Context, request ListTokensRequestObject) (ListTokensResponseObject, error)
	// CreateToken 创建个人访问令牌(响应含一次性明文)
	// (POST /api/v1/tokens)
	CreateToken(ctx context.Context, request CreateTokenRequestObject) (CreateTokenResponseObject, error)
	// RevokeToken 吊销令牌(立即生效)
	// (DELETE /api/v1/tokens/{id})
	RevokeToken(ctx context.Context, request RevokeTokenRequestObject) (RevokeTokenResponseObject, error)
	// ListUnreads 全部可见频道与服务器的未读/提及计数
	// (GET /api/v1/unreads)
	ListUnreads(ctx context.Context, request ListUnreadsRequestObject) (ListUnreadsResponseObject, error)
	// GetMe 当前用户(自响应,含 email)
	// (GET /api/v1/users/me)
	GetMe(ctx context.Context, request GetMeRequestObject) (GetMeResponseObject, error)
	// PatchMe 改昵称(无头像字段)
	// (PATCH /api/v1/users/me)
	PatchMe(ctx context.Context, request PatchMeRequestObject) (PatchMeResponseObject, error)
	// DeliverInboundWebhook 入站投递入口(免鉴权;全服务唯一免 Bearer 端点)
	// (POST /api/v1/webhooks/{id}/{secret})
	DeliverInboundWebhook(ctx context.Context, request DeliverInboundWebhookRequestObject) (DeliverInboundWebhookResponseObject, error)
}

StrictServerInterface represents all server handlers.

type SyncServer

type SyncServer struct {
	Categories []CategoryInfo `json:"categories"`
	Channels   []ChannelInfo  `json:"channels"`
	CreatedAt  Time           `json:"created_at"`

	// IconColor #RRGGBB
	IconColor string `json:"icon_color"`
	IconName  string `json:"icon_name"`
	Id        ID     `json:"id"`
	Name      string `json:"name"`
	OwnerId   ID     `json:"owner_id"`
}

SyncServer 聚合快照中的服务器:ServerInfo 字段平铺 + 分类与频道(空为 [],非 null)。

type SyncSnapshot

type SyncSnapshot struct {
	Friends []FriendEntry `json:"friends"`
	Servers []SyncServer  `json:"servers"`
}

SyncSnapshot 续传失败后的聚合快照(#78)。servers 只含调用者为成员的服务器与其频道; friends 的 user 为 PublicUser(不含 email),online 对已接受关系为真实在线态。

type TargetIDPath

type TargetIDPath = int64

TargetIDPath defines model for TargetIDPath.

type TargetTypePath

type TargetTypePath string

TargetTypePath defines model for TargetTypePath.

const (
	TargetTypePathMember TargetTypePath = "member"
	TargetTypePathRole   TargetTypePath = "role"
)

Defines values for TargetTypePath.

func (TargetTypePath) Valid

func (e TargetTypePath) Valid() bool

Valid indicates whether the value is a known member of the TargetTypePath enum.

type Time

type Time time.Time

Time wire 时间(#31):一律 RFC 3339 UTC(去掉纳秒)。Go 的 time.Time 默认 序列化带本地偏移且是 RFC3339Nano,出参必须经本类型收口。

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON 输出 RFC 3339 UTC(秒精度)。

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON 接受 RFC 3339(含偏移,内部归一 UTC)。

type TokenPair

type TokenPair struct {
	AccessToken string `json:"access_token"`

	// ExpiresIn access_token 有效期(秒)
	ExpiresIn    int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`

	// User 自响应用户(/users/me、登录/注册/游客/刷新),含 email。ID 为十进制字符串(#31)。
	User User `json:"user"`
}

TokenPair defines model for TokenPair.

type TooLarge

type TooLarge = Problem

TooLarge RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type TooLargeApplicationProblemPlusJSONResponse

type TooLargeApplicationProblemPlusJSONResponse Problem

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type TurnUnavailable

type TurnUnavailable = Problem

TurnUnavailable RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type TurnUnavailableApplicationProblemPlusJSONResponse

type TurnUnavailableApplicationProblemPlusJSONResponse Problem

type Unauthorized

type Unauthorized = Problem

Unauthorized RFC 9457 问题详情(application/problem+json,#31)。code 为扩展字段 (机器可读错误码,客户端依赖,字符串码与旧版一致);detail 为本次出错 的中文提示。message 与 detail 同值,是兼容旧客户端的提示字段 (RFC 9457 允许的扩展字段,至少保留一个版本)。

type UnauthorizedApplicationProblemPlusJSONResponse

type UnauthorizedApplicationProblemPlusJSONResponse Problem

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UnreadChannel

type UnreadChannel struct {
	ChannelId ID `json:"channel_id"`

	// MentionCount 未读消息中提及当前用户的条数
	MentionCount int `json:"mention_count"`

	// UnreadCount 未读消息条数
	UnreadCount int `json:"unread_count"`
}

UnreadChannel 单个频道的未读/提及计数(#40)。未读 = 水位之后、非本人、未软删的消息; 提及 = 其中 @ 当前用户的条数。计数为 0 的频道仍返回。

type UnreadServer

type UnreadServer struct {
	// MentionCount 服务器可见文字频道的未读提及总数
	MentionCount int `json:"mention_count"`
	ServerId     ID  `json:"server_id"`

	// UnreadCount 服务器可见文字频道的未读总数
	UnreadCount int `json:"unread_count"`
}

UnreadServer 服务器维度的未读/提及计数(#40):只聚合该服务器下当前用户可见的文字 频道,不含 direct/group 会话。没有可见频道的服务器也返回 0 值项。

type Unreads

type Unreads struct {
	Channels []UnreadChannel `json:"channels"`
	Servers  []UnreadServer  `json:"servers"`
}

Unreads 当前用户的未读快照(#40):channels 覆盖全部可见频道(含 0 值项), servers 覆盖全部已加入服务器(仅聚合服务器文字频道)。数组按 ID 升序, 空数组返回 [] 而非 null。

type UpdateRole200JSONResponse

type UpdateRole200JSONResponse Role

func (UpdateRole200JSONResponse) VisitUpdateRoleResponse

func (response UpdateRole200JSONResponse) VisitUpdateRoleResponse(w http.ResponseWriter) error

type UpdateRole400ApplicationProblemPlusJSONResponse

type UpdateRole400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (UpdateRole400ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse

func (response UpdateRole400ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse(w http.ResponseWriter) error

type UpdateRole401ApplicationProblemPlusJSONResponse

type UpdateRole401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (UpdateRole401ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse

func (response UpdateRole401ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse(w http.ResponseWriter) error

type UpdateRole403ApplicationProblemPlusJSONResponse

type UpdateRole403ApplicationProblemPlusJSONResponse struct {
	ForbiddenApplicationProblemPlusJSONResponse
}

func (UpdateRole403ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse

func (response UpdateRole403ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse(w http.ResponseWriter) error

type UpdateRole404ApplicationProblemPlusJSONResponse

type UpdateRole404ApplicationProblemPlusJSONResponse struct {
	NotFoundApplicationProblemPlusJSONResponse
}

func (UpdateRole404ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse

func (response UpdateRole404ApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse(w http.ResponseWriter) error

type UpdateRoleJSONRequestBody

type UpdateRoleJSONRequestBody = UpdateRoleRequest

UpdateRoleJSONRequestBody defines body for UpdateRole for application/json ContentType.

type UpdateRoleRequest

type UpdateRoleRequest struct {
	// Color #RRGGBB;缺省沿用现值
	Color *string `json:"color,omitempty"`

	// Name 1–32 字符
	Name string `json:"name"`

	// Permissions 十进制权限位串;只允许低 15 位,且是操作者权限的子集
	Permissions string `json:"permissions"`

	// Position 缺省沿用现值;非 owner 必须严格小于其最高角色 position
	Position *int `json:"position,omitempty"`
}

UpdateRoleRequest defines model for UpdateRoleRequest.

type UpdateRoleRequestObject

type UpdateRoleRequestObject struct {
	Id   IDPath `json:"id"`
	Body *UpdateRoleJSONRequestBody
}

type UpdateRoleResponseObject

type UpdateRoleResponseObject interface {
	VisitUpdateRoleResponse(w http.ResponseWriter) error
}

type UpdateRoledefaultApplicationProblemPlusJSONResponse

type UpdateRoledefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (UpdateRoledefaultApplicationProblemPlusJSONResponse) VisitUpdateRoleResponse

type UploadAttachment201JSONResponse

type UploadAttachment201JSONResponse Attachment

func (UploadAttachment201JSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachment201JSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type UploadAttachment400ApplicationProblemPlusJSONResponse

type UploadAttachment400ApplicationProblemPlusJSONResponse struct {
	BadRequestApplicationProblemPlusJSONResponse
}

func (UploadAttachment400ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachment400ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type UploadAttachment401ApplicationProblemPlusJSONResponse

type UploadAttachment401ApplicationProblemPlusJSONResponse struct {
	UnauthorizedApplicationProblemPlusJSONResponse
}

func (UploadAttachment401ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachment401ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type UploadAttachment413ApplicationProblemPlusJSONResponse

type UploadAttachment413ApplicationProblemPlusJSONResponse struct {
	TooLargeApplicationProblemPlusJSONResponse
}

func (UploadAttachment413ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachment413ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type UploadAttachment429ApplicationProblemPlusJSONResponse

type UploadAttachment429ApplicationProblemPlusJSONResponse struct {
	RateLimitedApplicationProblemPlusJSONResponse
}

func (UploadAttachment429ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachment429ApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type UploadAttachmentMultipartBody

type UploadAttachmentMultipartBody struct {
	// File 文件内容(唯一字段)
	File openapi_types.File `json:"file"`
}

UploadAttachmentMultipartBody defines parameters for UploadAttachment.

type UploadAttachmentMultipartRequestBody

type UploadAttachmentMultipartRequestBody UploadAttachmentMultipartBody

UploadAttachmentMultipartRequestBody defines body for UploadAttachment for multipart/form-data ContentType.

type UploadAttachmentRequestObject

type UploadAttachmentRequestObject struct {
	Body *multipart.Reader
}

type UploadAttachmentResponseObject

type UploadAttachmentResponseObject interface {
	VisitUploadAttachmentResponse(w http.ResponseWriter) error
}

type UploadAttachmentdefaultApplicationProblemPlusJSONResponse

type UploadAttachmentdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (UploadAttachmentdefaultApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse

func (response UploadAttachmentdefaultApplicationProblemPlusJSONResponse) VisitUploadAttachmentResponse(w http.ResponseWriter) error

type User

type User struct {
	CreatedAt     Time   `json:"created_at"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Id            ID     `json:"id"`
	IsGuest       bool   `json:"is_guest"`
	Nickname      string `json:"nickname"`

	// Status 账号状态枚举
	Status int32 `json:"status"`

	// Tag 四位定宽数字串
	Tag       string `json:"tag"`
	UpdatedAt Time   `json:"updated_at"`
}

User 自响应用户(/users/me、登录/注册/游客/刷新),含 email。ID 为十进制字符串(#31)。

type UserIDPath

type UserIDPath = int64

UserIDPath defines model for UserIDPath.

type VoicePresence

type VoicePresence interface {
	// VoiceChannelOf 返回 uid 当前语音房 ID 与所属服务器 ID(均为十进制字符串)。
	// dev 内置房间 serverID 为 "0"(无 store 频道实体,调用方不带频道字段)。
	VoiceChannelOf(uid string) (channelID, serverID string, ok bool)
}

VoicePresence 好友频道 presence 反查(#92):uid → 当前语音房。 *signal.Hub 满足(VoiceChannelOf);窄接口单独注入,不塞进 Hub—— api.Hub 只管踢线,fakeHub 不必为好友快照补方法。

type WebhookIDPath

type WebhookIDPath = int64

WebhookIDPath defines model for WebhookIDPath.

Jump to

Keyboard shortcuts

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