plan

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 20 Imported by: 1 module, 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 plan 提供 XOps v2 纯函数领域核的 Merkle 链式连接计划与世代句柄模型。

本包恪守 100% 纯数学与零副作用铁律(零 os、零 net、零 context、零 sync/sync/atomic、零反射):

  • HopDigest 与 PlanDigest:不透明 32 字节 SHA-256 摘要值对象(常量时间 Equal + TextAppender);
  • TransportPolicySpec 与 HopSpec:冻结每跳连接安全与传输策略投影(零明文凭据), 全部经 //xops:canonicalhash 由 xopsvet/digestcover 在编译期静态验证 WriteCanonical 100% 全字段覆盖;
  • SealedConnectionPlan:不可变多跳 Merkle 链式连接计划,上游任意跳板变动均必然级联刷新全部下游 HopDigest 与 PlanDigest,保障连接池缓存隔离与共享堡垒机前缀安全复用(INV-C1 / ADR-009);
  • ManagedHandle[K]:按封闭句柄类别 K 参数化的世代句柄(id、gen>=1、planDigest、binding、valid), 零值失败关闭,阻断跨类别、陈旧世代或绑定漂移重放。

Index

Constants

This section is empty.

Variables

本包导出的规范哨兵错误,所有非法字段、篡改摘要、JSON null 及零值访问均严格失败关闭。

Functions

func AuthMethodDigest

func AuthMethodDigest(auth inventory.AuthMethod) (security.Digest, error)

AuthMethodDigest 计算 inventory.AuthMethod 的零明文确定性 SHA-256 摘要,供 HopSpec 绑定认证身份。

Types

type HandleID

type HandleID struct {
	// contains filtered or unexported fields
}

HandleID 表示跨请求托管资源的不可变唯一槽位标识符;零值恒无效并失败关闭。

func HandleIDFromBytes

func HandleIDFromBytes(raw [handleIDEntropyBytes]byte) HandleID

HandleIDFromBytes 将 16 字节原始熵确定性编码为 32 位小写十六进制 HandleID。

func NewHandleIDFrom

func NewHandleIDFrom(entropy io.Reader) (HandleID, error)

NewHandleIDFrom 从显式注入的熵源 io.Reader 读取 16 字节构造 HandleID(零隐式 crypto/rand)。

func ParseHandleID

func ParseHandleID(raw string) (HandleID, error)

ParseHandleID 校验并构造 HandleID(长度 1..128 的可打印非空白非冒号 ASCII)。

func (HandleID) AppendText

func (id HandleID) AppendText(b []byte) ([]byte, error)

func (HandleID) Compare

func (id HandleID) Compare(o HandleID) int

func (HandleID) Equal

func (id HandleID) Equal(o HandleID) bool

func (HandleID) IsValid

func (id HandleID) IsValid() bool

func (HandleID) IsZero

func (id HandleID) IsZero() bool

func (HandleID) MarshalText

func (id HandleID) MarshalText() ([]byte, error)

func (HandleID) String

func (id HandleID) String() string

func (*HandleID) UnmarshalText

func (id *HandleID) UnmarshalText(text []byte) error

type HandleKind

type HandleKind interface {
	// contains filtered or unexported methods
}

HandleKind 是长生命周期 SlotMap 世代句柄的编译期封闭幻影类型约束(ADR-009), 借助泛型参数 K 物理隔离 PTY、Tunnel、Transfer、Mux 与 Session 句柄,杜绝跨类别误用。

type HandleKindCode

type HandleKindCode uint8

HandleKindCode 是幻影类型集 HandleKind 对应的可序列化枚举;零值 HandleKindInvalid 失败关闭。

const (
	HandleKindInvalid  HandleKindCode = iota // 无效句柄类别(零值失败关闭)
	HandleKindPTY                            // 对应 KindPTY
	HandleKindTunnel                         // 对应 KindTunnel
	HandleKindTransfer                       // 对应 KindTransfer
	HandleKindMux                            // 对应 KindMux
	HandleKindSession                        // 对应 KindSession
)

func HandleKindOf

func HandleKindOf[K HandleKind]() HandleKindCode

HandleKindOf 在编译期类型参数 K 与运行期 HandleKindCode 间建立穷尽映射;接口零值返回 HandleKindInvalid。

