Ai
1 Star 0 Fork 0

ryancartoon/sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
adhoc.pb.go 15.26 KB
一键复制 编辑 原始数据 按行查看 历史
Eric Chlebek 提交于 2018-11-29 07:03 +08:00 . Add metadata to Wrapper (#2420)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: adhoc.proto
package v2
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import bytes "bytes"
import io "io"
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type AdhocRequest struct {
// Subscriptions is the list of entity subscriptions.
Subscriptions []string `protobuf:"bytes,2,rep,name=subscriptions" json:"subscriptions,omitempty"`
// Creator is the author of the adhoc request.
Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
// Reason is used to provide context to the request.
Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
// Metadata contains the name, namespace, labels and annotations of the AdhocCheck
ObjectMeta `protobuf:"bytes,5,opt,name=metadata,embedded=metadata" json:"metadata"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AdhocRequest) Reset() { *m = AdhocRequest{} }
func (m *AdhocRequest) String() string { return proto.CompactTextString(m) }
func (*AdhocRequest) ProtoMessage() {}
func (*AdhocRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_adhoc_325b14ba0478b595, []int{0}
}
func (m *AdhocRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AdhocRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AdhocRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *AdhocRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdhocRequest.Merge(dst, src)
}
func (m *AdhocRequest) XXX_Size() int {
return m.Size()
}
func (m *AdhocRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AdhocRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AdhocRequest proto.InternalMessageInfo
func (m *AdhocRequest) GetSubscriptions() []string {
if m != nil {
return m.Subscriptions
}
return nil
}
func (m *AdhocRequest) GetCreator() string {
if m != nil {
return m.Creator
}
return ""
}
func (m *AdhocRequest) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
func init() {
proto.RegisterType((*AdhocRequest)(nil), "sensu.core.v2.AdhocRequest")
}
func (this *AdhocRequest) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*AdhocRequest)
if !ok {
that2, ok := that.(AdhocRequest)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Subscriptions) != len(that1.Subscriptions) {
return false
}
for i := range this.Subscriptions {
if this.Subscriptions[i] != that1.Subscriptions[i] {
return false
}
}
if this.Creator != that1.Creator {
return false
}
if this.Reason != that1.Reason {
return false
}
if !this.ObjectMeta.Equal(&that1.ObjectMeta) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (m *AdhocRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AdhocRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Subscriptions) > 0 {
for _, s := range m.Subscriptions {
dAtA[i] = 0x12
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.Creator) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintAdhoc(dAtA, i, uint64(len(m.Creator)))
i += copy(dAtA[i:], m.Creator)
}
if len(m.Reason) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintAdhoc(dAtA, i, uint64(len(m.Reason)))
i += copy(dAtA[i:], m.Reason)
}
dAtA[i] = 0x2a
i++
i = encodeVarintAdhoc(dAtA, i, uint64(m.ObjectMeta.Size()))
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintAdhoc(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func NewPopulatedAdhocRequest(r randyAdhoc, easy bool) *AdhocRequest {
this := &AdhocRequest{}
v1 := r.Intn(10)
this.Subscriptions = make([]string, v1)
for i := 0; i < v1; i++ {
this.Subscriptions[i] = string(randStringAdhoc(r))
}
this.Creator = string(randStringAdhoc(r))
this.Reason = string(randStringAdhoc(r))
v2 := NewPopulatedObjectMeta(r, easy)
this.ObjectMeta = *v2
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedAdhoc(r, 6)
}
return this
}
type randyAdhoc interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneAdhoc(r randyAdhoc) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringAdhoc(r randyAdhoc) string {
v3 := r.Intn(100)
tmps := make([]rune, v3)
for i := 0; i < v3; i++ {
tmps[i] = randUTF8RuneAdhoc(r)
}
return string(tmps)
}
func randUnrecognizedAdhoc(r randyAdhoc, maxFieldNumber int) (dAtA []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
dAtA = randFieldAdhoc(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldAdhoc(dAtA []byte, r randyAdhoc, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key))
v4 := r.Int63()
if r.Intn(2) == 0 {
v4 *= -1
}
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(v4))
case 1:
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return dAtA
}
func encodeVarintPopulateAdhoc(dAtA []byte, v uint64) []byte {
for v >= 1<<7 {
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *AdhocRequest) Size() (n int) {
var l int
_ = l
if len(m.Subscriptions) > 0 {
for _, s := range m.Subscriptions {
l = len(s)
n += 1 + l + sovAdhoc(uint64(l))
}
}
l = len(m.Creator)
if l > 0 {
n += 1 + l + sovAdhoc(uint64(l))
}
l = len(m.Reason)
if l > 0 {
n += 1 + l + sovAdhoc(uint64(l))
}
l = m.ObjectMeta.Size()
n += 1 + l + sovAdhoc(uint64(l))
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovAdhoc(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozAdhoc(x uint64) (n int) {
return sovAdhoc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AdhocRequest) 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 ErrIntOverflowAdhoc
}
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: AdhocRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AdhocRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAdhoc
}
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 ErrInvalidLengthAdhoc
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAdhoc
}
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 ErrInvalidLengthAdhoc
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Creator = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAdhoc
}
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 ErrInvalidLengthAdhoc
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Reason = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAdhoc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthAdhoc
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipAdhoc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthAdhoc
}
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 skipAdhoc(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAdhoc
}
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, ErrIntOverflowAdhoc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAdhoc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthAdhoc
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAdhoc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipAdhoc(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthAdhoc = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowAdhoc = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("adhoc.proto", fileDescriptor_adhoc_325b14ba0478b595) }
var fileDescriptor_adhoc_325b14ba0478b595 = []byte{
// 264 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x4f, 0x4d, 0x4a, 0xc3, 0x40,
0x14, 0xee, 0x6b, 0x6b, 0xd5, 0xa9, 0xdd, 0x04, 0x17, 0xb1, 0xc8, 0x24, 0xb8, 0x2a, 0x82, 0x53,
0x88, 0x27, 0x30, 0x5b, 0x11, 0x21, 0x4b, 0x77, 0x93, 0xe9, 0x98, 0x46, 0x68, 0x5e, 0x9d, 0x9f,
0x9e, 0xc5, 0x23, 0x78, 0x04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85, 0x0f, 0x47, 0xe1, 0xe5,
0x8b, 0x76, 0x1e, 0xba, 0xab, 0x24, 0x1f, 0xf8, 0xc1, 0xd7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff,
0xa0, 0x78, 0xca, 0x9c, 0x49, 0x01, 0x00, 0x00,
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助