v1

package
v0.0.0-...-f1b35de Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	LinkQueryService_Get_FullMethodName  = "/infrastructure.rpc.cqrs.link.v1.LinkQueryService/Get"
	LinkQueryService_List_FullMethodName = "/infrastructure.rpc.cqrs.link.v1.LinkQueryService/List"
)

Variables

View Source
var File_infrastructure_rpc_cqrs_link_v1_link_command_proto protoreflect.FileDescriptor
View Source
var File_infrastructure_rpc_cqrs_link_v1_link_proto protoreflect.FileDescriptor
View Source
var File_infrastructure_rpc_cqrs_link_v1_link_query_proto protoreflect.FileDescriptor
View Source
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)

View Source
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 (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 (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 (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 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) Descriptor() ([]byte, []int)

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) GetCreatedAt

func (x *Link) GetCreatedAt() *timestamppb.Timestamp

func (*Link) GetDescribe

func (x *Link) GetDescribe() string

func (*Link) GetFieldMask

func (x *Link) GetFieldMask() *fieldmaskpb.FieldMask

func (*Link) GetHash

func (x *Link) GetHash() string

func (*Link) GetUpdatedAt

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

func (*Link) GetUrl

func (x *Link) GetUrl() string

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

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

func (*Link) Reset

func (x *Link) Reset()

func (*Link) String

func (x *Link) String() string

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.

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.

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 New

func New(runRPCServer *rpc.Server, application *link_cqrs.Service, log logger.Logger) (*LinkRPC, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use LinkView.ProtoReflect.Descriptor instead.

func (*LinkView) GetCreatedAt

func (x *LinkView) GetCreatedAt() *timestamppb.Timestamp

func (*LinkView) GetDescribe

func (x *LinkView) GetDescribe() string

func (*LinkView) GetFieldMask

func (x *LinkView) GetFieldMask() *fieldmaskpb.FieldMask

func (*LinkView) GetHash

func (x *LinkView) GetHash() string

func (*LinkView) GetImageUrl

func (x *LinkView) GetImageUrl() string

func (*LinkView) GetMetaDescription

func (x *LinkView) GetMetaDescription() string

func (*LinkView) GetMetaKeywords

func (x *LinkView) GetMetaKeywords() string

func (*LinkView) GetUpdatedAt

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

func (*LinkView) GetUrl

func (x *LinkView) GetUrl() string

func (*LinkView) ProtoMessage

func (*LinkView) ProtoMessage()

func (*LinkView) ProtoReflect

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

func (*LinkView) Reset

func (x *LinkView) Reset()

func (*LinkView) String

func (x *LinkView) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LinksView.ProtoReflect.Descriptor instead.

func (x *LinksView) GetLinks() []*LinkView

func (*LinksView) ProtoMessage

func (*LinksView) ProtoMessage()

func (*LinksView) ProtoReflect

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

func (*LinksView) Reset

func (x *LinksView) Reset()

func (*LinksView) String

func (x *LinksView) String() string

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 (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) Delete

func (UnimplementedLinkCommandServiceServer) Update

type UnimplementedLinkQueryServiceServer

type UnimplementedLinkQueryServiceServer struct {
}

UnimplementedLinkQueryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLinkQueryServiceServer) Get

func (UnimplementedLinkQueryServiceServer) List

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 (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 (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

Jump to

Keyboard shortcuts

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