func ParseHandleKindCode

func ParseHandleKindCode(raw string) (HandleKindCode, error)

ParseHandleKindCode 严格解析规范小写句柄类别(pty/tunnel/transfer/mux/session)。

func (HandleKindCode) AppendText

func (c HandleKindCode) AppendText(b []byte) ([]byte, error)

func (HandleKindCode) IsValid

func (c HandleKindCode) IsValid() bool

func (HandleKindCode) IsZero

func (c HandleKindCode) IsZero() bool

func (HandleKindCode) MarshalText

func (c HandleKindCode) MarshalText() ([]byte, error)

func (HandleKindCode) String

func (c HandleKindCode) String() string

func (*HandleKindCode) UnmarshalText

func (c *HandleKindCode) UnmarshalText(text []byte) error

type HopDigest

type HopDigest struct {
	// contains filtered or unexported fields
}

HopDigest 表示多跳 Merkle 连接计划中单跳(含全部上游祖先跳板)的不可变 32 字节 SHA-256 摘要; 零值恒无效,Equal 采用常量时间比较,供连接池按跳隔离与共享前缀复用。

func HopDigestFromSHA256

func HopDigestFromSHA256(sum [sha256.Size]byte) HopDigest

HopDigestFromSHA256 将 32 字节 SHA-256 摘要封装为不可变 HopDigest。

func ParseHopDigest

func ParseHopDigest(raw string) (HopDigest, error)

ParseHopDigest 严格解析规范 SHA-256 文本("sha256:<64位小写十六进制>")为 HopDigest。

func (HopDigest) AppendText

func (d HopDigest) AppendText(b []byte) ([]byte, error)

func (HopDigest) Bytes

func (d HopDigest) Bytes() ([sha256.Size]byte, bool)

func (HopDigest) Compare

func (d HopDigest) Compare(other HopDigest) int

Compare 定义 HopDigest 上的确定性全序关系(无效零值排在有效值之前)。

func (HopDigest) Equal

func (d HopDigest) Equal(other HopDigest) bool

Equal 以常量时间比对两个 HopDigest 是否均有效且字节完全一致(无效零值永不相等)。

func (HopDigest) Hex

func (d HopDigest) Hex() string

func (HopDigest) IsValid

func (d HopDigest) IsValid() bool

func (HopDigest) IsZero

func (d HopDigest) IsZero() bool

func (HopDigest) MarshalText

func (d HopDigest) MarshalText() ([]byte, error)

func (HopDigest) SecurityDigest

func (d HopDigest) SecurityDigest() security.Digest

SecurityDigest 将有效 HopDigest 无损投影为 security.Digest;无效零值返回零值 security.Digest。

func (HopDigest) String

func (d HopDigest) String() string

func (*HopDigest) UnmarshalText

func (d *HopDigest) UnmarshalText(text []byte) error

type HopSpec

type HopSpec struct {
	// contains filtered or unexported fields
}

HopSpec 表示多跳 SSH 连接计划中单跳的不可变规范规格(零明文、零反射); 直接内嵌不可变 inventory.AuthMethod 并在构造期派生 authKind 与 authDigest 以杜绝三者漂移, 经 //xops:canonicalhash 由 xopsvet/digestcover 校验 WriteCanonical 100% 全字段覆盖。

func NewHopSpec

func NewHopSpec(in HopSpecInput) (HopSpec, error)

NewHopSpec 校验全部单跳规格字段并在内部由 Auth 派生 AuthKind 与 AuthDigest,构造不可变 HopSpec。

func NewHopSpecFromAuth

func NewHopSpecFromAuth(hopIndex uint32, nodeID string, user option.Username, auth inventory.AuthMethod, policy option.EffectivePolicy) (HopSpec, error)

NewHopSpecFromAuth 直接结合已求解 EffectivePolicy 与封闭 AuthMethod 构造不可变 HopSpec。

func (HopSpec) Auth

func (h HopSpec) Auth() inventory.AuthMethod

func (HopSpec) AuthDigest

func (h HopSpec) AuthDigest() security.Digest

func (HopSpec) AuthKind

func (h HopSpec) AuthKind() inventory.AuthMethodKind

