pb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_moment_proto protoreflect.FileDescriptor
View Source
var MomentRpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "moment.moment_rpc",
	HandlerType: (*MomentRpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListMoment",
			Handler:    _MomentRpc_ListMoment_Handler,
		},
		{
			MethodName: "CountMoment",
			Handler:    _MomentRpc_CountMoment_Handler,
		},
		{
			MethodName: "RetrieveMoment",
			Handler:    _MomentRpc_RetrieveMoment_Handler,
		},
		{
			MethodName: "CreateMoment",
			Handler:    _MomentRpc_CreateMoment_Handler,
		},
		{
			MethodName: "UpdateMoment",
			Handler:    _MomentRpc_UpdateMoment_Handler,
		},
		{
			MethodName: "DeleteMoment",
			Handler:    _MomentRpc_DeleteMoment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "moment.proto",
}

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

Functions

func RegisterMomentRpcServer

func RegisterMomentRpcServer(s grpc.ServiceRegistrar, srv MomentRpcServer)

Types

type CountMomentReq added in v1.2.0

type CountMomentReq struct {
	SearchOptions *SearchOptions `protobuf:"bytes,1,opt,name=searchOptions,proto3,oneof" json:"searchOptions,omitempty"`
	FilterOptions *FilterOptions `protobuf:"bytes,2,opt,name=filterOptions,proto3,oneof" json:"filterOptions,omitempty"`
	// contains filtered or unexported fields
}

func (*CountMomentReq) Descriptor deprecated added in v1.2.0

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

Deprecated: Use CountMomentReq.ProtoReflect.Descriptor instead.

func (*CountMomentReq) GetFilterOptions added in v1.2.0

func (x *CountMomentReq) GetFilterOptions() *FilterOptions

func (*CountMomentReq) GetSearchOptions added in v1.2.0

func (x *CountMomentReq) GetSearchOptions() *SearchOptions

func (*CountMomentReq) ProtoMessage added in v1.2.0

func (*CountMomentReq) ProtoMessage()

func (*CountMomentReq) ProtoReflect added in v1.2.0

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

func (*CountMomentReq) Reset added in v1.2.0

func (x *CountMomentReq) Reset()

func (*CountMomentReq) String added in v1.2.0

func (x *CountMomentReq) String() string

type CountMomentResp added in v1.2.0

type CountMomentResp struct {
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*CountMomentResp) Descriptor deprecated added in v1.2.0

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

Deprecated: Use CountMomentResp.ProtoReflect.Descriptor instead.

func (*CountMomentResp) GetTotal added in v1.2.0

func (x *CountMomentResp) GetTotal() int64

func (*CountMomentResp) ProtoMessage added in v1.2.0

func (*CountMomentResp) ProtoMessage()

func (*CountMomentResp) ProtoReflect added in v1.2.0

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

func (*CountMomentResp) Reset added in v1.2.0

func (x *CountMomentResp) Reset()

func (*CountMomentResp) String added in v1.2.0

func (x *CountMomentResp) String() string

type CreateMomentReq

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

func (*CreateMomentReq) Descriptor deprecated

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

Deprecated: Use CreateMomentReq.ProtoReflect.Descriptor instead.

func (*CreateMomentReq) GetMoment

func (x *CreateMomentReq) GetMoment() *Moment

func (*CreateMomentReq) ProtoMessage

func (*CreateMomentReq) ProtoMessage()

func (*CreateMomentReq) ProtoReflect

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

func (*CreateMomentReq) Reset

func (x *CreateMomentReq) Reset()

func (*CreateMomentReq) String

func (x *CreateMomentReq) String() string

type CreateMomentResp

