api

package
v0.0.0-...-a186e49 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetRequest_EVENT_TYPE_name = map[int32]string{
		0: "watch",
		1: "scroll",
	}
	SetRequest_EVENT_TYPE_value = map[string]int32{
		"watch":  0,
		"scroll": 1,
	}
)

Enum value maps for SetRequest_EVENT_TYPE.

View Source
var File_api_api_proto protoreflect.FileDescriptor
View Source
var Head_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "head.head",
	HandlerType: (*HeadServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _Head_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Head_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/api.proto",
}

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

Functions

func RegisterHeadServer

func RegisterHeadServer(s grpc.ServiceRegistrar, srv HeadServer)

Types

type GetReply

type GetReply struct {
	VideoTime uint32 `protobuf:"varint,1,opt,name=video_time,json=videoTime,proto3" json:"video_time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReply) Descriptor deprecated

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

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetVideoTime

func (x *GetReply) GetVideoTime() uint32

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

type GetRequest

type GetRequest struct {
	UserId  uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	VideoId uint32 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetUserId

func (x *GetRequest) GetUserId() uint32

func (*GetRequest) GetVideoId

func (x *GetRequest) GetVideoId() uint32

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type HeadClient

type HeadClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetReply, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}

HeadClient is the client API for Head 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.

func NewHeadClient

func NewHeadClient(cc grpc.ClientConnInterface) HeadClient

type HeadServer

type HeadServer interface {
	Set(context.Context, *SetRequest) (*SetReply, error)
	Get(context.Context, *GetRequest) (*GetReply, error)
	// contains filtered or unexported methods
}

HeadServer is the server API for Head service. All implementations must embed UnimplementedHeadServer for forward compatibility

type SetReply

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

func (*SetReply) Descriptor deprecated

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

Deprecated: Use SetReply.ProtoReflect.Descriptor instead.

func (*SetReply) ProtoMessage

func (*SetReply) ProtoMessage()

func (*SetReply) ProtoReflect

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

func (*SetReply) Reset

func (x *SetReply) Reset()

func (*SetReply) String

func (x *SetReply) String() string

type SetRequest

type SetRequest struct {
	UserId    uint32                 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	EventTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
	EventType SetRequest_EVENT_TYPE  `protobuf:"varint,3,opt,name=event_type,json=eventType,proto3,enum=head.SetRequest_EVENT_TYPE" json:"event_type,omitempty"`
	VideoId   uint32                 `protobuf:"varint,4,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"`
	VideoTime uint32                 `protobuf:"varint,5,opt,name=video_time,json=videoTime,proto3" json:"video_time,omitempty"` // in seconds
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetEventTime

func (x *SetRequest) GetEventTime() *timestamppb.Timestamp

func (*SetRequest) GetEventType

func (x *SetRequest) GetEventType() SetRequest_EVENT_TYPE

func (*SetRequest) GetUserId

func (x *SetRequest) GetUserId() uint32

func (*SetRequest) GetVideoId

func (x *SetRequest) GetVideoId() uint32

func (*SetRequest) GetVideoTime

func (x *SetRequest) GetVideoTime() uint32

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SetRequest_EVENT_TYPE

type SetRequest_EVENT_TYPE int32
const (
	SetRequest_watch  SetRequest_EVENT_TYPE = 0
	SetRequest_scroll SetRequest_EVENT_TYPE = 1
)

func (SetRequest_EVENT_TYPE) Descriptor

func (SetRequest_EVENT_TYPE) Enum

func (SetRequest_EVENT_TYPE) EnumDescriptor deprecated

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

Deprecated: Use SetRequest_EVENT_TYPE.Descriptor instead.

func (SetRequest_EVENT_TYPE) Number

func (SetRequest_EVENT_TYPE) String

func (x SetRequest_EVENT_TYPE) String() string

func (SetRequest_EVENT_TYPE) Type

type UnimplementedHeadServer

type UnimplementedHeadServer struct {
}

UnimplementedHeadServer must be embedded to have forward compatible implementations.

func (UnimplementedHeadServer) Get

func (UnimplementedHeadServer) Set

type UnsafeHeadServer

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

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

Jump to

Keyboard shortcuts

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