v1

package
v0.2.45 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StreakType_name = map[int32]string{
		0: "STREAK_UNSPECIFIED",
		1: "STREAK_LOGIN",
		2: "STREAK_POST",
		3: "STREAK_CHAT",
		4: "STREAK_COMMENT",
		5: "STREAK_ALL",
	}
	StreakType_value = map[string]int32{
		"STREAK_UNSPECIFIED": 0,
		"STREAK_LOGIN":       1,
		"STREAK_POST":        2,
		"STREAK_CHAT":        3,
		"STREAK_COMMENT":     4,
		"STREAK_ALL":         5,
	}
)

Enum value maps for StreakType.

View Source
var File_streak_api_streak_v1_streak_proto protoreflect.FileDescriptor
View Source
var StreakService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "streak.v1.StreakService",
	HandlerType: (*StreakServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpsertStreak",
			Handler:    _StreakService_UpsertStreak_Handler,
		},
		{
			MethodName: "CheckStreak",
			Handler:    _StreakService_CheckStreak_Handler,
		},
		{
			MethodName: "GetStreaksHistory",
			Handler:    _StreakService_GetStreaksHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "streak-api/streak/v1/streak.proto",
}

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

Functions

func RegisterStreakServiceServer

func RegisterStreakServiceServer(s grpc.ServiceRegistrar, srv StreakServiceServer)

Types

type CheckStreakRequest