type CreateMomentResp struct {
	MomentId string `protobuf:"bytes,1,opt,name=momentId,proto3" json:"momentId,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateMomentResp) Descriptor deprecated

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

Deprecated: Use CreateMomentResp.ProtoReflect.Descriptor instead.

func (*CreateMomentResp) GetMomentId

func (x *CreateMomentResp) GetMomentId() string

func (*CreateMomentResp) ProtoMessage

func (*CreateMomentResp) ProtoMessage()

func (*CreateMomentResp) ProtoReflect

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

func (*CreateMomentResp) Reset

func (x *CreateMomentResp) Reset()

func (*CreateMomentResp) String

func (x *CreateMomentResp) String() string

type DeleteMomentReq

type DeleteMomentReq struct {
	MomentId string `protobuf:"bytes,1,opt,name=momentId,proto3" json:"momentId,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteMomentReq) Descriptor deprecated

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

Deprecated: Use DeleteMomentReq.ProtoReflect.Descriptor instead.

func (*DeleteMomentReq) GetMomentId

func (x *DeleteMomentReq) GetMomentId() string

func (*DeleteMomentReq) ProtoMessage

func (*DeleteMomentReq) ProtoMessage()

func (*DeleteMomentReq) ProtoReflect

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

func (*DeleteMomentReq) Reset

func (x *DeleteMomentReq) Reset()

func (*DeleteMomentReq) String

func (x *DeleteMomentReq) String() string

type DeleteMomentResp

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

func (*DeleteMomentResp) Descriptor deprecated

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

Deprecated: Use DeleteMomentResp.ProtoReflect.Descriptor instead.

func (*DeleteMomentResp) ProtoMessage

func (*DeleteMomentResp) ProtoMessage()

func (*DeleteMomentResp) ProtoReflect

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

func (*DeleteMomentResp) Reset

func (x *DeleteMomentResp) Reset()

func (*DeleteMomentResp) String

func (x *DeleteMomentResp) String() string

type FilterOptions added in v1.2.0

type FilterOptions struct {
	OnlyUserId       *string  `protobuf:"bytes,1,opt,name=onlyUserId,proto3,oneof" json:"onlyUserId,omitempty"`
	OnlyCommunityId  *string  `protobuf:"bytes,2,opt,name=onlyCommunityId,proto3,oneof" json:"onlyCommunityId,omitempty"`
	OnlyCommunityIds []string `protobuf:"bytes,3,rep,name=onlyCommunityIds,proto3" json:"onlyCommunityIds,omitempty"`
	// contains filtered or unexported fields
}

func (*FilterOptions) Descriptor deprecated added in v1.2.0

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

Deprecated: Use FilterOptions.ProtoReflect.Descriptor instead.

func (*FilterOptions) GetOnlyCommunityId added in v1.2.0

func (x *FilterOptions) GetOnlyCommunityId() string

func (*FilterOptions) GetOnlyCommunityIds added in v1.2.0

func (x *FilterOptions) GetOnlyCommunityIds() []string

func (*FilterOptions) GetOnlyUserId added in v1.2.0

func (x *FilterOptions) GetOnlyUserId() string

func (*FilterOptions) ProtoMessage added in v1.2.0

func (*FilterOptions) ProtoMessage()

func (*FilterOptions) ProtoReflect added in v1.2.0

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

func (*FilterOptions) Reset added in v1.2.0

func (x *FilterOptions) Reset()

func (*FilterOptions) String added in v1.2.0

func (x *FilterOptions) String() string

type ListMomentReq

type ListMomentReq struct {
	SearchOptions     *SearchOptions     `protobuf:"bytes,1,opt,name=searchOptions,proto3,oneof" json:"searchOptions,omitempty"`
	FilterOptions     *FilterOptions     `protobuf:"bytes,2,opt,name=filterOptions,proto3,oneof" json:"filterOptions,omitempty"`
	PaginationOptions *PaginationOptions `protobuf:"bytes,3,opt,name=paginationOptions,proto3,oneof" json:"paginationOptions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMomentReq) Descriptor deprecated

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

Deprecated: Use ListMomentReq.ProtoReflect.Descriptor instead.

func (*ListMomentReq) GetFilterOptions added in v1.2.0

func (x *ListMomentReq) GetFilterOptions() *FilterOptions

func (*ListMomentReq) GetPaginationOptions added in v1.2.0

func (x *ListMomentReq) GetPaginationOptions() *PaginationOptions

func (*ListMomentReq) GetSearchOptions added in v1.2.0

func (x *ListMomentReq) GetSearchOptions() *SearchOptions

func (*ListMomentReq) ProtoMessage

func (*ListMomentReq) ProtoMessage()

func (*ListMomentReq) ProtoReflect

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

func (*ListMomentReq) Reset

func (x *ListMomentReq) Reset()

func (*ListMomentReq) String

func (x *ListMomentReq) String() string

type ListMomentResp

type ListMomentResp struct {
	Moments []*Moment `protobuf:"bytes,1,rep,name=moments,proto3" json:"moments,omitempty"`
	Total   int64     `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	Token   string    `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMomentResp) Descriptor deprecated

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

Deprecated: Use ListMomentResp.ProtoReflect.Descriptor instead.

func (*ListMomentResp) GetMoments

func (x *ListMomentResp) GetMoments() []*Moment

func (*ListMomentResp) GetToken added in v1.2.0

func (x *ListMomentResp) GetToken() string

func (*ListMomentResp) GetTotal added in v1.0.8

func (x *ListMomentResp) GetTotal() int64

func (*ListMomentResp) ProtoMessage

func (*ListMomentResp) ProtoMessage()

func (*ListMomentResp) ProtoReflect

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

func (*ListMomentResp) Reset

func (x *ListMomentResp) Reset()

func (*ListMomentResp) String

func (x *ListMomentResp) String() string

type Moment

type Moment struct {
	Id          string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreateAt    int64    `protobuf:"varint,2,opt,name=createAt,proto3" json:"createAt,omitempty"`
	CatId       string   `protobuf:"bytes,3,opt,name=catId,proto3" json:"catId,omitempty"`
	Photos      []string `protobuf:"bytes,4,rep,name=photos,proto3" json:"photos,omitempty"` // 图片url
	Title       string   `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
	Text        string   `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"`
	CommunityId string   `protobuf:"bytes,7,opt,name=communityId,proto3" json:"communityId,omitempty"`
	UserId      string   `protobuf:"bytes,8,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*Moment) Descriptor deprecated

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

Deprecated: Use Moment.ProtoReflect.Descriptor instead.

func (*Moment) GetCatId

func (x *Moment) GetCatId() string

func (*Moment) GetCommunityId

func (x *Moment) GetCommunityId() string

func (*Moment) GetCreateAt

func (x *Moment) GetCreateAt() int64

func (*Moment) GetId

func (x *Moment) GetId() string

func (*Moment) GetPhotos

func (x *Moment) GetPhotos() []string

func (*Moment) GetText

func (x *Moment) GetText() string

func (*Moment) GetTitle

func (x *Moment) GetTitle() string

func (*Moment) GetUserId

func (x *Moment) GetUserId() string

func (*Moment) ProtoMessage

func (*Moment) ProtoMessage()

func (*Moment) ProtoReflect

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

func (*Moment) Reset

func (x *Moment) Reset()

func (*Moment) String

func (x *Moment) String() string

type MomentRpcClient

type MomentRpcClient interface {
	ListMoment(ctx context.Context, in *ListMomentReq, opts ...grpc.CallOption) (*ListMomentResp, error)
	CountMoment(ctx context.Context, in *CountMomentReq, opts ...grpc.CallOption) (*CountMomentResp, error)
	RetrieveMoment(ctx context.Context, in *RetrieveMomentReq, opts ...grpc.CallOption) (*RetrieveMomentResp, error)
	CreateMoment(ctx context.Context, in *CreateMomentReq, opts ...grpc.CallOption) (*CreateMomentResp, error)
	UpdateMoment(ctx context.Context, in *UpdateMomentReq, opts ...grpc.CallOption) (*UpdateMomentResp, error)
	DeleteMoment(ctx context.Context, in *DeleteMomentReq, opts ...grpc.CallOption) (*DeleteMomentResp, error)
}

MomentRpcClient is the client API for MomentRpc 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 NewMomentRpcClient

func NewMomentRpcClient(cc grpc.ClientConnInterface) MomentRpcClient

type MomentRpcServer

type MomentRpcServer interface {
	ListMoment(context.Context, *ListMomentReq) (*ListMomentResp, error)
	CountMoment(context.Context, *CountMomentReq) (*CountMomentResp, error)
	RetrieveMoment(context.Context, *RetrieveMomentReq) (*RetrieveMomentResp, error)
	CreateMoment(context.Context, *CreateMomentReq) (*CreateMomentResp, error)
	UpdateMoment(context.Context, *UpdateMomentReq) (*UpdateMomentResp, error)
	DeleteMoment(context.Context, *DeleteMomentReq) (*DeleteMomentResp, error)
	// contains filtered or unexported methods
}

MomentRpcServer is the server API for MomentRpc service. All implementations must embed UnimplementedMomentRpcServer for forward compatibility

type PaginationOptions added in v1.2.0

type PaginationOptions struct {
	Offset    *int64  `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
	Limit     *int64  `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	Backward  *bool   `protobuf:"varint,3,opt,name=backward,proto3,oneof" json:"backward,omitempty"`
	LastToken *string `protobuf:"bytes,4,opt,name=lastToken,proto3,oneof" json:"lastToken,omitempty"`
	// contains filtered or unexported fields
}

func (*PaginationOptions) Descriptor deprecated added in v1.2.0

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

Deprecated: Use PaginationOptions.ProtoReflect.Descriptor instead.

func (*PaginationOptions) GetBackward added in v1.2.0

func (x *PaginationOptions) GetBackward() bool

func (*PaginationOptions) GetLastToken added in v1.2.0

func (x *PaginationOptions) GetLastToken() string

func (*PaginationOptions) GetLimit added in v1.2.0

func (x *PaginationOptions) GetLimit() int64

func (*PaginationOptions) GetOffset added in v1.2.0

func (x *PaginationOptions) GetOffset() int64

func (*PaginationOptions) ProtoMessage added in v1.2.0

func (*PaginationOptions) ProtoMessage()

func (*PaginationOptions) ProtoReflect added in v1.2.0

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

func (*PaginationOptions) Reset added in v1.2.0

func (x *PaginationOptions) Reset()

func (*PaginationOptions) String added in v1.2.0

func (x *PaginationOptions) String() string

type RetrieveMomentReq

type RetrieveMomentReq struct {
	MomentId string `protobuf:"bytes,1,opt,name=momentId,proto3" json:"momentId,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveMomentReq) Descriptor deprecated

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

Deprecated: Use RetrieveMomentReq.ProtoReflect.Descriptor instead.

func (*RetrieveMomentReq) GetMomentId

func (x *RetrieveMomentReq) GetMomentId() string

func (*RetrieveMomentReq) ProtoMessage

func (*RetrieveMomentReq) ProtoMessage()

func (*RetrieveMomentReq) ProtoReflect

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

func (*RetrieveMomentReq) Reset

func (x *RetrieveMomentReq) Reset()

func (*RetrieveMomentReq) String

func (x *RetrieveMomentReq) String() string

type RetrieveMomentResp

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

func (*RetrieveMomentResp) Descriptor deprecated

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

Deprecated: Use RetrieveMomentResp.ProtoReflect.Descriptor instead.

func (*RetrieveMomentResp) GetMoment

func (x *RetrieveMomentResp) GetMoment() *Moment

func (*RetrieveMomentResp) ProtoMessage

func (*RetrieveMomentResp) ProtoMessage()

func (*RetrieveMomentResp) ProtoReflect

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

func (*RetrieveMomentResp) Reset

func (x *RetrieveMomentResp) Reset()

func (*RetrieveMomentResp) String

func (x *RetrieveMomentResp) String() string

type SearchField added in v1.2.0

type SearchField struct {
	Text  *string `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"`
	Title *string `protobuf:"bytes,2,opt,name=title,proto3,oneof" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchField) Descriptor deprecated added in v1.2.0

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

Deprecated: Use SearchField.ProtoReflect.Descriptor instead.

func (*SearchField) GetText added in v1.2.0

func (x *SearchField) GetText() string

func (*SearchField) GetTitle added in v1.2.0

func (x *SearchField) GetTitle() string

func (*SearchField) ProtoMessage added in v1.2.0

func (*SearchField) ProtoMessage()

func (*SearchField) ProtoReflect added in v1.2.0

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

func (*SearchField) Reset added in v1.2.0

func (x *SearchField) Reset()

func (*SearchField) String added in v1.2.0

func (x *SearchField) String() string

type SearchOptions added in v1.2.0

type SearchOptions struct {

	// Types that are assignable to Type:
	//
	//	*SearchOptions_AllFieldsKey
	//	*SearchOptions_MultiFieldsKey
	Type isSearchOptions_Type `protobuf_oneof:"Type"`
	// contains filtered or unexported fields
}

func (*SearchOptions) Descriptor deprecated added in v1.2.0

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

Deprecated: Use SearchOptions.ProtoReflect.Descriptor instead.

func (*SearchOptions) GetAllFieldsKey added in v1.2.0

func (x *SearchOptions) GetAllFieldsKey() string

func (*SearchOptions) GetMultiFieldsKey added in v1.2.0

func (x *SearchOptions) GetMultiFieldsKey() *SearchField

func (*SearchOptions) GetType added in v1.2.0

func (m *SearchOptions) GetType() isSearchOptions_Type

func (*SearchOptions) ProtoMessage added in v1.2.0

func (*SearchOptions) ProtoMessage()

func (*SearchOptions) ProtoReflect added in v1.2.0

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

func (*SearchOptions) Reset added in v1.2.0

func (x *SearchOptions) Reset()

func (*SearchOptions) String added in v1.2.0

func (x *SearchOptions) String() string

type SearchOptions_AllFieldsKey added in v1.2.0

type SearchOptions_AllFieldsKey struct {
	AllFieldsKey string `protobuf:"bytes,1,opt,name=allFieldsKey,proto3,oneof"`
}

type SearchOptions_MultiFieldsKey added in v1.2.0

type SearchOptions_MultiFieldsKey struct {
	MultiFieldsKey *SearchField `protobuf:"bytes,2,opt,name=multiFieldsKey,proto3,oneof"`
}

type UnimplementedMomentRpcServer

type UnimplementedMomentRpcServer struct {
}

UnimplementedMomentRpcServer must be embedded to have forward compatible implementations.

func (UnimplementedMomentRpcServer) CountMoment added in v1.2.0

func (UnimplementedMomentRpcServer) CreateMoment

func (UnimplementedMomentRpcServer) DeleteMoment

func (UnimplementedMomentRpcServer) ListMoment

func (UnimplementedMomentRpcServer) RetrieveMoment

func (UnimplementedMomentRpcServer) UpdateMoment

type UnsafeMomentRpcServer

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

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

type UpdateMomentReq

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

func (*UpdateMomentReq) Descriptor deprecated

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

Deprecated: Use UpdateMomentReq.ProtoReflect.Descriptor instead.

func (*UpdateMomentReq) GetMoment

func (x *UpdateMomentReq) GetMoment() *Moment

func (*UpdateMomentReq) ProtoMessage

func (*UpdateMomentReq) ProtoMessage()

func (*UpdateMomentReq) ProtoReflect

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

func (*UpdateMomentReq) Reset

func (x *UpdateMomentReq) Reset()

func (*UpdateMomentReq) String

func (x *UpdateMomentReq) String() string

type UpdateMomentResp

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

func (*UpdateMomentResp) Descriptor deprecated

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

Deprecated: Use UpdateMomentResp.ProtoReflect.Descriptor instead.

func (*UpdateMomentResp) ProtoMessage

func (*UpdateMomentResp) ProtoMessage()

func (*UpdateMomentResp) ProtoReflect

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

func (*UpdateMomentResp) Reset

func (x *UpdateMomentResp) Reset()

func (*UpdateMomentResp) String

func (x *UpdateMomentResp) String() string

Jump to

Keyboard shortcuts

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