func (HopSpec) Endpoint

func (h HopSpec) Endpoint() netaddr.Endpoint

func (HopSpec) Equal

func (h HopSpec) Equal(o HopSpec) bool

Equal 严格比对两跳规格是否均有效且全部字段完全一致。

func (HopSpec) HopIndex

func (h HopSpec) HopIndex() uint32

func (HopSpec) IsValid

func (h HopSpec) IsValid() bool

func (HopSpec) IsZero

func (h HopSpec) IsZero() bool

func (HopSpec) MarshalJSONTo

func (h HopSpec) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo 实现 HopSpec 的 json/v2 确定性编码。

func (HopSpec) NodeID

func (h HopSpec) NodeID() string

func (HopSpec) Origin

func (h HopSpec) Origin() option.OriginKind

func (HopSpec) OriginalHost

func (h HopSpec) OriginalHost() option.OriginalHostSpec

func (HopSpec) Transport

func (h HopSpec) Transport() TransportPolicySpec

func (*HopSpec) UnmarshalJSONFrom

func (h *HopSpec) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom 实现 HopSpec 的失败关闭 json/v2 解码,强制核验 auth 与派生 auth_kind/auth_digest 一致。

func (HopSpec) Username

func (h HopSpec) Username() option.Username

func (HopSpec) WriteCanonical

func (h HopSpec) WriteCanonical(w io.Writer) error

WriteCanonical 以零反射、长度前缀与域分离方式将 HopSpec 全部字段写入 w(受 digestcover 校验)。

type HopSpecInput

type HopSpecInput struct {
	HopIndex     uint32
	NodeID       string
	Origin       option.OriginKind
	Endpoint     netaddr.Endpoint
	OriginalHost option.OriginalHostSpec
	Username     option.Username
	Auth         inventory.AuthMethod
	Transport    TransportPolicySpec
}

HopSpecInput 是构造不可变 HopSpec 的显式入参规格(仅携带零明文 inventory.AuthMethod,内部派生 AuthKind 与 AuthDigest 防止漂移)。

type KindMux

type KindMux struct {
	// contains filtered or unexported fields
}

KindMux 表示 ControlMaster / ControlPersist 多路复用守护句柄类别。

type KindPTY

type KindPTY struct {
	// contains filtered or unexported fields
}

KindPTY 表示持久交互终端会话句柄类别。

type KindSession

type KindSession struct {
	// contains filtered or unexported fields
}

KindSession 表示通用托管连接会话句柄类别。

type KindTransfer

type KindTransfer struct {
	// contains filtered or unexported fields
}

KindTransfer 表示可恢复文件传输 / SFTP 工作区句柄类别。

type KindTunnel

type KindTunnel struct {
	// contains filtered or unexported fields
}

KindTunnel 表示端口转发 / StreamLocal / TUN 隧道句柄类别。

type ManagedHandle

type ManagedHandle[K HandleKind] struct {
	// contains filtered or unexported fields
}

ManagedHandle 表示按封闭句柄类别 K 参数化的不可变世代槽位句柄(ADR-009): 内置正向门控 valid bool 与单调非零世代 gen >= 1,强绑定 Merkle PlanDigest 与 security.OperationBinding; 零值恒无效并失败关闭,且经 //xops:canonicalhash 校验 WriteCanonical 100% 全字段覆盖。

func NewManagedHandle

func NewManagedHandle[K HandleKind](id HandleID, gen uint64, planDigest PlanDigest, binding security.OperationBinding) (ManagedHandle[K], error)

NewManagedHandle 校验句柄类别 K、HandleID、非零世代 gen>=1、PlanDigest 与 OperationBinding 一致性, 构造不可变 ManagedHandle[K]。遵循 INV-E4,binding 必须显式携带且严格匹配 planDigest。

func (ManagedHandle[K]) AppendText

func (h ManagedHandle[K]) AppendText(b []byte) ([]byte, error)

AppendText 实现 encoding.TextAppender(值接收者),输出紧凑不可伪造句柄令牌;零值失败关闭。

func (ManagedHandle[K]) Binding

func (h ManagedHandle[K]) Binding() security.OperationBinding

func (ManagedHandle[K]) Equal

