Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1599 lines (1546 sloc) 45.1 KB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: mixer/test/spyAdapter/template/quota/quotatmpl_handler_service.proto
package samplequota
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
types "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
io "io"
v1beta1 "istio.io/api/mixer/adapter/model/v1beta1"
v1beta11 "istio.io/api/policy/v1beta1"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Request message for HandleSampleQuota method.
type HandleSampleQuotaRequest struct {
// 'samplequota' instance.
Instance *InstanceMsg `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
// Adapter specific handler configuration.
//
// Note: Backends can also implement [InfrastructureBackend][https://istio.io/docs/reference/config/mixer/istio.mixer.adapter.model.v1beta1.html#InfrastructureBackend]
// service and therefore opt to receive handler configuration during session creation through [InfrastructureBackend.CreateSession][TODO: Link to this fragment]
// call. In that case, adapter_config will have type_url as 'google.protobuf.Any.type_url' and would contain string
// value of session_id (returned from InfrastructureBackend.CreateSession).
AdapterConfig *types.Any `protobuf:"bytes,2,opt,name=adapter_config,json=adapterConfig,proto3" json:"adapter_config,omitempty"`
// Id to dedupe identical requests from Mixer.
DedupId string `protobuf:"bytes,3,opt,name=dedup_id,json=dedupId,proto3" json:"dedup_id,omitempty"`
// Expresses the quota allocation request.
QuotaRequest *v1beta1.QuotaRequest `protobuf:"bytes,4,opt,name=quota_request,json=quotaRequest,proto3" json:"quota_request,omitempty"`
}
func (m *HandleSampleQuotaRequest) Reset() { *m = HandleSampleQuotaRequest{} }
func (*HandleSampleQuotaRequest) ProtoMessage() {}
func (*HandleSampleQuotaRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5836925707764118, []int{0}
}
func (m *HandleSampleQuotaRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HandleSampleQuotaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *HandleSampleQuotaRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HandleSampleQuotaRequest.Merge(m, src)
}
func (m *HandleSampleQuotaRequest) XXX_Size() int {
return m.Size()
}
func (m *HandleSampleQuotaRequest) XXX_DiscardUnknown() {
xxx_messageInfo_HandleSampleQuotaRequest.DiscardUnknown(m)
}
var xxx_messageInfo_HandleSampleQuotaRequest proto.InternalMessageInfo
// Contains instance payload for 'samplequota' template. This is passed to infrastructure backends during request-time
// through HandleSampleQuotaService.HandleSampleQuota.
type InstanceMsg struct {
// Name of the instance as specified in configuration.
Name string `protobuf:"bytes,72295727,opt,name=name,proto3" json:"name,omitempty"`
// The unique identity of the particular quota to manipulate.
Dimensions map[string]*v1beta11.Value `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *InstanceMsg) Reset() { *m = InstanceMsg{} }
func (*InstanceMsg) ProtoMessage() {}
func (*InstanceMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_5836925707764118, []int{1}
}
func (m *InstanceMsg) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *InstanceMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *InstanceMsg) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstanceMsg.Merge(m, src)
}
func (m *InstanceMsg) XXX_Size() int {
return m.Size()
}
func (m *InstanceMsg) XXX_DiscardUnknown() {
xxx_messageInfo_InstanceMsg.DiscardUnknown(m)
}
var xxx_messageInfo_InstanceMsg proto.InternalMessageInfo
// Contains inferred type information about specific instance of 'samplequota' template. This is passed to
// infrastructure backends during configuration-time through [InfrastructureBackend.CreateSession][TODO: Link to this fragment].
type Type struct {
// The unique identity of the particular quota to manipulate.
Dimensions map[string]v1beta11.ValueType `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=istio.policy.v1beta1.ValueType"`
}
func (m *Type) Reset() { *m = Type{} }
func (*Type) ProtoMessage() {}
func (*Type) Descriptor() ([]byte, []int) {
return fileDescriptor_5836925707764118, []int{2}
}
func (m *Type) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *Type) XXX_Merge(src proto.Message) {
xxx_messageInfo_Type.Merge(m, src)
}
func (m *Type) XXX_Size() int {
return m.Size()
}
func (m *Type) XXX_DiscardUnknown() {
xxx_messageInfo_Type.DiscardUnknown(m)
}
var xxx_messageInfo_Type proto.InternalMessageInfo
// Represents instance configuration schema for 'samplequota' template.
type InstanceParam struct {
// The unique identity of the particular quota to manipulate.
Dimensions map[string]string `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *InstanceParam) Reset() { *m = InstanceParam{} }
func (*InstanceParam) ProtoMessage() {}
func (*InstanceParam) Descriptor() ([]byte, []int) {
return fileDescriptor_5836925707764118, []int{3}
}
func (m *InstanceParam) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *InstanceParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *InstanceParam) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstanceParam.Merge(m, src)
}
func (m *InstanceParam) XXX_Size() int {
return m.Size()
}
func (m *InstanceParam) XXX_DiscardUnknown() {
xxx_messageInfo_InstanceParam.DiscardUnknown(m)
}
var xxx_messageInfo_InstanceParam proto.InternalMessageInfo
func init() {
proto.RegisterType((*HandleSampleQuotaRequest)(nil), "samplequota.HandleSampleQuotaRequest")
proto.RegisterType((*InstanceMsg)(nil), "samplequota.InstanceMsg")
proto.RegisterMapType((map[string]*v1beta11.Value)(nil), "samplequota.InstanceMsg.DimensionsEntry")
proto.RegisterType((*Type)(nil), "samplequota.Type")
proto.RegisterMapType((map[string]v1beta11.ValueType)(nil), "samplequota.Type.DimensionsEntry")
proto.RegisterType((*InstanceParam)(nil), "samplequota.InstanceParam")
proto.RegisterMapType((map[string]string)(nil), "samplequota.InstanceParam.DimensionsEntry")
}
func init() {
proto.RegisterFile("mixer/test/spyAdapter/template/quota/quotatmpl_handler_service.proto", fileDescriptor_5836925707764118)
}
var fileDescriptor_5836925707764118 = []byte{
// 619 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x41, 0x6b, 0xd4, 0x40,
0x18, 0x86, 0x33, 0xdb, 0xaa, 0xed, 0xac, 0xad, 0x3a, 0x54, 0x48, 0x57, 0x98, 0xd6, 0x05, 0x71,
0x11, 0x99, 0xd0, 0x55, 0x41, 0x14, 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7, 0x2a, 0x95,
0xf7, 0x3f, 0x0e, 0xf7, 0x2a, 0xe5, 0x8b, 0x6b, 0xf3, 0xac, 0x3c, 0x81, 0xb7, 0xfe, 0x06, 0x00,
0x00, 0xff, 0xff, 0xc0, 0xb7, 0xbf, 0xc5, 0x14, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// HandleSampleQuotaServiceClient is the client API for HandleSampleQuotaService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HandleSampleQuotaServiceClient interface {
// HandleSampleQuota is called by Mixer at request-time to deliver 'samplequota' instances to the backend.
HandleSampleQuota(ctx context.Context, in *HandleSampleQuotaRequest, opts ...grpc.CallOption) (*v1beta1.QuotaResult, error)
}
type handleSampleQuotaServiceClient struct {
cc *grpc.ClientConn
}
func NewHandleSampleQuotaServiceClient(cc *grpc.ClientConn) HandleSampleQuotaServiceClient {
return &handleSampleQuotaServiceClient{cc}
}
func (c *handleSampleQuotaServiceClient) HandleSampleQuota(ctx context.Context, in *HandleSampleQuotaRequest, opts ...grpc.CallOption) (*v1beta1.QuotaResult, error) {
out := new(v1beta1.QuotaResult)
err := c.cc.Invoke(ctx, "/samplequota.HandleSampleQuotaService/HandleSampleQuota", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HandleSampleQuotaServiceServer is the server API for HandleSampleQuotaService service.
type HandleSampleQuotaServiceServer interface {
// HandleSampleQuota is called by Mixer at request-time to deliver 'samplequota' instances to the backend.
HandleSampleQuota(context.Context, *HandleSampleQuotaRequest) (*v1beta1.QuotaResult, error)
}
// UnimplementedHandleSampleQuotaServiceServer can be embedded to have forward compatible implementations.
type UnimplementedHandleSampleQuotaServiceServer struct {
}
func (*UnimplementedHandleSampleQuotaServiceServer) HandleSampleQuota(ctx context.Context, req *HandleSampleQuotaRequest) (*v1beta1.QuotaResult, error) {
return nil, status.Errorf(codes.Unimplemented, "method HandleSampleQuota not implemented")
}
func RegisterHandleSampleQuotaServiceServer(s *grpc.Server, srv HandleSampleQuotaServiceServer) {
s.RegisterService(&_HandleSampleQuotaService_serviceDesc, srv)
}
func _HandleSampleQuotaService_HandleSampleQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HandleSampleQuotaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HandleSampleQuotaServiceServer).HandleSampleQuota(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/samplequota.HandleSampleQuotaService/HandleSampleQuota",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HandleSampleQuotaServiceServer).HandleSampleQuota(ctx, req.(*HandleSampleQuotaRequest))
}
return interceptor(ctx, in, info, handler)
}
var _HandleSampleQuotaService_serviceDesc = grpc.ServiceDesc{
ServiceName: "samplequota.HandleSampleQuotaService",
HandlerType: (*HandleSampleQuotaServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "HandleSampleQuota",
Handler: _HandleSampleQuotaService_HandleSampleQuota_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "mixer/test/spyAdapter/template/quota/quotatmpl_handler_service.proto",
}
func (m *HandleSampleQuotaRequest) 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 *HandleSampleQuotaRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *HandleSampleQuotaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.QuotaRequest != nil {
{
size, err := m.QuotaRequest.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
if len(m.DedupId) > 0 {
i -= len(m.DedupId)
copy(dAtA[i:], m.DedupId)
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(m.DedupId)))
i--
dAtA[i] = 0x1a
}
if m.AdapterConfig != nil {
{
size, err := m.AdapterConfig.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.Instance != nil {
{
size, err := m.Instance.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *InstanceMsg) 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 *InstanceMsg) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *InstanceMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x2
i--
dAtA[i] = 0x93
i--
dAtA[i] = 0xe4
i--
dAtA[i] = 0xd2
i--
dAtA[i] = 0xfa
}
if len(m.Dimensions) > 0 {
keysForDimensions := make([]string, 0, len(m.Dimensions))
for k := range m.Dimensions {
keysForDimensions = append(keysForDimensions, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
for iNdEx := len(keysForDimensions) - 1; iNdEx >= 0; iNdEx-- {
v := m.Dimensions[string(keysForDimensions[iNdEx])]
baseI := i
if v != nil {
{
size, err := v.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
i -= len(keysForDimensions[iNdEx])
copy(dAtA[i:], keysForDimensions[iNdEx])
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(keysForDimensions[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Type) 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 *Type) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Type) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Dimensions) > 0 {
keysForDimensions := make([]string, 0, len(m.Dimensions))
for k := range m.Dimensions {
keysForDimensions = append(keysForDimensions, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
for iNdEx := len(keysForDimensions) - 1; iNdEx >= 0; iNdEx-- {
v := m.Dimensions[string(keysForDimensions[iNdEx])]
baseI := i
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(v))
i--
dAtA[i] = 0x10
i -= len(keysForDimensions[iNdEx])
copy(dAtA[i:], keysForDimensions[iNdEx])
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(keysForDimensions[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *InstanceParam) 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 *InstanceParam) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *InstanceParam) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Dimensions) > 0 {
keysForDimensions := make([]string, 0, len(m.Dimensions))
for k := range m.Dimensions {
keysForDimensions = append(keysForDimensions, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
for iNdEx := len(keysForDimensions) - 1; iNdEx >= 0; iNdEx-- {
v := m.Dimensions[string(keysForDimensions[iNdEx])]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(keysForDimensions[iNdEx])
copy(dAtA[i:], keysForDimensions[iNdEx])
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(len(keysForDimensions[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintQuotatmplHandlerService(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintQuotatmplHandlerService(dAtA []byte, offset int, v uint64) int {
offset -= sovQuotatmplHandlerService(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *HandleSampleQuotaRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Instance != nil {
l = m.Instance.Size()
n += 1 + l + sovQuotatmplHandlerService(uint64(l))
}
if m.AdapterConfig != nil {
l = m.AdapterConfig.Size()
n += 1 + l + sovQuotatmplHandlerService(uint64(l))
}
l = len(m.DedupId)
if l > 0 {
n += 1 + l + sovQuotatmplHandlerService(uint64(l))
}
if m.QuotaRequest != nil {
l = m.QuotaRequest.Size()
n += 1 + l + sovQuotatmplHandlerService(uint64(l))
}
return n
}
func (m *InstanceMsg) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Dimensions) > 0 {
for k, v := range m.Dimensions {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
l += 1 + sovQuotatmplHandlerService(uint64(l))
}
mapEntrySize := 1 + len(k) + sovQuotatmplHandlerService(uint64(len(k))) + l
n += mapEntrySize + 1 + sovQuotatmplHandlerService(uint64(mapEntrySize))
}
}
l = len(m.Name)
if l > 0 {
n += 5 + l + sovQuotatmplHandlerService(uint64(l))
}
return n
}
func (m *Type) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Dimensions) > 0 {
for k, v := range m.Dimensions {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovQuotatmplHandlerService(uint64(len(k))) + 1 + sovQuotatmplHandlerService(uint64(v))
n += mapEntrySize + 1 + sovQuotatmplHandlerService(uint64(mapEntrySize))
}
}
return n
}
func (m *InstanceParam) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Dimensions) > 0 {
for k, v := range m.Dimensions {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovQuotatmplHandlerService(uint64(len(k))) + 1 + len(v) + sovQuotatmplHandlerService(uint64(len(v)))
n += mapEntrySize + 1 + sovQuotatmplHandlerService(uint64(mapEntrySize))
}
}
return n
}
func sovQuotatmplHandlerService(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozQuotatmplHandlerService(x uint64) (n int) {
return sovQuotatmplHandlerService(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *HandleSampleQuotaRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HandleSampleQuotaRequest{`,
`Instance:` + strings.Replace(this.Instance.String(), "InstanceMsg", "InstanceMsg", 1) + `,`,
`AdapterConfig:` + strings.Replace(fmt.Sprintf("%v", this.AdapterConfig), "Any", "types.Any", 1) + `,`,
`DedupId:` + fmt.Sprintf("%v", this.DedupId) + `,`,
`QuotaRequest:` + strings.Replace(fmt.Sprintf("%v", this.QuotaRequest), "QuotaRequest", "v1beta1.QuotaRequest", 1) + `,`,
`}`,
}, "")
return s
}
func (this *InstanceMsg) String() string {
if this == nil {
return "nil"
}
keysForDimensions := make([]string, 0, len(this.Dimensions))
for k, _ := range this.Dimensions {
keysForDimensions = append(keysForDimensions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
mapStringForDimensions := "map[string]*v1beta11.Value{"
for _, k := range keysForDimensions {
mapStringForDimensions += fmt.Sprintf("%v: %v,", k, this.Dimensions[k])
}
mapStringForDimensions += "}"
s := strings.Join([]string{`&InstanceMsg{`,
`Dimensions:` + mapStringForDimensions + `,`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`}`,
}, "")
return s
}
func (this *Type) String() string {
if this == nil {
return "nil"
}
keysForDimensions := make([]string, 0, len(this.Dimensions))
for k, _ := range this.Dimensions {
keysForDimensions = append(keysForDimensions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
mapStringForDimensions := "map[string]v1beta11.ValueType{"
for _, k := range keysForDimensions {
mapStringForDimensions += fmt.Sprintf("%v: %v,", k, this.Dimensions[k])
}
mapStringForDimensions += "}"
s := strings.Join([]string{`&Type{`,
`Dimensions:` + mapStringForDimensions + `,`,
`}`,
}, "")
return s
}
func (this *InstanceParam) String() string {
if this == nil {
return "nil"
}
keysForDimensions := make([]string, 0, len(this.Dimensions))
for k, _ := range this.Dimensions {
keysForDimensions = append(keysForDimensions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDimensions)
mapStringForDimensions := "map[string]string{"
for _, k := range keysForDimensions {
mapStringForDimensions += fmt.Sprintf("%v: %v,", k, this.Dimensions[k])
}
mapStringForDimensions += "}"
s := strings.Join([]string{`&InstanceParam{`,
`Dimensions:` + mapStringForDimensions + `,`,
`}`,
}, "")
return s
}
func valueToStringQuotatmplHandlerService(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *HandleSampleQuotaRequest) 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 ErrIntOverflowQuotatmplHandlerService
}
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: HandleSampleQuotaRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HandleSampleQuotaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Instance", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Instance == nil {
m.Instance = &InstanceMsg{}
}
if err := m.Instance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AdapterConfig", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AdapterConfig == nil {
m.AdapterConfig = &types.Any{}
}
if err := m.AdapterConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DedupId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
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 ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DedupId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field QuotaRequest", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.QuotaRequest == nil {
m.QuotaRequest = &v1beta1.QuotaRequest{}
}
if err := m.QuotaRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *InstanceMsg) 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 ErrIntOverflowQuotatmplHandlerService
}
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: InstanceMsg: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InstanceMsg: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Dimensions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Dimensions == nil {
m.Dimensions = make(map[string]*v1beta11.Value)
}
var mapkey string
var mapvalue *v1beta11.Value
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &v1beta11.Value{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Dimensions[mapkey] = mapvalue
iNdEx = postIndex
case 72295727:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
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 ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Type) 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 ErrIntOverflowQuotatmplHandlerService
}
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: Type: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Dimensions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Dimensions == nil {
m.Dimensions = make(map[string]v1beta11.ValueType)
}
var mapkey string
var mapvalue v1beta11.ValueType
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapvalue |= v1beta11.ValueType(b&0x7F) << shift
if b < 0x80 {
break
}
}
} else {
iNdEx = entryPreIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Dimensions[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *InstanceParam) 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 ErrIntOverflowQuotatmplHandlerService
}
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: InstanceParam: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InstanceParam: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Dimensions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Dimensions == nil {
m.Dimensions = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuotatmplHandlerService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Dimensions[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuotatmplHandlerService(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthQuotatmplHandlerService
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuotatmplHandlerService(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, ErrIntOverflowQuotatmplHandlerService
}
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, ErrIntOverflowQuotatmplHandlerService
}
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, ErrIntOverflowQuotatmplHandlerService
}
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, ErrInvalidLengthQuotatmplHandlerService
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthQuotatmplHandlerService
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowQuotatmplHandlerService
}
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 := skipQuotatmplHandlerService(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthQuotatmplHandlerService
}
}
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 (
ErrInvalidLengthQuotatmplHandlerService = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowQuotatmplHandlerService = fmt.Errorf("proto: integer overflow")
)
You can’t perform that action at this time.