type CheckStreakRequest struct {
	Type StreakType `protobuf:"varint,1,opt,name=type,proto3,enum=streak.v1.StreakType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckStreakRequest) Descriptor deprecated

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

Deprecated: Use CheckStreakRequest.ProtoReflect.Descriptor instead.

func (*CheckStreakRequest) GetType

func (x *CheckStreakRequest) GetType() StreakType

func (*CheckStreakRequest) ProtoMessage

func (*CheckStreakRequest) ProtoMessage()

func (*CheckStreakRequest) ProtoReflect

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

func (*CheckStreakRequest) Reset

func (x *CheckStreakRequest) Reset()

func (*CheckStreakRequest) String

func (x *CheckStreakRequest) String() string

type CheckStreakResponse

type CheckStreakResponse struct {
	Streak *Streak `protobuf:"bytes,1,opt,name=streak,proto3" json:"streak,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckStreakResponse) Descriptor deprecated

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

Deprecated: Use CheckStreakResponse.ProtoReflect.Descriptor instead.

func (*CheckStreakResponse) GetStreak

func (x *CheckStreakResponse) GetStreak() *Streak

func (*CheckStreakResponse) ProtoMessage

func (*CheckStreakResponse) ProtoMessage()

func (*CheckStreakResponse) ProtoReflect

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

func (*CheckStreakResponse) Reset

func (x *CheckStreakResponse) Reset()

func (*CheckStreakResponse) String

func (x *CheckStreakResponse) String() string

type GetStreaksHistoryRequest

type GetStreaksHistoryRequest struct {
	Type StreakType `protobuf:"varint,1,opt,name=type,proto3,enum=streak.v1.StreakType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStreaksHistoryRequest) Descriptor deprecated

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

Deprecated: Use GetStreaksHistoryRequest.ProtoReflect.Descriptor instead.

func (*GetStreaksHistoryRequest) GetType

func (x *GetStreaksHistoryRequest) GetType() StreakType

func (*GetStreaksHistoryRequest) ProtoMessage

func (*GetStreaksHistoryRequest) ProtoMessage()

func (*GetStreaksHistoryRequest) ProtoReflect

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

func (*GetStreaksHistoryRequest) Reset

func (x *GetStreaksHistoryRequest) Reset()

func (*GetStreaksHistoryRequest) String

func (x *GetStreaksHistoryRequest) String() string

type GetStreaksHistoryResponse

type GetStreaksHistoryResponse struct {
	Streaks  []*Streak          `protobuf:"bytes,1,rep,name=streaks,proto3" json:"streaks,omitempty"`
	PageInfo *protobuf.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStreaksHistoryResponse) Descriptor deprecated

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

Deprecated: Use GetStreaksHistoryResponse.ProtoReflect.Descriptor instead.

func (*GetStreaksHistoryResponse) GetPageInfo

func (x *GetStreaksHistoryResponse) GetPageInfo() *protobuf.PageInfo

func (*GetStreaksHistoryResponse) GetStreaks

func (x *GetStreaksHistoryResponse) GetStreaks() []*Streak

func (*GetStreaksHistoryResponse) ProtoMessage

func (*GetStreaksHistoryResponse) ProtoMessage()

func (*GetStreaksHistoryResponse) ProtoReflect

func (*GetStreaksHistoryResponse) Reset

func (x *GetStreaksHistoryResponse) Reset()

func (*GetStreaksHistoryResponse) String

func (x *GetStreaksHistoryResponse) String() string

type Streak

type Streak struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	UserId    string                 `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Type      StreakType             `protobuf:"varint,3,opt,name=type,proto3,enum=streak.v1.StreakType" json:"type,omitempty"`
	Counter   int64                  `protobuf:"varint,4,opt,name=counter,proto3" json:"counter,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	HoursLeft float32                `protobuf:"fixed32,6,opt,name=hours_left,json=hoursLeft,proto3" json:"hours_left,omitempty"`
	// contains filtered or unexported fields
}

func (*Streak) Descriptor deprecated

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

Deprecated: Use Streak.ProtoReflect.Descriptor instead.

func (*Streak) GetCounter

func (x *Streak) GetCounter() int64

func (*Streak) GetHoursLeft

func (x *Streak) GetHoursLeft() float32

func (*Streak) GetId

func (x *Streak) GetId() string

func (*Streak) GetType

func (x *Streak) GetType() StreakType

func (*Streak) GetUpdatedAt

func (x *Streak) GetUpdatedAt() *timestamppb.Timestamp

func (*Streak) GetUserId

func (x *Streak) GetUserId() string

func (*Streak) ProtoMessage

func (*Streak) ProtoMessage()

func (*Streak) ProtoReflect

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

func (*Streak) Reset

func (x *Streak) Reset()

func (*Streak) String

func (x *Streak) String() string

type StreakServiceClient

type StreakServiceClient interface {
	UpsertStreak(ctx context.Context, in *UpsertStreakRequest, opts ...grpc.CallOption) (*UpsertStreakResponse, error)
	CheckStreak(ctx context.Context, in *CheckStreakRequest, opts ...grpc.CallOption) (*CheckStreakResponse, error)
	GetStreaksHistory(ctx context.Context, in *GetStreaksHistoryRequest, opts ...grpc.CallOption) (*GetStreaksHistoryResponse, error)
}

StreakServiceClient is the client API for StreakService 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 StreakServiceServer

type StreakServiceServer interface {
	UpsertStreak(context.Context, *UpsertStreakRequest) (*UpsertStreakResponse, error)
	CheckStreak(context.Context, *CheckStreakRequest) (*CheckStreakResponse, error)
	GetStreaksHistory(context.Context, *GetStreaksHistoryRequest) (*GetStreaksHistoryResponse, error)
	// contains filtered or unexported methods
}

StreakServiceServer is the server API for StreakService service. All implementations must embed UnimplementedStreakServiceServer for forward compatibility

type StreakType

type StreakType int32
const (
	StreakType_STREAK_UNSPECIFIED StreakType = 0
	StreakType_STREAK_LOGIN       StreakType = 1
	StreakType_STREAK_POST        StreakType = 2
	StreakType_STREAK_CHAT        StreakType = 3
	StreakType_STREAK_COMMENT     StreakType = 4
	StreakType_STREAK_ALL         StreakType = 5
)

func (StreakType) Descriptor

func (StreakType) Descriptor() protoreflect.EnumDescriptor

func (StreakType) Enum

func (x StreakType) Enum() *StreakType

func (StreakType) EnumDescriptor deprecated

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

Deprecated: Use StreakType.Descriptor instead.

func (StreakType) Number

func (x StreakType) Number() protoreflect.EnumNumber

func (StreakType) String

func (x StreakType) String() string

func (StreakType) Type

type UnimplementedStreakServiceServer

type UnimplementedStreakServiceServer struct {
}

UnimplementedStreakServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStreakServiceServer) CheckStreak

func (UnimplementedStreakServiceServer) GetStreaksHistory

func (UnimplementedStreakServiceServer) UpsertStreak

type UnsafeStreakServiceServer

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

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

type UpsertStreakRequest

type UpsertStreakRequest struct {
	Type StreakType `protobuf:"varint,2,opt,name=type,proto3,enum=streak.v1.StreakType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertStreakRequest) Descriptor deprecated

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

Deprecated: Use UpsertStreakRequest.ProtoReflect.Descriptor instead.

func (*UpsertStreakRequest) GetType

func (x *UpsertStreakRequest) GetType() StreakType

func (*UpsertStreakRequest) ProtoMessage

func (*UpsertStreakRequest) ProtoMessage()

func (*UpsertStreakRequest) ProtoReflect

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

func (*UpsertStreakRequest) Reset

func (x *UpsertStreakRequest) Reset()

func (*UpsertStreakRequest) String

func (x *UpsertStreakRequest) String() string

type UpsertStreakResponse

type UpsertStreakResponse struct {
	Counter int64      `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"`
	Type    StreakType `protobuf:"varint,2,opt,name=type,proto3,enum=streak.v1.StreakType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertStreakResponse) Descriptor deprecated

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

Deprecated: Use UpsertStreakResponse.ProtoReflect.Descriptor instead.

func (*UpsertStreakResponse) GetCounter

func (x *UpsertStreakResponse) GetCounter() int64

func (*UpsertStreakResponse) GetType

func (x *UpsertStreakResponse) GetType() StreakType

func (*UpsertStreakResponse) ProtoMessage

func (*UpsertStreakResponse) ProtoMessage()

func (*UpsertStreakResponse) ProtoReflect

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

func (*UpsertStreakResponse) Reset

func (x *UpsertStreakResponse) Reset()

func (*UpsertStreakResponse) String

func (x *UpsertStreakResponse) String() string

Jump to

Keyboard shortcuts

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