Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
0a43ceaa
提交
0a43ceaa
authored
8月 17, 2014
作者:
Jeromy
提交者:
Juan Batiz-Benet
8月 20, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add in message wrapper protobuf code
上级
f1d232ac
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
89 行增加
和
0 行删除
+89
-0
mes_wrapper.pb.go
swarm/mes_wrapper.pb.go
+79
-0
mes_wrapper.proto
swarm/mes_wrapper.proto
+10
-0
没有找到文件。
swarm/mes_wrapper.pb.go
0 → 100644
浏览文件 @
0a43ceaa
// Code generated by protoc-gen-go.
// source: mes_wrapper.proto
// DO NOT EDIT!
/*
Package swarm is a generated protocol buffer package.
It is generated from these files:
mes_wrapper.proto
It has these top-level messages:
PBWrapper
*/
package
swarm
import
proto
"code.google.com/p/goprotobuf/proto"
import
math
"math"
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
_
=
math
.
Inf
type
PBWrapper_MessageType
int32
const
(
PBWrapper_DHT_MESSAGE
PBWrapper_MessageType
=
0
)
var
PBWrapper_MessageType_name
=
map
[
int32
]
string
{
0
:
"DHT_MESSAGE"
,
}
var
PBWrapper_MessageType_value
=
map
[
string
]
int32
{
"DHT_MESSAGE"
:
0
,
}
func
(
x
PBWrapper_MessageType
)
Enum
()
*
PBWrapper_MessageType
{
p
:=
new
(
PBWrapper_MessageType
)
*
p
=
x
return
p
}
func
(
x
PBWrapper_MessageType
)
String
()
string
{
return
proto
.
EnumName
(
PBWrapper_MessageType_name
,
int32
(
x
))
}
func
(
x
*
PBWrapper_MessageType
)
UnmarshalJSON
(
data
[]
byte
)
error
{
value
,
err
:=
proto
.
UnmarshalJSONEnum
(
PBWrapper_MessageType_value
,
data
,
"PBWrapper_MessageType"
)
if
err
!=
nil
{
return
err
}
*
x
=
PBWrapper_MessageType
(
value
)
return
nil
}
type
PBWrapper
struct
{
Type
*
PBWrapper_MessageType
`protobuf:"varint,1,req,enum=swarm.PBWrapper_MessageType" json:"Type,omitempty"`
Message
[]
byte
`protobuf:"bytes,2,req" json:"Message,omitempty"`
XXX_unrecognized
[]
byte
`json:"-"`
}
func
(
m
*
PBWrapper
)
Reset
()
{
*
m
=
PBWrapper
{}
}
func
(
m
*
PBWrapper
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PBWrapper
)
ProtoMessage
()
{}
func
(
m
*
PBWrapper
)
GetType
()
PBWrapper_MessageType
{
if
m
!=
nil
&&
m
.
Type
!=
nil
{
return
*
m
.
Type
}
return
PBWrapper_DHT_MESSAGE
}
func
(
m
*
PBWrapper
)
GetMessage
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Message
}
return
nil
}
func
init
()
{
proto
.
RegisterEnum
(
"swarm.PBWrapper_MessageType"
,
PBWrapper_MessageType_name
,
PBWrapper_MessageType_value
)
}
swarm/mes_wrapper.proto
0 → 100644
浏览文件 @
0a43ceaa
package
swarm
;
message
PBWrapper
{
enum
MessageType
{
DHT_MESSAGE
=
0
;
}
required
MessageType
Type
=
1
;
required
bytes
Message
=
2
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论