v1

package
v0.0.0-...-9dfb24e Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Metadata UC. Infrastructure layer

Index

Constants

View Source
const (
	MetadataService_Get_FullMethodName = "/infrastructure.rpc.metadata.v1.MetadataService/Get"
	MetadataService_Set_FullMethodName = "/infrastructure.rpc.metadata.v1.MetadataService/Set"
)

Variables

View Source
var File_infrastructure_rpc_metadata_v1_metadata_rpc_proto protoreflect.FileDescriptor
View Source
var MetadataService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infrastructure.rpc.metadata.v1.MetadataService",
	HandlerType: (*MetadataServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _MetadataService_Get_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _MetadataService_Set_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "infrastructure/rpc/metadata/v1/metadata_rpc.proto",
}

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

Functions

func RegisterMetadataServiceServer

func RegisterMetadataServiceServer(s grpc.ServiceRegistrar, srv MetadataServiceServer)

Types

type Metadata

type Metadata struct {
	MetadataServiceServer
	// contains filtered or unexported fields
}

func New

func New(log logger.Logger, runRPCServer *rpc.Server, parsersUC *parsers.UC, screenshotUC *screenshot.UC, metadataUC *metadata.UC) (*Metadata, error)

type MetadataServiceClient

type MetadataServiceClient interface {
	// Get returns the metadata for the given URL.
	Get(ctx context.Context, in *MetadataServiceGetRequest, opts ...grpc.CallOption) (*MetadataServiceGetResponse, error)
	// Set sets the metadata for the given URL.
	Set(ctx context.Context, in *MetadataServiceSetRequest, opts ...grpc.CallOption) (*MetadataServiceSetResponse, error)
}

MetadataServiceClient is the client API for MetadataService 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 MetadataServiceGetRequest

type MetadataServiceGetRequest struct {

	// URL is the URL to get the metadata for.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

MetadataServiceGetRequest is the request message for the Get method.

func (*MetadataServiceGetRequest) Descriptor deprecated

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

Deprecated: Use MetadataServiceGetRequest.ProtoReflect.Descriptor instead.

func (*MetadataServiceGetRequest) GetUrl

func (x *MetadataServiceGetRequest) GetUrl() string

func (*MetadataServiceGetRequest) ProtoMessage

func (*MetadataServiceGetRequest) ProtoMessage()

func (*MetadataServiceGetRequest) ProtoReflect

func (*MetadataServiceGetRequest) Reset

func (x *MetadataServiceGetRequest) Reset()

func (*MetadataServiceGetRequest) String

func (x *MetadataServiceGetRequest) String() string

type MetadataServiceGetResponse

type MetadataServiceGetResponse struct {

	// Meta is the metadata for the given URL.
	Meta *v1.Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

MetadataServiceGetResponse is the response message for the Get method.

func (*MetadataServiceGetResponse) Descriptor deprecated

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

Deprecated: Use MetadataServiceGetResponse.ProtoReflect.Descriptor instead.

func (*MetadataServiceGetResponse) GetMeta

func (x *MetadataServiceGetResponse) GetMeta() *v1.Meta

func (*MetadataServiceGetResponse) ProtoMessage

func (*MetadataServiceGetResponse) ProtoMessage()

func (*MetadataServiceGetResponse) ProtoReflect

func (*MetadataServiceGetResponse) Reset

func (x *MetadataServiceGetResponse) Reset()

func (*MetadataServiceGetResponse) String

func (x *MetadataServiceGetResponse) String() string

type MetadataServiceServer

type MetadataServiceServer interface {
	// Get returns the metadata for the given URL.
	Get(context.Context, *MetadataServiceGetRequest) (*MetadataServiceGetResponse, error)
	// Set sets the metadata for the given URL.
	Set(context.Context, *MetadataServiceSetRequest) (*MetadataServiceSetResponse, error)
	// contains filtered or unexported methods
}

MetadataServiceServer is the server API for MetadataService service. All implementations must embed UnimplementedMetadataServiceServer for forward compatibility

type MetadataServiceSetRequest

type MetadataServiceSetRequest struct {

	// URL is the URL to set the metadata for.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

MetadataServiceSetRequest is the request message for the Set method.

func (*MetadataServiceSetRequest) Descriptor deprecated

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

Deprecated: Use MetadataServiceSetRequest.ProtoReflect.Descriptor instead.

func (*MetadataServiceSetRequest) GetUrl

func (x *MetadataServiceSetRequest) GetUrl() string

func (*MetadataServiceSetRequest) ProtoMessage

func (*MetadataServiceSetRequest) ProtoMessage()

func (*MetadataServiceSetRequest) ProtoReflect

func (*MetadataServiceSetRequest) Reset

func (x *MetadataServiceSetRequest) Reset()

func (*MetadataServiceSetRequest) String

func (x *MetadataServiceSetRequest) String() string

type MetadataServiceSetResponse

type MetadataServiceSetResponse struct {

	// Meta is the metadata for the given URL.
	Meta *v1.Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

MetadataServiceSetResponse is the response message for the Set method.

func (*MetadataServiceSetResponse) Descriptor deprecated

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

Deprecated: Use MetadataServiceSetResponse.ProtoReflect.Descriptor instead.

func (*MetadataServiceSetResponse) GetMeta

func (x *MetadataServiceSetResponse) GetMeta() *v1.Meta

func (*MetadataServiceSetResponse) ProtoMessage

func (*MetadataServiceSetResponse) ProtoMessage()

func (*MetadataServiceSetResponse) ProtoReflect

func (*MetadataServiceSetResponse) Reset

func (x *MetadataServiceSetResponse) Reset()

func (*MetadataServiceSetResponse) String

func (x *MetadataServiceSetResponse) String() string

type UnimplementedMetadataServiceServer

type UnimplementedMetadataServiceServer struct {
}

UnimplementedMetadataServiceServer must be embedded to have forward compatible implementations.

type UnsafeMetadataServiceServer

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

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

Jump to

Keyboard shortcuts

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