func (h ManagedHandle[K]) Equal(o ManagedHandle[K]) bool

Equal 严格比对两个同类别 ManagedHandle[K] 是否均有效且全部字段完全一致。

func (ManagedHandle[K]) Generation

func (h ManagedHandle[K]) Generation() uint64

func (ManagedHandle[K]) ID

func (h ManagedHandle[K]) ID() HandleID

func (ManagedHandle[K]) IsValid

func (h ManagedHandle[K]) IsValid() bool

func (ManagedHandle[K]) IsZero

func (h ManagedHandle[K]) IsZero() bool

func (ManagedHandle[K]) Kind

func (h ManagedHandle[K]) Kind() HandleKindCode

func (ManagedHandle[K]) MarshalJSONTo

func (h ManagedHandle[K]) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo 实现 ManagedHandle[K] 的 Go 1.27 encoding/json/v2 完整确定性编码;零值失败关闭。

func (ManagedHandle[K]) MarshalText

func (h ManagedHandle[K]) MarshalText() ([]byte, error)

MarshalText 实现 encoding.TextMarshaler(值接收者)。

func (ManagedHandle[K]) MatchesGeneration

func (h ManagedHandle[K]) MatchesGeneration(gen uint64) bool

MatchesGeneration 判断句柄是否有效且处于预期世代 gen。

func (ManagedHandle[K]) MatchesPlan

func (h ManagedHandle[K]) MatchesPlan(pd PlanDigest) bool

MatchesPlan 判断句柄是否有效且绑定至预期 PlanDigest。

func (ManagedHandle[K]) PlanDigest

func (h ManagedHandle[K]) PlanDigest() PlanDigest

func (ManagedHandle[K]) String

func (h ManagedHandle[K]) String() string

String 返回紧凑句柄标识文本 "<kind>:<id>:g<gen>:<plan_digest>";无效零值返回空串。

func (*ManagedHandle[K]) UnmarshalJSONFrom

func (h *ManagedHandle[K]) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom 实现 ManagedHandle[K] 的失败关闭解码,强制校验 kind == HandleKindOf[K]() 杜绝跨类别混淆。

func (ManagedHandle[K]) WriteCanonical

func (h ManagedHandle[K]) WriteCanonical(w io.Writer) error

WriteCanonical 以零反射、长度前缀与域分离方式将 ManagedHandle[K] 全字段写入 w(受 digestcover 校验)。

type PlanDigest

type PlanDigest struct {
	// contains filtered or unexported fields
}

PlanDigest 表示整条不可变 SealedConnectionPlan 的顶层 32 字节 Merkle SHA-256 摘要; 零值恒无效,Equal 采用常量时间比较,并可无损投影至 security.OperationBinding.PlanDigest。

func ParsePlanDigest

func ParsePlanDigest(raw string) (PlanDigest, error)

ParsePlanDigest 严格解析规范 SHA-256 文本("sha256:<64位小写十六进制>")为 PlanDigest。

func PlanDigestFromSHA256

func PlanDigestFromSHA256(sum [sha256.Size]byte) PlanDigest

PlanDigestFromSHA256 将 32 字节 SHA-256 摘要封装为不可变 PlanDigest。

func (PlanDigest) AppendText

func (d PlanDigest) AppendText(b []byte) ([]byte, error)

func (PlanDigest) Bytes

func (d PlanDigest) Bytes() ([sha256.Size]byte, bool)

func (PlanDigest) Compare

func (d PlanDigest) Compare(other PlanDigest) int

Compare 定义 PlanDigest 上的确定性全序关系(无效零值排在有效值之前)。

func (PlanDigest) Equal

func (d PlanDigest) Equal(other PlanDigest) bool

Equal 以常量时间比对两个 PlanDigest 是否均有效且字节完全一致(无效零值永不相等)。

func (PlanDigest) Hex

func (d PlanDigest) Hex() string

func (PlanDigest) IsValid

func (d PlanDigest) IsValid() bool

func (PlanDigest) IsZero

func (d PlanDigest) IsZero() bool

func (PlanDigest) MarshalText

func (d PlanDigest) MarshalText() ([]byte, error)

func (PlanDigest) SecurityDigest

func (d PlanDigest) SecurityDigest() security.Digest

SecurityDigest 将有效 PlanDigest 无损投影为 security.Digest;无效零值返回零值 security.Digest。

func (PlanDigest) String

func (d PlanDigest) String() string

func (*PlanDigest) UnmarshalText

func (d *PlanDigest) UnmarshalText(text []byte) error

type SealedConnectionPlan

type SealedConnectionPlan struct {
	// contains filtered or unexported fields
}

SealedConnectionPlan 表示不可变的多跳 Merkle 链式 SSH 连接计划(INV-C1 / ADR-009):

  • HopDigest[0] = SHA256(merkleHopDomainTag || 0 || HopSpec[0].WriteCanonical)
  • HopDigest[i] = SHA256(merkleHopDomainTag || HopDigest[i-1] || HopSpec[i].WriteCanonical)
  • PlanDigest = SHA256(sealedPlanDomainTag || len(hops) || HopDigest[n-1])

任意上游跳板的任一字段变更均必然级联刷新所有下游 HopDigest 与 PlanDigest,而共享完全相同上游前缀的 两条计划则天然共享相同前缀 HopDigest;经 //xops:canonicalhash 校验 WriteCanonical 100% 全字段覆盖。

func NewSealedConnectionPlan

func NewSealedConnectionPlan(hops algebraic.NonEmpty[HopSpec]) (SealedConnectionPlan, error)

NewSealedConnectionPlan 校验全部跳板规格及其连续索引 [0..n-1],计算 Merkle 跳板摘要链与顶层 PlanDigest。

func SealConnectionPlan

func SealConnectionPlan(hops ...HopSpec) (SealedConnectionPlan, error)

SealConnectionPlan 便捷封装可变长跳板序列并构造 Merkle 链式 SealedConnectionPlan。

func (SealedConnectionPlan) CanonicalJSON

func (p SealedConnectionPlan) CanonicalJSON() ([]byte, error)

CanonicalJSON 使用 Go 1.27 encoding/json/v2 Deterministic(true) 编码确定性 JSON。

func (SealedConnectionPlan) Equal

Equal 严格比对两份 SealedConnectionPlan 是否均有效、摘要匹配且全部跳板规格一致。

func (SealedConnectionPlan) HopAt

func (p SealedConnectionPlan) HopAt(index int) (HopSpec, bool)

HopAt 返回第 index 跳的不可变 HopSpec;越界或计划无效返回 (零值, false)。

func (SealedConnectionPlan) HopDigestAt

func (p SealedConnectionPlan) HopDigestAt(index int) (HopDigest, bool)

HopDigestAt 返回第 index 跳的 Merkle HopDigest;越界或计划无效返回 (零值, false)。

func (SealedConnectionPlan) HopDigests

func (p SealedConnectionPlan) HopDigests() []HopDigest

func (SealedConnectionPlan) HopSlice

func (p SealedConnectionPlan) HopSlice() []HopSpec

func (SealedConnectionPlan) Hops

func (SealedConnectionPlan) IsValid

func (p SealedConnectionPlan) IsValid() bool

func (SealedConnectionPlan) IsZero

func (p SealedConnectionPlan) IsZero() bool

func (SealedConnectionPlan) Len

func (p SealedConnectionPlan) Len() int

func (SealedConnectionPlan) MarshalJSONTo

func (p SealedConnectionPlan) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo 实现 SealedConnectionPlan 的 json/v2 确定性编码。

func (SealedConnectionPlan) PlanDigest

func (p SealedConnectionPlan) PlanDigest() PlanDigest

func (SealedConnectionPlan) Prefix

Prefix 返回前 count 跳(1 <= count <= Len())对应的子连接计划,严格保持前缀每跳 HopDigest 完全一致, 供连接池多跳拨号逐级缓存并安全复用公共堡垒机前缀。

func (SealedConnectionPlan) Target

func (p SealedConnectionPlan) Target() (HopSpec, bool)

Target 返回计划末跳(最终目标主机)规格;无效零值返回 (零值, false)。

func (*SealedConnectionPlan) UnmarshalJSONFrom

func (p *SealedConnectionPlan) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom 实现 SealedConnectionPlan 的防篡改 json/v2 解码: 必须完整携带 hop_digests 与 plan_digest 且与依据 hops 重算的 Merkle 链严格一致,缺失/null/篡改一律失败关闭。

