diff --git a/alibabacloud-gateway-sls/util/Teafile b/alibabacloud-gateway-sls/util/Teafile index bd4f2223..ec1bfbeb 100644 --- a/alibabacloud-gateway-sls/util/Teafile +++ b/alibabacloud-gateway-sls/util/Teafile @@ -14,7 +14,7 @@ }, "releases": { "ts": "@alicloud/gateway-sls-util:^0.3.0", - "go": "github.com/alibabacloud-go/alibabacloud-gateway-sls-util/client:v0.3.0", + "go": "github.com/alibabacloud-go/alibabacloud-gateway-sls-util/client:v0.4.0", "java": "com.aliyun:alibabacloud-gateway-sls-util:0.4.0", "python": "alibabacloud_gateway_sls_util:0.4.0", "python2": "alibabacloud_gateway_sls_util_py2:0.0.1", diff --git a/alibabacloud-gateway-sls/util/golang/client/client.go b/alibabacloud-gateway-sls/util/golang/client/client.go index 7fada8e5..722bb523 100644 --- a/alibabacloud-gateway-sls/util/golang/client/client.go +++ b/alibabacloud-gateway-sls/util/golang/client/client.go @@ -81,3 +81,7 @@ func IsDecompressorAvailable(compressType *string) (_result *bool) { func BytesLength(src []byte) (_result *int64) { return tea.Int64(int64(len(src))) } + +func SerializeLogGroupToPB(logGroup interface{}) (_result []byte, _err error) { + return serializeLogGroupToPB(logGroup) +} diff --git a/alibabacloud-gateway-sls/util/golang/client/log.pb.go b/alibabacloud-gateway-sls/util/golang/client/log.pb.go new file mode 100644 index 00000000..b49e6eda --- /dev/null +++ b/alibabacloud-gateway-sls/util/golang/client/log.pb.go @@ -0,0 +1,1997 @@ +package client + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: log.proto + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" + proto "github.com/golang/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type LogContent struct { + Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` + _key string + _value string + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogContent) Reset() { *m = LogContent{} } +func (m *LogContent) String() string { return proto.CompactTextString(m) } +func (*LogContent) ProtoMessage() {} +func (*LogContent) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{0} +} +func (m *LogContent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogContent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogContent.Merge(m, src) +} +func (m *LogContent) XXX_Size() int { + return m.Size() +} +func (m *LogContent) XXX_DiscardUnknown() { + xxx_messageInfo_LogContent.DiscardUnknown(m) +} + +var xxx_messageInfo_LogContent proto.InternalMessageInfo + +func (m *LogContent) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *LogContent) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type Log struct { + Time *uint32 `protobuf:"varint,1,req,name=Time" json:"Time,omitempty"` + Contents []*LogContent `protobuf:"bytes,2,rep,name=Contents" json:"Contents,omitempty"` + TimeNs *uint32 `protobuf:"fixed32,4,opt,name=TimeNs" json:"TimeNs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{1} +} +func (m *Log) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Log.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return m.Size() +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) +} + +var xxx_messageInfo_Log proto.InternalMessageInfo + +func (m *Log) GetTime() uint32 { + if m != nil && m.Time != nil { + return *m.Time + } + return 0 +} + +func (m *Log) GetContents() []*LogContent { + if m != nil { + return m.Contents + } + return nil +} + +func (m *Log) GetTimeNs() uint32 { + if m != nil && m.TimeNs != nil { + return *m.TimeNs + } + return 0 +} + +type LogTag struct { + Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` + _key string + _value string + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogTag) Reset() { *m = LogTag{} } +func (m *LogTag) String() string { return proto.CompactTextString(m) } +func (*LogTag) ProtoMessage() {} +func (*LogTag) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{2} +} +func (m *LogTag) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogTag.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogTag) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogTag.Merge(m, src) +} +func (m *LogTag) XXX_Size() int { + return m.Size() +} +func (m *LogTag) XXX_DiscardUnknown() { + xxx_messageInfo_LogTag.DiscardUnknown(m) +} + +var xxx_messageInfo_LogTag proto.InternalMessageInfo + +func (m *LogTag) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *LogTag) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type LogGroup struct { + Logs []*Log `protobuf:"bytes,1,rep,name=Logs" json:"Logs,omitempty"` + Category *string `protobuf:"bytes,2,opt,name=Category" json:"Category,omitempty"` + Topic *string `protobuf:"bytes,3,opt,name=Topic" json:"Topic,omitempty"` + Source *string `protobuf:"bytes,4,opt,name=Source" json:"Source,omitempty"` + MachineUUID *string `protobuf:"bytes,5,opt,name=MachineUUID" json:"MachineUUID,omitempty"` + LogTags []*LogTag `protobuf:"bytes,6,rep,name=LogTags" json:"LogTags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogGroup) Reset() { *m = LogGroup{} } +func (m *LogGroup) String() string { return proto.CompactTextString(m) } +func (*LogGroup) ProtoMessage() {} +func (*LogGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{3} +} +func (m *LogGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogGroup.Merge(m, src) +} +func (m *LogGroup) XXX_Size() int { + return m.Size() +} +func (m *LogGroup) XXX_DiscardUnknown() { + xxx_messageInfo_LogGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_LogGroup proto.InternalMessageInfo + +func (m *LogGroup) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +func (m *LogGroup) GetCategory() string { + if m != nil && m.Category != nil { + return *m.Category + } + return "" +} + +func (m *LogGroup) GetTopic() string { + if m != nil && m.Topic != nil { + return *m.Topic + } + return "" +} + +func (m *LogGroup) GetSource() string { + if m != nil && m.Source != nil { + return *m.Source + } + return "" +} + +func (m *LogGroup) GetMachineUUID() string { + if m != nil && m.MachineUUID != nil { + return *m.MachineUUID + } + return "" +} + +func (m *LogGroup) GetLogTags() []*LogTag { + if m != nil { + return m.LogTags + } + return nil +} + +type SlsLogPackage struct { + Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` + UncompressSize *int32 `protobuf:"varint,2,opt,name=uncompress_size,json=uncompressSize" json:"uncompress_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SlsLogPackage) Reset() { *m = SlsLogPackage{} } +func (m *SlsLogPackage) String() string { return proto.CompactTextString(m) } +func (*SlsLogPackage) ProtoMessage() {} +func (*SlsLogPackage) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{4} +} +func (m *SlsLogPackage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SlsLogPackage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SlsLogPackage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SlsLogPackage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SlsLogPackage.Merge(m, src) +} +func (m *SlsLogPackage) XXX_Size() int { + return m.Size() +} +func (m *SlsLogPackage) XXX_DiscardUnknown() { + xxx_messageInfo_SlsLogPackage.DiscardUnknown(m) +} + +var xxx_messageInfo_SlsLogPackage proto.InternalMessageInfo + +func (m *SlsLogPackage) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *SlsLogPackage) GetUncompressSize() int32 { + if m != nil && m.UncompressSize != nil { + return *m.UncompressSize + } + return 0 +} + +type SlsLogPackageList struct { + Packages []*SlsLogPackage `protobuf:"bytes,1,rep,name=packages" json:"packages,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SlsLogPackageList) Reset() { *m = SlsLogPackageList{} } +func (m *SlsLogPackageList) String() string { return proto.CompactTextString(m) } +func (*SlsLogPackageList) ProtoMessage() {} +func (*SlsLogPackageList) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{5} +} +func (m *SlsLogPackageList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SlsLogPackageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SlsLogPackageList.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SlsLogPackageList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SlsLogPackageList.Merge(m, src) +} +func (m *SlsLogPackageList) XXX_Size() int { + return m.Size() +} +func (m *SlsLogPackageList) XXX_DiscardUnknown() { + xxx_messageInfo_SlsLogPackageList.DiscardUnknown(m) +} + +var xxx_messageInfo_SlsLogPackageList proto.InternalMessageInfo + +func (m *SlsLogPackageList) GetPackages() []*SlsLogPackage { + if m != nil { + return m.Packages + } + return nil +} + +type LogGroupList struct { + LogGroups []*LogGroup `protobuf:"bytes,1,rep,name=LogGroups" json:"LogGroups,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogGroupList) Reset() { *m = LogGroupList{} } +func (m *LogGroupList) String() string { return proto.CompactTextString(m) } +func (*LogGroupList) ProtoMessage() {} +func (*LogGroupList) Descriptor() ([]byte, []int) { + return fileDescriptor_a153da538f858886, []int{6} +} +func (m *LogGroupList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogGroupList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogGroupList.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogGroupList) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogGroupList.Merge(m, src) +} +func (m *LogGroupList) XXX_Size() int { + return m.Size() +} +func (m *LogGroupList) XXX_DiscardUnknown() { + xxx_messageInfo_LogGroupList.DiscardUnknown(m) +} + +var xxx_messageInfo_LogGroupList proto.InternalMessageInfo + +func (m *LogGroupList) GetLogGroups() []*LogGroup { + if m != nil { + return m.LogGroups + } + return nil +} + +func init() { + proto.RegisterType((*LogContent)(nil), "sls.LogContent") + proto.RegisterType((*Log)(nil), "sls.Log") + proto.RegisterType((*LogTag)(nil), "sls.LogTag") + proto.RegisterType((*LogGroup)(nil), "sls.LogGroup") + proto.RegisterType((*SlsLogPackage)(nil), "sls.SlsLogPackage") + proto.RegisterType((*SlsLogPackageList)(nil), "sls.SlsLogPackageList") + proto.RegisterType((*LogGroupList)(nil), "sls.LogGroupList") +} + +func init() { proto.RegisterFile("log.proto", fileDescriptor_a153da538f858886) } + +var fileDescriptor_a153da538f858886 = []byte{ + // 412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xdf, 0x8a, 0xd3, 0x40, + 0x14, 0xc6, 0x9d, 0xa6, 0xed, 0x26, 0xa7, 0x5b, 0x77, 0x1d, 0x44, 0x86, 0x45, 0x4a, 0x08, 0x88, + 0x85, 0xc5, 0xac, 0x88, 0x77, 0xde, 0x59, 0x41, 0xc4, 0x51, 0x64, 0xda, 0xf5, 0x52, 0x99, 0x8d, + 0xe3, 0x6c, 0x30, 0xcd, 0x09, 0x99, 0xe4, 0x62, 0xf7, 0x49, 0x7c, 0x17, 0x5f, 0xc0, 0x4b, 0x1f, + 0x41, 0xea, 0x8b, 0x48, 0x4e, 0x3a, 0xad, 0xbd, 0xf3, 0xee, 0xfc, 0xce, 0x77, 0xfe, 0x7c, 0xe7, + 0x40, 0x54, 0xa0, 0x4d, 0xab, 0x1a, 0x1b, 0xe4, 0x81, 0x2b, 0xdc, 0xd9, 0x13, 0x9b, 0x37, 0xd7, + 0xed, 0x55, 0x9a, 0xe1, 0xfa, 0xc2, 0xa2, 0xc5, 0x0b, 0xd2, 0xae, 0xda, 0xaf, 0x44, 0x04, 0x14, + 0xf5, 0x3d, 0xc9, 0x73, 0x00, 0x89, 0x76, 0x81, 0x65, 0x63, 0xca, 0x86, 0x9f, 0x42, 0xf0, 0xd6, + 0xdc, 0x08, 0x16, 0x0f, 0xe6, 0x91, 0xea, 0x42, 0x7e, 0x1f, 0x46, 0x1f, 0x75, 0xd1, 0x1a, 0x31, + 0xa0, 0x5c, 0x0f, 0xc9, 0x27, 0x08, 0x24, 0x5a, 0xce, 0x61, 0xb8, 0xca, 0xd7, 0x86, 0xea, 0xa7, + 0x8a, 0x62, 0x7e, 0x0e, 0xe1, 0x76, 0x9a, 0x13, 0x83, 0x38, 0x98, 0x4f, 0x9e, 0x9d, 0xa4, 0xae, + 0x70, 0xe9, 0x7e, 0x8b, 0xda, 0x15, 0xf0, 0x07, 0x30, 0xee, 0x9a, 0xde, 0x3b, 0x31, 0x8c, 0xd9, + 0xfc, 0x48, 0x6d, 0x29, 0x79, 0x0a, 0x63, 0x89, 0x76, 0xa5, 0xed, 0x7f, 0x3b, 0xfa, 0xc1, 0x20, + 0x94, 0x68, 0x5f, 0xd7, 0xd8, 0x56, 0xfc, 0x21, 0x0c, 0x25, 0x5a, 0x27, 0x18, 0xed, 0x0f, 0xfd, + 0x7e, 0x45, 0x59, 0x7e, 0x06, 0xe1, 0x42, 0x37, 0xc6, 0x62, 0x7d, 0x23, 0x06, 0x31, 0x9b, 0x47, + 0x6a, 0xc7, 0xdd, 0xf0, 0x15, 0x56, 0x79, 0x26, 0x02, 0x12, 0x7a, 0xe8, 0x6c, 0x2e, 0xb1, 0xad, + 0x33, 0x43, 0x36, 0x23, 0xb5, 0x25, 0x1e, 0xc3, 0xe4, 0x9d, 0xce, 0xae, 0xf3, 0xd2, 0x5c, 0x5e, + 0xbe, 0x79, 0x25, 0x46, 0x24, 0xfe, 0x9b, 0xe2, 0x8f, 0xe0, 0xa8, 0x3f, 0xc4, 0x89, 0x31, 0x99, + 0x99, 0x78, 0x33, 0x2b, 0x6d, 0x95, 0xd7, 0x12, 0x09, 0xd3, 0x65, 0xe1, 0x24, 0xda, 0x0f, 0x3a, + 0xfb, 0xa6, 0xad, 0xe9, 0x3e, 0xfb, 0x45, 0x37, 0x9a, 0xee, 0x3e, 0x56, 0x14, 0xf3, 0xc7, 0x70, + 0xd2, 0x96, 0x19, 0xae, 0xab, 0xda, 0x38, 0xf7, 0xd9, 0xe5, 0xb7, 0x86, 0xec, 0x8f, 0xd4, 0xdd, + 0x7d, 0x7a, 0x99, 0xdf, 0x9a, 0x64, 0x01, 0xf7, 0x0e, 0xa6, 0xc9, 0xdc, 0x35, 0x3c, 0x85, 0xb0, + 0xea, 0xd1, 0xff, 0x85, 0x93, 0x95, 0x83, 0x4a, 0xb5, 0xab, 0x49, 0x5e, 0xc0, 0xb1, 0xff, 0x27, + 0xf5, 0x9f, 0x43, 0xe4, 0xd9, 0x0f, 0x98, 0xfa, 0x5b, 0x28, 0xab, 0xf6, 0xfa, 0xcb, 0xd3, 0x9f, + 0x9b, 0x19, 0xfb, 0xb5, 0x99, 0xb1, 0xdf, 0x9b, 0x19, 0xfb, 0xfe, 0x67, 0x76, 0xe7, 0x6f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x66, 0x67, 0x4d, 0x9a, 0xa7, 0x02, 0x00, 0x00, +} + +func (m *LogContent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogContent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i -= len(*m.Value) + copy(dAtA[i:], *m.Value) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Value))) + i-- + dAtA[i] = 0x12 + } + if m.Key == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i -= len(*m.Key) + copy(dAtA[i:], *m.Key) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Log) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Log) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.TimeNs != nil { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.TimeNs)) + i-- + dAtA[i] = 0x25 + } + if len(m.Contents) > 0 { + for iNdEx := len(m.Contents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Contents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Time == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i = encodeVarintLog(dAtA, i, uint64(*m.Time)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *LogTag) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogTag) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogTag) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i -= len(*m.Value) + copy(dAtA[i:], *m.Value) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Value))) + i-- + dAtA[i] = 0x12 + } + if m.Key == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i -= len(*m.Key) + copy(dAtA[i:], *m.Key) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.LogTags) > 0 { + for iNdEx := len(m.LogTags) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LogTags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.MachineUUID != nil { + i -= len(*m.MachineUUID) + copy(dAtA[i:], *m.MachineUUID) + i = encodeVarintLog(dAtA, i, uint64(len(*m.MachineUUID))) + i-- + dAtA[i] = 0x2a + } + if m.Source != nil { + i -= len(*m.Source) + copy(dAtA[i:], *m.Source) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Source))) + i-- + dAtA[i] = 0x22 + } + if m.Topic != nil { + i -= len(*m.Topic) + copy(dAtA[i:], *m.Topic) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Topic))) + i-- + dAtA[i] = 0x1a + } + if m.Category != nil { + i -= len(*m.Category) + copy(dAtA[i:], *m.Category) + i = encodeVarintLog(dAtA, i, uint64(len(*m.Category))) + i-- + dAtA[i] = 0x12 + } + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SlsLogPackage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SlsLogPackage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SlsLogPackage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.UncompressSize != nil { + i = encodeVarintLog(dAtA, i, uint64(*m.UncompressSize)) + i-- + dAtA[i] = 0x10 + } + if m.Data == nil { + return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) + } else { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintLog(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SlsLogPackageList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SlsLogPackageList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SlsLogPackageList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Packages) > 0 { + for iNdEx := len(m.Packages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Packages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *LogGroupList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogGroupList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogGroupList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.LogGroups) > 0 { + for iNdEx := len(m.LogGroups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LogGroups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintLog(dAtA []byte, offset int, v uint64) int { + offset -= sovLog(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *LogContent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovLog(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovLog(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Log) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != nil { + n += 1 + sovLog(uint64(*m.Time)) + } + if len(m.Contents) > 0 { + for _, e := range m.Contents { + l = e.Size() + n += 1 + l + sovLog(uint64(l)) + } + } + if m.TimeNs != nil { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *LogTag) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovLog(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovLog(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *LogGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovLog(uint64(l)) + } + } + if m.Category != nil { + l = len(*m.Category) + n += 1 + l + sovLog(uint64(l)) + } + if m.Topic != nil { + l = len(*m.Topic) + n += 1 + l + sovLog(uint64(l)) + } + if m.Source != nil { + l = len(*m.Source) + n += 1 + l + sovLog(uint64(l)) + } + if m.MachineUUID != nil { + l = len(*m.MachineUUID) + n += 1 + l + sovLog(uint64(l)) + } + if len(m.LogTags) > 0 { + for _, e := range m.LogTags { + l = e.Size() + n += 1 + l + sovLog(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SlsLogPackage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovLog(uint64(l)) + } + if m.UncompressSize != nil { + n += 1 + sovLog(uint64(*m.UncompressSize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SlsLogPackageList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Packages) > 0 { + for _, e := range m.Packages { + l = e.Size() + n += 1 + l + sovLog(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *LogGroupList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LogGroups) > 0 { + for _, e := range m.LogGroups { + l = e.Size() + n += 1 + l + sovLog(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovLog(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLog(x uint64) (n int) { + return sovLog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *LogContent) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m._key = string(dAtA[iNdEx:postIndex]) + m.Key = &m._key + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m._value = string(dAtA[iNdEx:postIndex]) + m.Value = &m._value + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + if hasFields[0]&uint64(0x00000002) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Log) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Log: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Time = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contents = append(m.Contents, &LogContent{}) + if err := m.Contents[len(m.Contents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeNs", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TimeNs = &v + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogTag) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogTag: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogTag: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m._key = string(dAtA[iNdEx:postIndex]) + m.Key = &m._key + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m._value = string(dAtA[iNdEx:postIndex]) + m.Value = &m._value + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + if hasFields[0]&uint64(0x00000002) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Category = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Topic = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Source = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MachineUUID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.MachineUUID = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogTags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogTags = append(m.LogTags, &LogTag{}) + if err := m.LogTags[len(m.LogTags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SlsLogPackage) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlsLogPackage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlsLogPackage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UncompressSize", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UncompressSize = &v + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return new(github_com_golang_protobuf_proto.RequiredNotSetError) + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SlsLogPackageList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SlsLogPackageList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlsLogPackageList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Packages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Packages = append(m.Packages, &SlsLogPackage{}) + if err := m.Packages[len(m.Packages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogGroupList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogGroupList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogGroupList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogGroups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogGroups = append(m.LogGroups, &LogGroup{}) + if err := m.LogGroups[len(m.LogGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLog(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLog + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthLog + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLog + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLog + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLog = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLog = fmt.Errorf("proto: unexpected end of group") +) diff --git a/alibabacloud-gateway-sls/util/golang/client/log_serializer.go b/alibabacloud-gateway-sls/util/golang/client/log_serializer.go new file mode 100644 index 00000000..daa2a09a --- /dev/null +++ b/alibabacloud-gateway-sls/util/golang/client/log_serializer.go @@ -0,0 +1,247 @@ +package client + +import ( + "encoding/json" + "errors" + "fmt" + + "github.com/gogo/protobuf/proto" +) + +func serializeLogGroupToPB(logGroup interface{}) ([]byte, error) { + if logGroup == nil { + return nil, errors.New("fail to serialize LogGroup to protobuf, logGroup is nil") + } + + m, ok := logGroup.(map[string]interface{}) + if !ok { + return nil, errors.New("fail to serialize LogGroup to protobuf, logGroup is not a map") + } + + lg := &LogGroup{} + + // topic + topic, err := getString(m, "Topic") + if err != nil { + return nil, err + } + if topic != "" { + lg.Topic = &topic + } + + // source + source, err := getString(m, "Source") + if err != nil { + return nil, err + } + if source != "" { + lg.Source = &source + } + + // logTags + if err := serializeLogTags(lg, m); err != nil { + return nil, err + } + + // logItems + if err := serializeLogItems(lg, m); err != nil { + return nil, err + } + + // to bytes + data, err := lg.Marshal() + if err != nil { + return nil, fmt.Errorf("fail to serialize LogGroup to protobuf, %w", err) + } + return data, nil +} + +func serializeLogItems(lg *LogGroup, logGroup map[string]interface{}) error { + // check if logItems is nil, regard as empty logItems if nil + logItemsValue, ok := logGroup["LogItems"] + if !ok { + return nil + } + + logItems, ok := logItemsValue.([]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, LogItems field is not a slice") + } + + // empty logItems is valid + for _, logItem := range logItems { + if err := serializeLogItem(lg, logItem); err != nil { + return err + } + } + return nil +} + +func serializeLogItem(lg *LogGroup, logItem interface{}) error { + if logItem == nil { + return errors.New("fail to serialize LogGroup to protobuf, logItem is nil") + } + + m, ok := logItem.(map[string]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, logItem is not a map") + } + + logPb := &Log{} + + if time, exists, err := getInt(m, "Time"); err != nil { + return err + } else if !exists { + return errors.New("fail to serialize LogGroup to protobuf, log time is missing") + } else { + logPb.Time = proto.Uint32(uint32(time)) + } + + if timeNano, exists, err := getInt(m, "TimeNs"); err != nil { + return err + } else if exists { + logPb.TimeNs = proto.Uint32(uint32(timeNano)) + } + + if err := serializeLogContents(logPb, m); err != nil { + return err + } + lg.Logs = append(lg.Logs, logPb) + return nil +} + +func serializeLogContents(logPb *Log, logItem map[string]interface{}) error { + // check if logContents is nil, regard as empty logContents if nil + contentsValue, ok := logItem["Contents"] + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, log Contents is missing") + } + contents, ok := contentsValue.([]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, logContents is not a slice") + } + + // empty logContents is valid + for _, content := range contents { + if err := serializeLogContent(logPb, content); err != nil { + return err + } + } + + return nil +} + +func serializeLogContent(logPb *Log, content interface{}) error { + if content == nil { + return errors.New("fail to serialize LogGroup to protobuf, logContent is nil") + } + + m, ok := content.(map[string]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, logContent is not a map") + } + + key, value, err := getKeyValuePair(m) + if err != nil { + return err + } + + logPb.Contents = append(logPb.Contents, &LogContent{Key: &key, Value: &value}) + return nil +} + +func serializeLogTags(lg *LogGroup, logGroup map[string]interface{}) error { + // check if logTags is nil, regard as empty logTags if nil + logTagsValue, ok := logGroup["LogTags"] + if !ok { + return nil + } + + logTags, ok := logTagsValue.([]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, LogTags field is not a slice") + } + + // empty logTags is valid + for _, logTag := range logTags { + if err := serializeLogTag(lg, logTag); err != nil { + return err + } + } + return nil +} + +func serializeLogTag(lg *LogGroup, logTag interface{}) error { + if logTag == nil { + return errors.New("fail to serialize LogGroup to protobuf, logTag is nil") + } + + m, ok := logTag.(map[string]interface{}) + if !ok { + return errors.New("fail to serialize LogGroup to protobuf, logTag is not a map") + } + + key, value, err := getKeyValuePair(m) + if err != nil { + return err + } + + lg.LogTags = append(lg.LogTags, &LogTag{Key: &key, Value: &value}) + return nil +} + +func getKeyValuePair(m map[string]interface{}) (key string, value string, err error) { + key, err = getString(m, "Key") + if err != nil { + return "", "", err + } + + value, err = getString(m, "Value") + if err != nil { + return "", "", err + } + + return key, value, nil +} + +func getString(m map[string]interface{}, key string) (string, error) { + v, ok := m[key] + if !ok { + return "", nil + } + + s, ok := v.(string) + if !ok { + return "", fmt.Errorf("value of %s is not a string (type: %T)", key, v) + } + return s, nil +} + +func getInt(m map[string]interface{}, key string) (int64, bool, error) { + v, ok := m[key] + if !ok { + return 0, false, nil + } + + if i, ok := v.(json.Number); ok { + if vv, err := i.Int64(); err != nil { + return 0, false, err + } else { + return vv, true, nil + } + } + + if i, ok := v.(int64); ok { + return i, true, nil + } + + if i, ok := v.(int); ok { + return int64(i), true, nil + } + + if i, ok := v.(int32); ok { + return int64(i), true, nil + } + + return 0, false, fmt.Errorf("value of %s is not a number (type: %T, value: %v)", key, v, v) +} diff --git a/alibabacloud-gateway-sls/util/golang/go.mod b/alibabacloud-gateway-sls/util/golang/go.mod index ce2ea982..981edac8 100644 --- a/alibabacloud-gateway-sls/util/golang/go.mod +++ b/alibabacloud-gateway-sls/util/golang/go.mod @@ -5,6 +5,8 @@ go 1.19 require ( github.com/alibabacloud-go/tea v1.1.0 github.com/alibabacloud-go/tea-utils/v2 v2.0.1 + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.5.2 github.com/klauspost/compress v1.17.8 github.com/pierrec/lz4 v2.6.0+incompatible ) @@ -12,5 +14,7 @@ require ( require ( github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect github.com/frankban/quicktest v1.14.5 // indirect + github.com/google/go-cmp v0.5.9 // indirect golang.org/x/net v0.23.0 // indirect + google.golang.org/protobuf v1.26.0 // indirect ) diff --git a/alibabacloud-gateway-sls/util/golang/go.sum b/alibabacloud-gateway-sls/util/golang/go.sum index 69f3fcf8..d03bef02 100644 --- a/alibabacloud-gateway-sls/util/golang/go.sum +++ b/alibabacloud-gateway-sls/util/golang/go.sum @@ -7,8 +7,16 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomU github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA= github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -20,11 +28,37 @@ github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=