v1

package
v0.0.0-...-bf60f30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CounterService_AddRecord_FullMethodName       = "/counter.sdk.v1.CounterService/AddRecord"
	CounterService_CancelRecord_FullMethodName    = "/counter.sdk.v1.CounterService/CancelRecord"
	CounterService_GetRecord_FullMethodName       = "/counter.sdk.v1.CounterService/GetRecord"
	CounterService_GetSummary_FullMethodName      = "/counter.sdk.v1.CounterService/GetSummary"
	CounterService_BatchGetSummary_FullMethodName = "/counter.sdk.v1.CounterService/BatchGetSummary"
)

Variables

View Source
var (
	RecordAct_name = map[int32]string{
		0: "RECORD_ACT_UNSPECIFIED",
		1: "RECORD_ACT_ADD",
		2: "RECORD_ACT_UNADD",
	}
	RecordAct_value = map[string]int32{
		"RECORD_ACT_UNSPECIFIED": 0,
		"RECORD_ACT_ADD":         1,
		"RECORD_ACT_UNADD":       2,
	}
)

Enum value maps for RecordAct.

View Source
var CounterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "counter.sdk.v1.CounterService",
	HandlerType: (*CounterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddRecord",
			Handler:    _CounterService_AddRecord_Handler,
		},
		{
			MethodName: "CancelRecord",
			Handler:    _CounterService_CancelRecord_Handler,
		},
		{
			MethodName: "GetRecord",
			Handler:    _CounterService_GetRecord_Handler,
		},
		{
			MethodName: "GetSummary",
			Handler:    _CounterService_GetSummary_Handler,
		},
		{
			MethodName: "BatchGetSummary",
			Handler:    _CounterService_BatchGetSummary_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/counter.proto",
}

CounterService_ServiceDesc is the grpc.ServiceDesc for CounterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_v1_counter_proto protoreflect.FileDescriptor

Functions

func RegisterCounterServiceServer

func RegisterCounterServiceServer(s grpc.ServiceRegistrar, srv CounterServiceServer)

Types

type AddRecordRequest

type AddRecordRequest struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Uid     uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Oid     uint64 `protobuf:"varint,3,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRecordRequest) Descriptor deprecated

func (*AddRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddRecordRequest.ProtoReflect.Descriptor instead.

func (*AddRecordRequest) GetBizCode

func (x *AddRecordRequest) GetBizCode() int32

func (*AddRecordRequest) GetOid

func (x *AddRecordRequest) GetOid() uint64

func (*AddRecordRequest) GetUid

func (x *AddRecordRequest) GetUid() uint64

func (*AddRecordRequest) ProtoMessage

func (*AddRecordRequest) ProtoMessage()

func (*AddRecordRequest) ProtoReflect

func (x *AddRecordRequest) ProtoReflect() protoreflect.Message

func (*AddRecordRequest) Reset

func (x *AddRecordRequest) Reset()

func (*AddRecordRequest) String

func (x *AddRecordRequest) String() string

type AddRecordResponse

type AddRecordResponse struct {
	// contains filtered or unexported fields
}

func (*AddRecordResponse) Descriptor deprecated

func (*AddRecordResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddRecordResponse.ProtoReflect.Descriptor instead.

func (*AddRecordResponse) ProtoMessage

func (*AddRecordResponse) ProtoMessage()

func (*AddRecordResponse) ProtoReflect

func (x *AddRecordResponse) ProtoReflect() protoreflect.Message

func (*AddRecordResponse) Reset

func (x *AddRecordResponse) Reset()

func (*AddRecordResponse) String

func (x *AddRecordResponse) String() string

type BatchGetSummaryRequest

type BatchGetSummaryRequest struct {
	Requests []*GetSummaryRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetSummaryRequest) Descriptor deprecated

func (*BatchGetSummaryRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchGetSummaryRequest.ProtoReflect.Descriptor instead.

func (*BatchGetSummaryRequest) GetRequests

func (x *BatchGetSummaryRequest) GetRequests() []*GetSummaryRequest

func (*BatchGetSummaryRequest) ProtoMessage

func (*BatchGetSummaryRequest) ProtoMessage()

func (*BatchGetSummaryRequest) ProtoReflect

func (x *BatchGetSummaryRequest) ProtoReflect() protoreflect.Message

func (*BatchGetSummaryRequest) Reset

func (x *BatchGetSummaryRequest) Reset()

func (*BatchGetSummaryRequest) String

func (x *BatchGetSummaryRequest) String() string

type BatchGetSummaryResponse

type BatchGetSummaryResponse struct {
	Responses []*GetSummaryResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetSummaryResponse) Descriptor deprecated

func (*BatchGetSummaryResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchGetSummaryResponse.ProtoReflect.Descriptor instead.

func (*BatchGetSummaryResponse) GetResponses

func (x *BatchGetSummaryResponse) GetResponses() []*GetSummaryResponse

func (*BatchGetSummaryResponse) ProtoMessage

func (*BatchGetSummaryResponse) ProtoMessage()

func (*BatchGetSummaryResponse) ProtoReflect

func (x *BatchGetSummaryResponse) ProtoReflect() protoreflect.Message

func (*BatchGetSummaryResponse) Reset

func (x *BatchGetSummaryResponse) Reset()

func (*BatchGetSummaryResponse) String

func (x *BatchGetSummaryResponse) String() string

type CancelRecordRequest

type CancelRecordRequest struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Uid     uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Oid     uint64 `protobuf:"varint,3,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelRecordRequest) Descriptor deprecated

