Files
EasyTier/easytier-go/proto/web/web.pb.go
T
Luna YaoandClaude Code 250c2ad8d6 refactor(config): preserve explicit flags with FlagsPatch and derive CLI arguments from schema (#2585)
This PR refactors EasyTier's configuration flags system across protobuf definitions, TOML/API persistence, runtime reconciliation, and the CLI.

It introduces a synthesized FlagsPatch protobuf message with optionize and pbjson support to track field presence reliably, replaces manual CLI flag boilerplate with dynamic schema-driven clap argument generation, and
establishes Flags::resolve(patch) as the single source of truth for runtime defaults.

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-10-10 22:11:08 +08:00

441 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.36.1
// source: web.proto
package web
import (
common "github.com/easytier/easytier/easytier-go/proto/common"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DeviceOsInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
OsType string `protobuf:"bytes,1,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Distribution string `protobuf:"bytes,3,opt,name=distribution,proto3" json:"distribution,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceOsInfo) Reset() {
*x = DeviceOsInfo{}
mi := &file_web_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceOsInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceOsInfo) ProtoMessage() {}
func (x *DeviceOsInfo) ProtoReflect() protoreflect.Message {
mi := &file_web_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceOsInfo.ProtoReflect.Descriptor instead.
func (*DeviceOsInfo) Descriptor() ([]byte, []int) {
return file_web_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceOsInfo) GetOsType() string {
if x != nil {
return x.OsType
}
return ""
}
func (x *DeviceOsInfo) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *DeviceOsInfo) GetDistribution() string {
if x != nil {
return x.Distribution
}
return ""
}
type HeartbeatRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
MachineId *common.UUID `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
InstId *common.UUID `protobuf:"bytes,2,opt,name=inst_id,json=instId,proto3" json:"inst_id,omitempty"`
UserToken string `protobuf:"bytes,3,opt,name=user_token,json=userToken,proto3" json:"user_token,omitempty"`
EasytierVersion string `protobuf:"bytes,4,opt,name=easytier_version,json=easytierVersion,proto3" json:"easytier_version,omitempty"`
ReportTime string `protobuf:"bytes,5,opt,name=report_time,json=reportTime,proto3" json:"report_time,omitempty"`
Hostname string `protobuf:"bytes,6,opt,name=hostname,proto3" json:"hostname,omitempty"`
RunningNetworkInstances []*common.UUID `protobuf:"bytes,7,rep,name=running_network_instances,json=runningNetworkInstances,proto3" json:"running_network_instances,omitempty"`
DeviceOs *DeviceOsInfo `protobuf:"bytes,8,opt,name=device_os,json=deviceOs,proto3" json:"device_os,omitempty"`
SupportConfigSource bool `protobuf:"varint,9,opt,name=support_config_source,json=supportConfigSource,proto3" json:"support_config_source,omitempty"`
FailedNetworkInstances []*common.UUID `protobuf:"bytes,10,rep,name=failed_network_instances,json=failedNetworkInstances,proto3" json:"failed_network_instances,omitempty"`
SupportHeartbeatPolicy bool `protobuf:"varint,11,opt,name=support_heartbeat_policy,json=supportHeartbeatPolicy,proto3" json:"support_heartbeat_policy,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HeartbeatRequest) Reset() {
*x = HeartbeatRequest{}
mi := &file_web_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HeartbeatRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeartbeatRequest) ProtoMessage() {}
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message {
mi := &file_web_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.
func (*HeartbeatRequest) Descriptor() ([]byte, []int) {
return file_web_proto_rawDescGZIP(), []int{1}
}
func (x *HeartbeatRequest) GetMachineId() *common.UUID {
if x != nil {
return x.MachineId
}
return nil
}
func (x *HeartbeatRequest) GetInstId() *common.UUID {
if x != nil {
return x.InstId
}
return nil
}
func (x *HeartbeatRequest) GetUserToken() string {
if x != nil {
return x.UserToken
}
return ""
}
func (x *HeartbeatRequest) GetEasytierVersion() string {
if x != nil {
return x.EasytierVersion
}
return ""
}
func (x *HeartbeatRequest) GetReportTime() string {
if x != nil {
return x.ReportTime
}
return ""
}
func (x *HeartbeatRequest) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *HeartbeatRequest) GetRunningNetworkInstances() []*common.UUID {
if x != nil {
return x.RunningNetworkInstances
}
return nil
}
func (x *HeartbeatRequest) GetDeviceOs() *DeviceOsInfo {
if x != nil {
return x.DeviceOs
}
return nil
}
func (x *HeartbeatRequest) GetSupportConfigSource() bool {
if x != nil {
return x.SupportConfigSource
}
return false
}
func (x *HeartbeatRequest) GetFailedNetworkInstances() []*common.UUID {
if x != nil {
return x.FailedNetworkInstances
}
return nil
}
func (x *HeartbeatRequest) GetSupportHeartbeatPolicy() bool {
if x != nil {
return x.SupportHeartbeatPolicy
}
return false
}
type HeartbeatResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
HeartbeatIntervalMs *uint32 `protobuf:"varint,1,opt,name=heartbeat_interval_ms,json=heartbeatIntervalMs,proto3,oneof" json:"heartbeat_interval_ms,omitempty"`
HeartbeatTimeoutMs *uint32 `protobuf:"varint,2,opt,name=heartbeat_timeout_ms,json=heartbeatTimeoutMs,proto3,oneof" json:"heartbeat_timeout_ms,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HeartbeatResponse) Reset() {
*x = HeartbeatResponse{}
mi := &file_web_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HeartbeatResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeartbeatResponse) ProtoMessage() {}
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message {
mi := &file_web_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
return file_web_proto_rawDescGZIP(), []int{2}
}
func (x *HeartbeatResponse) GetHeartbeatIntervalMs() uint32 {
if x != nil && x.HeartbeatIntervalMs != nil {
return *x.HeartbeatIntervalMs
}
return 0
}
func (x *HeartbeatResponse) GetHeartbeatTimeoutMs() uint32 {
if x != nil && x.HeartbeatTimeoutMs != nil {
return *x.HeartbeatTimeoutMs
}
return 0
}
type GetFeatureRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetFeatureRequest) Reset() {
*x = GetFeatureRequest{}
mi := &file_web_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetFeatureRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFeatureRequest) ProtoMessage() {}
func (x *GetFeatureRequest) ProtoReflect() protoreflect.Message {
mi := &file_web_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFeatureRequest.ProtoReflect.Descriptor instead.
func (*GetFeatureRequest) Descriptor() ([]byte, []int) {
return file_web_proto_rawDescGZIP(), []int{3}
}
type GetFeatureResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
SupportEncryption bool `protobuf:"varint,1,opt,name=support_encryption,json=supportEncryption,proto3" json:"support_encryption,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetFeatureResponse) Reset() {
*x = GetFeatureResponse{}
mi := &file_web_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetFeatureResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFeatureResponse) ProtoMessage() {}
func (x *GetFeatureResponse) ProtoReflect() protoreflect.Message {
mi := &file_web_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFeatureResponse.ProtoReflect.Descriptor instead.
func (*GetFeatureResponse) Descriptor() ([]byte, []int) {
return file_web_proto_rawDescGZIP(), []int{4}
}
func (x *GetFeatureResponse) GetSupportEncryption() bool {
if x != nil {
return x.SupportEncryption
}
return false
}
var File_web_proto protoreflect.FileDescriptor
const file_web_proto_rawDesc = "" +
"\n" +
"\tweb.proto\x12\x03web\x1a\fcommon.proto\"e\n" +
"\fDeviceOsInfo\x12\x17\n" +
"\aos_type\x18\x01 \x01(\tR\x06osType\x12\x18\n" +
"\aversion\x18\x02 \x01(\tR\aversion\x12\"\n" +
"\fdistribution\x18\x03 \x01(\tR\fdistribution\"\x9d\x04\n" +
"\x10HeartbeatRequest\x12+\n" +
"\n" +
"machine_id\x18\x01 \x01(\v2\f.common.UUIDR\tmachineId\x12%\n" +
"\ainst_id\x18\x02 \x01(\v2\f.common.UUIDR\x06instId\x12\x1d\n" +
"\n" +
"user_token\x18\x03 \x01(\tR\tuserToken\x12)\n" +
"\x10easytier_version\x18\x04 \x01(\tR\x0feasytierVersion\x12\x1f\n" +
"\vreport_time\x18\x05 \x01(\tR\n" +
"reportTime\x12\x1a\n" +
"\bhostname\x18\x06 \x01(\tR\bhostname\x12H\n" +
"\x19running_network_instances\x18\a \x03(\v2\f.common.UUIDR\x17runningNetworkInstances\x12.\n" +
"\tdevice_os\x18\b \x01(\v2\x11.web.DeviceOsInfoR\bdeviceOs\x122\n" +
"\x15support_config_source\x18\t \x01(\bR\x13supportConfigSource\x12F\n" +
"\x18failed_network_instances\x18\n" +
" \x03(\v2\f.common.UUIDR\x16failedNetworkInstances\x128\n" +
"\x18support_heartbeat_policy\x18\v \x01(\bR\x16supportHeartbeatPolicy\"\xb6\x01\n" +
"\x11HeartbeatResponse\x127\n" +
"\x15heartbeat_interval_ms\x18\x01 \x01(\rH\x00R\x13heartbeatIntervalMs\x88\x01\x01\x125\n" +
"\x14heartbeat_timeout_ms\x18\x02 \x01(\rH\x01R\x12heartbeatTimeoutMs\x88\x01\x01B\x18\n" +
"\x16_heartbeat_interval_msB\x17\n" +
"\x15_heartbeat_timeout_ms\"\x13\n" +
"\x11GetFeatureRequest\"C\n" +
"\x12GetFeatureResponse\x12-\n" +
"\x12support_encryption\x18\x01 \x01(\bR\x11supportEncryption2\x8d\x01\n" +
"\x10WebServerService\x12:\n" +
"\tHeartbeat\x12\x15.web.HeartbeatRequest\x1a\x16.web.HeartbeatResponse\x12=\n" +
"\n" +
"GetFeature\x12\x16.web.GetFeatureRequest\x1a\x17.web.GetFeatureResponseb\x06proto3"
var (
file_web_proto_rawDescOnce sync.Once
file_web_proto_rawDescData []byte
)
func file_web_proto_rawDescGZIP() []byte {
file_web_proto_rawDescOnce.Do(func() {
file_web_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_web_proto_rawDesc), len(file_web_proto_rawDesc)))
})
return file_web_proto_rawDescData
}
var file_web_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_web_proto_goTypes = []any{
(*DeviceOsInfo)(nil), // 0: web.DeviceOsInfo
(*HeartbeatRequest)(nil), // 1: web.HeartbeatRequest
(*HeartbeatResponse)(nil), // 2: web.HeartbeatResponse
(*GetFeatureRequest)(nil), // 3: web.GetFeatureRequest
(*GetFeatureResponse)(nil), // 4: web.GetFeatureResponse
(*common.UUID)(nil), // 5: common.UUID
}
var file_web_proto_depIdxs = []int32{
5, // 0: web.HeartbeatRequest.machine_id:type_name -> common.UUID
5, // 1: web.HeartbeatRequest.inst_id:type_name -> common.UUID
5, // 2: web.HeartbeatRequest.running_network_instances:type_name -> common.UUID
0, // 3: web.HeartbeatRequest.device_os:type_name -> web.DeviceOsInfo
5, // 4: web.HeartbeatRequest.failed_network_instances:type_name -> common.UUID
1, // 5: web.WebServerService.Heartbeat:input_type -> web.HeartbeatRequest
3, // 6: web.WebServerService.GetFeature:input_type -> web.GetFeatureRequest
2, // 7: web.WebServerService.Heartbeat:output_type -> web.HeartbeatResponse
4, // 8: web.WebServerService.GetFeature:output_type -> web.GetFeatureResponse
7, // [7:9] is the sub-list for method output_type
5, // [5:7] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_web_proto_init() }
func file_web_proto_init() {
if File_web_proto != nil {
return
}
file_web_proto_msgTypes[2].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_web_proto_rawDesc), len(file_web_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_web_proto_goTypes,
DependencyIndexes: file_web_proto_depIdxs,
MessageInfos: file_web_proto_msgTypes,
}.Build()
File_web_proto = out.File
file_web_proto_goTypes = nil
file_web_proto_depIdxs = nil
}