Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterLinkCommandServiceServer(s grpc.ServiceRegistrar, srv LinkCommandServiceServer)
- func RegisterLinkQueryServiceServer(s grpc.ServiceRegistrar, srv LinkQueryServiceServer)
- type AddRequest
- type AddResponse
- type DeleteRequest
- type GetRequest
- type GetResponse
- type Link
- func (*Link) Descriptor() ([]byte, []int)deprecated
- func (x *Link) GetCreatedAt() *timestamppb.Timestamp
- func (x *Link) GetDescribe() string
- func (x *Link) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *Link) GetHash() string
- func (x *Link) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Link) GetUrl() string
- func (*Link) ProtoMessage()
- func (x *Link) ProtoReflect() protoreflect.Message
- func (x *Link) Reset()
- func (x *Link) String() string
- type LinkCommandServiceClient
- type LinkCommandServiceServer
- type LinkQueryServiceClient
- type LinkQueryServiceServer
- type LinkRPC
- type LinkView
- func (*LinkView) Descriptor() ([]byte, []int)deprecated
- func (x *LinkView) GetCreatedAt() *timestamppb.Timestamp
- func (x *LinkView) GetDescribe() string
- func (x *LinkView) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *LinkView) GetHash() string
- func (x *LinkView) GetImageUrl() string
- func (x *LinkView) GetMetaDescription() string
- func (x *LinkView) GetMetaKeywords() string
- func (x *LinkView) GetUpdatedAt() *timestamppb.Timestamp
- func (x *LinkView) GetUrl() string
- func (*LinkView) ProtoMessage()
- func (x *LinkView) ProtoReflect() protoreflect.Message
- func (x *LinkView) Reset()
- func (x *LinkView) String() string
- type LinksView
- type ListRequest
- type ListResponse
- type UnimplementedLinkCommandServiceServer
- func (UnimplementedLinkCommandServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (UnimplementedLinkCommandServiceServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedLinkCommandServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnimplementedLinkQueryServiceServer
- type UnsafeLinkCommandServiceServer
- type UnsafeLinkQueryServiceServer
- type UpdateRequest
- type UpdateResponse
Constants ¶
const ( LinkCommandService_Add_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkCommandService/Add" LinkCommandService_Update_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkCommandService/Update" LinkCommandService_Delete_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkCommandService/Delete" )
const ( LinkQueryService_Get_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkQueryService/Get" LinkQueryService_List_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkQueryService/List" )
Variables ¶
var File_infrastructure_rpc_cqrs_link_v1_link_command_proto protoreflect.FileDescriptor
var File_infrastructure_rpc_cqrs_link_v1_link_proto protoreflect.FileDescriptor
var File_infrastructure_rpc_cqrs_link_v1_link_query_proto protoreflect.FileDescriptor
var LinkCommandService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infrastructure.rpc.cqrs.link.v1.LinkCommandService", HandlerType: (*LinkCommandServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _LinkCommandService_Add_Handler, }, { MethodName: "Update", Handler: _LinkCommandService_Update_Handler, }, { MethodName: "Delete", Handler: _LinkCommandService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "infrastructure/rpc/cqrs/link/v1/link_command.proto", }
LinkCommandService_ServiceDesc is the grpc.ServiceDesc for LinkCommandService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var LinkQueryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infrastructure.rpc.cqrs.link.v1.LinkQueryService", HandlerType: (*LinkQueryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _LinkQueryService_Get_Handler, }, { MethodName: "List", Handler: _LinkQueryService_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "infrastructure/rpc/cqrs/link/v1/link_query.proto", }
LinkQueryService_ServiceDesc is the grpc.ServiceDesc for LinkQueryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLinkCommandServiceServer ¶
func RegisterLinkCommandServiceServer(s grpc.ServiceRegistrar, srv LinkCommandServiceServer)
func RegisterLinkQueryServiceServer ¶
func RegisterLinkQueryServiceServer(s grpc.ServiceRegistrar, srv LinkQueryServiceServer)
Types ¶
type AddRequest ¶
type AddRequest struct { // Link is the link to add Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
AddRequest is the request for adding a new link
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetLink ¶
func (x *AddRequest) GetLink() *Link
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type AddResponse ¶
type AddResponse struct { // Link is the added link Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
AddResponse is the response for adding a new link
func (*AddResponse) Descriptor
deprecated
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) GetLink ¶
func (x *AddResponse) GetLink() *Link
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶
func (x *AddResponse) Reset()
func (*AddResponse) String ¶
func (x *AddResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { // Hash is the hash of the link to delete Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
DeleteRequest is the request for deleting an existing link
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetHash ¶
func (x *DeleteRequest) GetHash() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type GetRequest ¶
type GetRequest struct { // Hash is the hash of the Link to get. Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
GetRequest is the request message for the Get method.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetHash ¶
func (x *GetRequest) GetHash() string
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 GetResponse ¶
type GetResponse struct { // Link is the LinkView for the given hash. Link *LinkView `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
GetResponse is the response message for the Get method.
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetLink ¶
func (x *GetResponse) GetLink() *LinkView
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Link ¶
type Link struct { // Field mask FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,6,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // URL Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Hash by URL + salt Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // Describe of link Describe string `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe,omitempty"` // Create at CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Update at UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
Link
func (*Link) Descriptor
deprecated
func (*Link) GetCreatedAt ¶
func (x *Link) GetCreatedAt() *timestamppb.Timestamp
func (*Link) GetDescribe ¶
func (*Link) GetFieldMask ¶
func (x *Link) GetFieldMask() *fieldmaskpb.FieldMask
func (*Link) GetUpdatedAt ¶
func (x *Link) GetUpdatedAt() *timestamppb.Timestamp
func (*Link) ProtoMessage ¶
func (*Link) ProtoMessage()
func (*Link) ProtoReflect ¶
func (x *Link) ProtoReflect() protoreflect.Message
type LinkCommandServiceClient ¶
type LinkCommandServiceClient interface { // Add adds a new link Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) // Update updates an existing link Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // Delete deletes an existing link Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
LinkCommandServiceClient is the client API for LinkCommandService 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 NewLinkCommandServiceClient ¶
func NewLinkCommandServiceClient(cc grpc.ClientConnInterface) LinkCommandServiceClient
type LinkCommandServiceServer ¶
type LinkCommandServiceServer interface { // Add adds a new link Add(context.Context, *AddRequest) (*AddResponse, error) // Update updates an existing link Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // Delete deletes an existing link Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
LinkCommandServiceServer is the server API for LinkCommandService service. All implementations must embed UnimplementedLinkCommandServiceServer for forward compatibility
type LinkQueryServiceClient ¶
type LinkQueryServiceClient interface { // Get returns a LinkView for the given hash. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // List returns a LinksView for the given filter. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) }
LinkQueryServiceClient is the client API for LinkQueryService 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 NewLinkQueryServiceClient ¶
func NewLinkQueryServiceClient(cc grpc.ClientConnInterface) LinkQueryServiceClient
type LinkQueryServiceServer ¶
type LinkQueryServiceServer interface { // Get returns a LinkView for the given hash. Get(context.Context, *GetRequest) (*GetResponse, error) // List returns a LinksView for the given filter. List(context.Context, *ListRequest) (*ListResponse, error) // contains filtered or unexported methods }
LinkQueryServiceServer is the server API for LinkQueryService service. All implementations must embed UnimplementedLinkQueryServiceServer for forward compatibility
type LinkRPC ¶
type LinkRPC struct { LinkCommandServiceServer LinkQueryServiceServer // contains filtered or unexported fields }
func (*LinkRPC) Get ¶
func (l *LinkRPC) Get(ctx context.Context, in *GetRequest) (*GetResponse, error)
func (*LinkRPC) List ¶
func (l *LinkRPC) List(ctx context.Context, in *ListRequest) (*ListResponse, error)
type LinkView ¶
type LinkView struct { // FieldMask FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // URL Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Hash by URL + salt Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // Describe of link Describe string `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe,omitempty"` // Metadata ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // Meta description MetaDescription string `protobuf:"bytes,5,opt,name=meta_description,json=metaDescription,proto3" json:"meta_description,omitempty"` // Meta keywords MetaKeywords string `protobuf:"bytes,6,opt,name=meta_keywords,json=metaKeywords,proto3" json:"meta_keywords,omitempty"` // Create at CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Update at UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
LinkView
func (*LinkView) Descriptor
deprecated
func (*LinkView) GetCreatedAt ¶
func (x *LinkView) GetCreatedAt() *timestamppb.Timestamp
func (*LinkView) GetDescribe ¶
func (*LinkView) GetFieldMask ¶
func (x *LinkView) GetFieldMask() *fieldmaskpb.FieldMask
func (*LinkView) GetImageUrl ¶
func (*LinkView) GetMetaDescription ¶
func (*LinkView) GetMetaKeywords ¶
func (*LinkView) GetUpdatedAt ¶
func (x *LinkView) GetUpdatedAt() *timestamppb.Timestamp
func (*LinkView) ProtoMessage ¶
func (*LinkView) ProtoMessage()
func (*LinkView) ProtoReflect ¶
func (x *LinkView) ProtoReflect() protoreflect.Message
type LinksView ¶
type LinksView struct { // Links Links []*LinkView `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` // contains filtered or unexported fields }
Links
func (*LinksView) Descriptor
deprecated
func (*LinksView) ProtoMessage ¶
func (*LinksView) ProtoMessage()
func (*LinksView) ProtoReflect ¶
func (x *LinksView) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct { // Filter is the filter to apply to the Links. Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
ListRequest is the request message for the List method.
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetFilter ¶
func (x *ListRequest) GetFilter() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { // Links is the LinksView for the given filter. Links *LinksView `protobuf:"bytes,1,opt,name=links,proto3" json:"links,omitempty"` // contains filtered or unexported fields }
ListResponse is the response message for the List method.
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetLinks ¶
func (x *ListResponse) GetLinks() *LinksView
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type UnimplementedLinkCommandServiceServer ¶
type UnimplementedLinkCommandServiceServer struct { }
UnimplementedLinkCommandServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLinkCommandServiceServer) Add ¶
func (UnimplementedLinkCommandServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (UnimplementedLinkCommandServiceServer) Delete ¶
func (UnimplementedLinkCommandServiceServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedLinkCommandServiceServer) Update ¶
func (UnimplementedLinkCommandServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnimplementedLinkQueryServiceServer ¶
type UnimplementedLinkQueryServiceServer struct { }
UnimplementedLinkQueryServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLinkQueryServiceServer) Get ¶
func (UnimplementedLinkQueryServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedLinkQueryServiceServer) List ¶
func (UnimplementedLinkQueryServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
type UnsafeLinkCommandServiceServer ¶
type UnsafeLinkCommandServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLinkCommandServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LinkCommandServiceServer will result in compilation errors.
type UnsafeLinkQueryServiceServer ¶
type UnsafeLinkQueryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLinkQueryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LinkQueryServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { // Link is the link to update Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
UpdateRequest is the request for updating an existing link
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetLink ¶
func (x *UpdateRequest) GetLink() *Link
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct { // Link is the updated link Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
UpdateResponse is the response for updating an existing link
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetLink ¶
func (x *UpdateResponse) GetLink() *Link
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string