creatorspb

package
v0.0.0-...-6d4b249 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Creators_MostActiveCreators_FullMethodName = "/creatorspb.Creators/MostActiveCreators"
)

Variables

View Source
var Creators_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "creatorspb.Creators",
	HandlerType: (*CreatorsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MostActiveCreators",
			Handler:    _Creators_MostActiveCreators_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "creators.proto",
}

Creators_ServiceDesc is the grpc.ServiceDesc for Creators 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_creators_proto protoreflect.FileDescriptor

Functions

func RegisterCreatorsServer

func RegisterCreatorsServer(s grpc.ServiceRegistrar, srv CreatorsServer)

Types

type Creator

type Creator struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*Creator) Descriptor deprecated

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

Deprecated: Use Creator.ProtoReflect.Descriptor instead.

func (*Creator) GetEmail

func (x *Creator) GetEmail() string

func (*Creator) GetId

func (x *Creator) GetId() string

func (*Creator) ProtoMessage

func (*Creator) ProtoMessage()

func (*Creator) ProtoReflect

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

func (*Creator) Reset

func (x *Creator) Reset()

func (*Creator) String

func (x *Creator) String() string

type CreatorStats

type CreatorStats struct {
	Creator *Creator `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// The number of products created by this creator
	ProductCount int32 `protobuf:"varint,2,opt,name=productCount,proto3" json:"productCount,omitempty"`
	// The createTime of the product this creator most recently created.
	MostRecentCreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=mostRecentCreateTime,proto3" json:"mostRecentCreateTime,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatorStats) Descriptor deprecated

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

Deprecated: Use CreatorStats.ProtoReflect.Descriptor instead.

func (*CreatorStats) GetCreator

func (x *CreatorStats) GetCreator() *Creator

func (*CreatorStats) GetMostRecentCreateTime

func (x *CreatorStats) GetMostRecentCreateTime() *timestamppb.Timestamp

func (*CreatorStats) GetProductCount

func (x *CreatorStats) GetProductCount() int32

func (*CreatorStats) ProtoMessage

func (*CreatorStats) ProtoMessage()

func (*CreatorStats) ProtoReflect

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

func (*CreatorStats) Reset

func (x *CreatorStats) Reset()

func (*CreatorStats) String

func (x *CreatorStats) String() string

type CreatorsClient

type CreatorsClient interface {
	// Returns stats about the given creators, ordered by activity with the most active creator first.
	MostActiveCreators(ctx context.Context, in *MostActiveCreatorsReq, opts ...grpc.CallOption) (*MostActiveCreatorsRes, error)
}

CreatorsClient is the client API for Creators 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.

Interface exported by the server. Note that this is an internal-facing API, so validation is not done by the server. Fields passed in requests should already have been validated. Additionally, validation will be done on the db layer when data is persisted.

func NewCreatorsClient

func NewCreatorsClient(cc grpc.ClientConnInterface) CreatorsClient

type CreatorsServer

type CreatorsServer interface {
	// Returns stats about the given creators, ordered by activity with the most active creator first.
	MostActiveCreators(context.Context, *MostActiveCreatorsReq) (*MostActiveCreatorsRes, error)
	// contains filtered or unexported methods
}

CreatorsServer is the server API for Creators service. All implementations must embed UnimplementedCreatorsServer for forward compatibility

Interface exported by the server. Note that this is an internal-facing API, so validation is not done by the server. Fields passed in requests should already have been validated. Additionally, validation will be done on the db layer when data is persisted.

type MostActiveCreatorsReq

type MostActiveCreatorsReq struct {
	Creators []*Creator `protobuf:"bytes,1,rep,name=creators,proto3" json:"creators,omitempty"`
	Products []*Product `protobuf:"bytes,2,rep,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func ToProto

func ToProto(in types.Data) *MostActiveCreatorsReq

func (*MostActiveCreatorsReq) Descriptor deprecated

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

Deprecated: Use MostActiveCreatorsReq.ProtoReflect.Descriptor instead.

func (*MostActiveCreatorsReq) GetCreators

func (x *MostActiveCreatorsReq) GetCreators() []*Creator

func (*MostActiveCreatorsReq) GetProducts

func (x *MostActiveCreatorsReq) GetProducts() []*Product

func (*MostActiveCreatorsReq) ProtoMessage

func (*MostActiveCreatorsReq) ProtoMessage()

func (*MostActiveCreatorsReq) ProtoReflect

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

func (*MostActiveCreatorsReq) Reset

func (x *MostActiveCreatorsReq) Reset()

func (*MostActiveCreatorsReq) String

func (x *MostActiveCreatorsReq) String() string

type MostActiveCreatorsRes

type MostActiveCreatorsRes struct {

	// List is ordered by activity with the most active creator first.
	CreatorStats []*CreatorStats `protobuf:"bytes,1,rep,name=creatorStats,proto3" json:"creatorStats,omitempty"`
	// contains filtered or unexported fields
}

func (*MostActiveCreatorsRes) Descriptor deprecated

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

Deprecated: Use MostActiveCreatorsRes.ProtoReflect.Descriptor instead.

func (*MostActiveCreatorsRes) GetCreatorStats

func (x *MostActiveCreatorsRes) GetCreatorStats() []*CreatorStats

func (*MostActiveCreatorsRes) ProtoMessage

func (*MostActiveCreatorsRes) ProtoMessage()

func (*MostActiveCreatorsRes) ProtoReflect

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

func (*MostActiveCreatorsRes) Reset

func (x *MostActiveCreatorsRes) Reset()

func (*MostActiveCreatorsRes) String

func (x *MostActiveCreatorsRes) String() string

type Product

type Product struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatorId  string                 `protobuf:"bytes,2,opt,name=creatorId,proto3" json:"creatorId,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetCreateTime

func (x *Product) GetCreateTime() *timestamppb.Timestamp

func (*Product) GetCreatorId

func (x *Product) GetCreatorId() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

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

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

type UnimplementedCreatorsServer

type UnimplementedCreatorsServer struct {
}

UnimplementedCreatorsServer must be embedded to have forward compatible implementations.

func (UnimplementedCreatorsServer) MostActiveCreators

type UnsafeCreatorsServer

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

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

Jump to

Keyboard shortcuts

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