func (SealedConnectionPlan) WriteCanonical

func (p SealedConnectionPlan) WriteCanonical(w io.Writer) error

WriteCanonical 以零反射、长度前缀与域分离方式将 SealedConnectionPlan 全字段写入 w(受 digestcover 校验)。

type TransportPolicySpec

type TransportPolicySpec struct {
	// contains filtered or unexported fields
}

TransportPolicySpec 是从 option.EffectivePolicy 完整提取的不可变连接传输与安全策略投影; 100% 覆盖算法协商、主机密钥信任、身份/证书路径、多路复用、代理与会话选项, 并经 //xops:canonicalhash 由 xopsvet/digestcover 在编译期静态验证 WriteCanonical 全字段覆盖。

func TransportPolicyFromEffective

func TransportPolicyFromEffective(ep option.EffectivePolicy) (TransportPolicySpec, error)

TransportPolicyFromEffective 从已求解的有效策略提取不可变 TransportPolicySpec。

func (TransportPolicySpec) BatchMode

func (t TransportPolicySpec) BatchMode() bool

func (TransportPolicySpec) CertificateFiles

func (t TransportPolicySpec) CertificateFiles() option.PathList

func (TransportPolicySpec) Ciphers

func (t TransportPolicySpec) Ciphers() []string

func (TransportPolicySpec) ConnectTimeout

func (TransportPolicySpec) ControlPolicy

func (t TransportPolicySpec) ControlPolicy() option.ControlPolicy

func (TransportPolicySpec) Equal

Equal 严格比对两份 TransportPolicySpec 是否均有效且全部字段完全一致。

func (TransportPolicySpec) ForwardAgent

func (t TransportPolicySpec) ForwardAgent() bool

func (TransportPolicySpec) HostKeyAlgos

func (t TransportPolicySpec) HostKeyAlgos() []string

func (TransportPolicySpec) IdentitiesOnly

func (t TransportPolicySpec) IdentitiesOnly() bool

func (TransportPolicySpec) IdentityFiles

func (t TransportPolicySpec) IdentityFiles() option.PathList

func (TransportPolicySpec) IsValid

func (t TransportPolicySpec) IsValid() bool

func (TransportPolicySpec) IsZero

func (t TransportPolicySpec) IsZero() bool

func (TransportPolicySpec) KexAlgorithms

func (t TransportPolicySpec) KexAlgorithms() []string

func (TransportPolicySpec) LocalCommand

func (TransportPolicySpec) MACs

func (t TransportPolicySpec) MACs() []string

func (TransportPolicySpec) MarshalJSONTo

func (t TransportPolicySpec) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo 实现 TransportPolicySpec 的 json/v2 确定性编码。

func (TransportPolicySpec) PermitLocalCommand

func (t TransportPolicySpec) PermitLocalCommand() bool

func (TransportPolicySpec) ProxyRoute

func (t TransportPolicySpec) ProxyRoute() option.ProxyRoute

func (TransportPolicySpec) SendEnv

func (t TransportPolicySpec) SendEnv() option.EnvFilter

func (TransportPolicySpec) ServerAliveCountMax

func (t TransportPolicySpec) ServerAliveCountMax() uint32

func (TransportPolicySpec) ServerAliveInterval

func (t TransportPolicySpec) ServerAliveInterval() algebraic.Duration

func (TransportPolicySpec) StrictHostKeyChecking

func (t TransportPolicySpec) StrictHostKeyChecking() option.StrictHostKeyCheckingMode

func (*TransportPolicySpec) UnmarshalJSONFrom

func (t *TransportPolicySpec) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom 实现 TransportPolicySpec 的失败关闭 json/v2 解码。

func (TransportPolicySpec) UserKnownHostsFiles

func (t TransportPolicySpec) UserKnownHostsFiles() option.KnownHostsList

func (TransportPolicySpec) WriteCanonical

func (t TransportPolicySpec) WriteCanonical(w io.Writer) error

WriteCanonical 以零反射、长度前缀与域分离方式写入 TransportPolicySpec 全字段(受 digestcover 校验)。

Jump to

Keyboard shortcuts

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