func (*CancelRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelRecordRequest.ProtoReflect.Descriptor instead.

func (*CancelRecordRequest) GetBizCode

func (x *CancelRecordRequest) GetBizCode() int32

func (*CancelRecordRequest) GetOid

func (x *CancelRecordRequest) GetOid() uint64

func (*CancelRecordRequest) GetUid

func (x *CancelRecordRequest) GetUid() uint64

func (*CancelRecordRequest) ProtoMessage

func (*CancelRecordRequest) ProtoMessage()

func (*CancelRecordRequest) ProtoReflect

func (x *CancelRecordRequest) ProtoReflect() protoreflect.Message

func (*CancelRecordRequest) Reset

func (x *CancelRecordRequest) Reset()

func (*CancelRecordRequest) String

func (x *CancelRecordRequest) String() string

type CancelRecordResponse

type CancelRecordResponse struct {
	// contains filtered or unexported fields
}

func (*CancelRecordResponse) Descriptor deprecated

func (*CancelRecordResponse) Descriptor() ([]byte, []int)

Deprecated: Use CancelRecordResponse.ProtoReflect.Descriptor instead.

func (*CancelRecordResponse) ProtoMessage

func (*CancelRecordResponse) ProtoMessage()

func (*CancelRecordResponse) ProtoReflect

func (x *CancelRecordResponse) ProtoReflect() protoreflect.Message

func (*CancelRecordResponse) Reset

func (x *CancelRecordResponse) Reset()

func (*CancelRecordResponse) String

func (x *CancelRecordResponse) String() string

type CounterServiceClient

type CounterServiceClient interface {
	// 添加一条计数记录
	AddRecord(ctx context.Context, in *AddRecordRequest, opts ...grpc.CallOption) (*AddRecordResponse, error)
	// 取消计数记录
	CancelRecord(ctx context.Context, in *CancelRecordRequest, opts ...grpc.CallOption) (*CancelRecordResponse, error)
	// 获取一条计数记录
	GetRecord(ctx context.Context, in *GetRecordRequest, opts ...grpc.CallOption) (*GetRecordResponse, error)
	// 获取oid计数总数
	GetSummary(ctx context.Context, in *GetSummaryRequest, opts ...grpc.CallOption) (*GetSummaryResponse, error)
	// 批量获取oid计数总数
	BatchGetSummary(ctx context.Context, in *BatchGetSummaryRequest, opts ...grpc.CallOption) (*BatchGetSummaryResponse, error)
}

CounterServiceClient is the client API for CounterService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CounterServiceServer

type CounterServiceServer interface {
	// 添加一条计数记录
	AddRecord(context.Context, *AddRecordRequest) (*AddRecordResponse, error)
	// 取消计数记录
	CancelRecord(context.Context, *CancelRecordRequest) (*CancelRecordResponse, error)
	// 获取一条计数记录
	GetRecord(context.Context, *GetRecordRequest) (*GetRecordResponse, error)
	// 获取oid计数总数
	GetSummary(context.Context, *GetSummaryRequest) (*GetSummaryResponse, error)
	// 批量获取oid计数总数
	BatchGetSummary(context.Context, *BatchGetSummaryRequest) (*BatchGetSummaryResponse, error)
	// contains filtered or unexported methods
}

CounterServiceServer is the server API for CounterService service. All implementations must embed UnimplementedCounterServiceServer for forward compatibility.

type DelRecordRequest

type DelRecordRequest struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Uid     uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Oid     uint64 `protobuf:"varint,3,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRecordRequest) Descriptor deprecated

func (*DelRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use DelRecordRequest.ProtoReflect.Descriptor instead.

func (*DelRecordRequest) GetBizCode

func (x *DelRecordRequest) GetBizCode() int32

func (*DelRecordRequest) GetOid

func (x *DelRecordRequest) GetOid() uint64

func (*DelRecordRequest) GetUid

func (x *DelRecordRequest) GetUid() uint64

func (*DelRecordRequest) ProtoMessage

func (*DelRecordRequest) ProtoMessage()

func (*DelRecordRequest) ProtoReflect

func (x *DelRecordRequest) ProtoReflect() protoreflect.Message

func (*DelRecordRequest) Reset

func (x *DelRecordRequest) Reset()

func (*DelRecordRequest) String

func (x *DelRecordRequest) String() string

type DelRecordResponse

type DelRecordResponse struct {
	// contains filtered or unexported fields
}

func (*DelRecordResponse) Descriptor deprecated

func (*DelRecordResponse) Descriptor() ([]byte, []int)

Deprecated: Use DelRecordResponse.ProtoReflect.Descriptor instead.

func (*DelRecordResponse) ProtoMessage

func (*DelRecordResponse) ProtoMessage()

func (*DelRecordResponse) ProtoReflect

func (x *DelRecordResponse) ProtoReflect() protoreflect.Message

func (*DelRecordResponse) Reset

func (x *DelRecordResponse) Reset()

func (*DelRecordResponse) String

func (x *DelRecordResponse) String() string

type GetRecordRequest

type GetRecordRequest struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Uid     uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Oid     uint64 `protobuf:"varint,3,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordRequest) Descriptor deprecated

func (*GetRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRecordRequest.ProtoReflect.Descriptor instead.

func (*GetRecordRequest) GetBizCode

func (x *GetRecordRequest) GetBizCode() int32

func (*GetRecordRequest) GetOid

func (x *GetRecordRequest) GetOid() uint64

func (*GetRecordRequest) GetUid

func (x *GetRecordRequest) GetUid() uint64

func (*GetRecordRequest) ProtoMessage

func (*GetRecordRequest) ProtoMessage()

func (*GetRecordRequest) ProtoReflect

func (x *GetRecordRequest) ProtoReflect() protoreflect.Message

func (*GetRecordRequest) Reset

func (x *GetRecordRequest) Reset()

func (*GetRecordRequest) String

func (x *GetRecordRequest) String() string

type GetRecordResponse

type GetRecordResponse struct {
	Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordResponse) Descriptor deprecated

func (*GetRecordResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetRecordResponse.ProtoReflect.Descriptor instead.

func (*GetRecordResponse) GetRecord

func (x *GetRecordResponse) GetRecord() *Record

func (*GetRecordResponse) ProtoMessage

func (*GetRecordResponse) ProtoMessage()

func (*GetRecordResponse) ProtoReflect

func (x *GetRecordResponse) ProtoReflect() protoreflect.Message

func (*GetRecordResponse) Reset

func (x *GetRecordResponse) Reset()

func (*GetRecordResponse) String

func (x *GetRecordResponse) String() string

type GetSummaryRequest

type GetSummaryRequest struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Oid     uint64 `protobuf:"varint,2,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSummaryRequest) Descriptor deprecated

func (*GetSummaryRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetSummaryRequest.ProtoReflect.Descriptor instead.

func (*GetSummaryRequest) GetBizCode

func (x *GetSummaryRequest) GetBizCode() int32

func (*GetSummaryRequest) GetOid

func (x *GetSummaryRequest) GetOid() uint64

func (*GetSummaryRequest) ProtoMessage

func (*GetSummaryRequest) ProtoMessage()

func (*GetSummaryRequest) ProtoReflect

func (x *GetSummaryRequest) ProtoReflect() protoreflect.Message

func (*GetSummaryRequest) Reset

func (x *GetSummaryRequest) Reset()

func (*GetSummaryRequest) String

func (x *GetSummaryRequest) String() string

type GetSummaryResponse

type GetSummaryResponse struct {
	BizCode int32  `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Oid     uint64 `protobuf:"varint,2,opt,name=oid,proto3" json:"oid,omitempty"`
	Count   uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSummaryResponse) Descriptor deprecated

func (*GetSummaryResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetSummaryResponse.ProtoReflect.Descriptor instead.

func (*GetSummaryResponse) GetBizCode

func (x *GetSummaryResponse) GetBizCode() int32

func (*GetSummaryResponse) GetCount

func (x *GetSummaryResponse) GetCount() uint64

func (*GetSummaryResponse) GetOid

func (x *GetSummaryResponse) GetOid() uint64

func (*GetSummaryResponse) ProtoMessage

func (*GetSummaryResponse) ProtoMessage()

func (*GetSummaryResponse) ProtoReflect

func (x *GetSummaryResponse) ProtoReflect() protoreflect.Message

func (*GetSummaryResponse) Reset

func (x *GetSummaryResponse) Reset()

func (*GetSummaryResponse) String

func (x *GetSummaryResponse) String() string

type Record

type Record struct {
	BizCode int32     `protobuf:"varint,1,opt,name=biz_code,json=bizCode,proto3" json:"biz_code,omitempty"`
	Uid     uint64    `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Oid     uint64    `protobuf:"varint,3,opt,name=oid,proto3" json:"oid,omitempty"`
	Act     RecordAct `protobuf:"varint,4,opt,name=act,proto3,enum=counter.sdk.v1.RecordAct" json:"act,omitempty"`
	Ctime   int64     `protobuf:"varint,5,opt,name=ctime,proto3" json:"ctime,omitempty"`
	Mtime   int64     `protobuf:"varint,6,opt,name=mtime,proto3" json:"mtime,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

func (*Record) Descriptor() ([]byte, []int)

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetAct

func (x *Record) GetAct() RecordAct

func (*Record) GetBizCode

func (x *Record) GetBizCode() int32

func (*Record) GetCtime

func (x *Record) GetCtime() int64

func (*Record) GetMtime

func (x *Record) GetMtime() int64

func (*Record) GetOid

func (x *Record) GetOid() uint64

func (*Record) GetUid

func (x *Record) GetUid() uint64

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type RecordAct

type RecordAct int32
const (
	RecordAct_RECORD_ACT_UNSPECIFIED RecordAct = 0
	RecordAct_RECORD_ACT_ADD         RecordAct = 1
	RecordAct_RECORD_ACT_UNADD       RecordAct = 2
)

func (RecordAct) Descriptor

func (RecordAct) Descriptor() protoreflect.EnumDescriptor

func (RecordAct) Enum

func (x RecordAct) Enum() *RecordAct

func (RecordAct) EnumDescriptor deprecated

func (RecordAct) EnumDescriptor() ([]byte, []int)

Deprecated: Use RecordAct.Descriptor instead.

func (RecordAct) Number

func (x RecordAct) Number() protoreflect.EnumNumber

func (RecordAct) String

func (x RecordAct) String() string

func (RecordAct) Type

type UnimplementedCounterServiceServer

type UnimplementedCounterServiceServer struct{}

UnimplementedCounterServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCounterServiceServer) AddRecord

func (UnimplementedCounterServiceServer) BatchGetSummary

func (UnimplementedCounterServiceServer) CancelRecord

func (UnimplementedCounterServiceServer) GetRecord

func (UnimplementedCounterServiceServer) GetSummary

type UnsafeCounterServiceServer

type UnsafeCounterServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCounterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CounterServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL