v1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	SearchService_Search_FullMethodName = "/agntcy.dir.search.v1.SearchService/Search"
)

Variables

View Source
var (
	RecordQueryType_name = map[int32]string{
		0: "RECORD_QUERY_TYPE_UNSPECIFIED",
		1: "RECORD_QUERY_TYPE_NAME",
		2: "RECORD_QUERY_TYPE_VERSION",
		3: "RECORD_QUERY_TYPE_SKILL_ID",
		4: "RECORD_QUERY_TYPE_SKILL_NAME",
		5: "RECORD_QUERY_TYPE_LOCATOR",
		6: "RECORD_QUERY_TYPE_MODULE",
		7: "RECORD_QUERY_TYPE_DOMAIN_ID",
		8: "RECORD_QUERY_TYPE_DOMAIN_NAME",
	}
	RecordQueryType_value = map[string]int32{
		"RECORD_QUERY_TYPE_UNSPECIFIED": 0,
		"RECORD_QUERY_TYPE_NAME":        1,
		"RECORD_QUERY_TYPE_VERSION":     2,
		"RECORD_QUERY_TYPE_SKILL_ID":    3,
		"RECORD_QUERY_TYPE_SKILL_NAME":  4,
		"RECORD_QUERY_TYPE_LOCATOR":     5,
		"RECORD_QUERY_TYPE_MODULE":      6,
		"RECORD_QUERY_TYPE_DOMAIN_ID":   7,
		"RECORD_QUERY_TYPE_DOMAIN_NAME": 8,
	}
)

Enum value maps for RecordQueryType.

View Source
var File_agntcy_dir_search_v1_record_query_proto protoreflect.FileDescriptor
View Source
var File_agntcy_dir_search_v1_search_service_proto protoreflect.FileDescriptor
View Source
var SearchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agntcy.dir.search.v1.SearchService",
	HandlerType: (*SearchServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Search",
			Handler:       _SearchService_Search_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "agntcy/dir/search/v1/search_service.proto",
}

SearchService_ServiceDesc is the grpc.ServiceDesc for SearchService 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 ValidQueryTypes []string

Functions

func RegisterSearchServiceServer

func RegisterSearchServiceServer(s grpc.ServiceRegistrar, srv SearchServiceServer)

Types

type RecordQuery

type RecordQuery struct {

	// The type of the query to match against.
	Type RecordQueryType `protobuf:"varint,1,opt,name=type,proto3,enum=agntcy.dir.search.v1.RecordQueryType" json:"type,omitempty"`
	// The query value to match against.
	// Supports wildcard patterns:
	//
	//	'*' - matches zero or more characters
	//	'?' - matches exactly one character
	//	'[]' - matches any character within brackets (e.g., [0-9], [a-z], [abc])
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

A query to match the record against during discovery. For example:

Exact match:      { type: RECORD_QUERY_TYPE_NAME, value: "my-agent" }
Wildcard match:   { type: RECORD_QUERY_TYPE_NAME, value: "web*" }
Pattern match:    { type: RECORD_QUERY_TYPE_SKILL_NAME, value: "*machine*learning*" }
Question mark:    { type: RECORD_QUERY_TYPE_VERSION, value: "v1.0.?" }
List wildcards:   { type: RECORD_QUERY_TYPE_NAME, value: "agent-[0-9]" }
Complex match:    { type: RECORD_QUERY_TYPE_LOCATOR, value: "docker-image:https://*.example.com/*" }

func (*RecordQuery) Descriptor deprecated

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

Deprecated: Use RecordQuery.ProtoReflect.Descriptor instead.

func (*RecordQuery) GetType

func (x *RecordQuery) GetType() RecordQueryType

func (*RecordQuery) GetValue

func (x *RecordQuery) GetValue() string

func (*RecordQuery) ProtoMessage

func (*RecordQuery) ProtoMessage()

func (*RecordQuery) ProtoReflect

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

func (*RecordQuery) Reset

func (x *RecordQuery) Reset()

func (*RecordQuery) String

func (x *RecordQuery) String() string

type RecordQueryType

type RecordQueryType int32

Defines a list of supported record query types.

const (
	// Unspecified query type.
	RecordQueryType_RECORD_QUERY_TYPE_UNSPECIFIED RecordQueryType = 0
	// Query for a record name.
	// Supports wildcard patterns: "web*", "*service", "api-*-v2", "???api", "agent-[0-9]"
	RecordQueryType_RECORD_QUERY_TYPE_NAME RecordQueryType = 1
	// Query for a record version.
	// Supports wildcard patterns: "v1.*", "v2.*", "*-beta", "v1.0.?", "v[0-9].*"
	RecordQueryType_RECORD_QUERY_TYPE_VERSION RecordQueryType = 2
	// Query for a skill ID.
	// Numeric field - exact match only, no wildcard support.
	RecordQueryType_RECORD_QUERY_TYPE_SKILL_ID RecordQueryType = 3
	// Query for a skill name.
	// Supports wildcard patterns: "python*", "*script", "*machine*learning*", "Pytho?", "[A-M]*"
	RecordQueryType_RECORD_QUERY_TYPE_SKILL_NAME RecordQueryType = 4
	// Query for a locator type.
	// Supports wildcard patterns: "http*", "ftp*", "*docker*", "[hf]tt[ps]*"
	RecordQueryType_RECORD_QUERY_TYPE_LOCATOR RecordQueryType = 5
	// Query for a module.
	// Supports wildcard patterns: "*-plugin", "*-module", "core*", "mod-?", "plugin-[0-9]"
	RecordQueryType_RECORD_QUERY_TYPE_MODULE RecordQueryType = 6
	// Query for a domain ID.
	// Numeric field - exact match only, no wildcard support.
	RecordQueryType_RECORD_QUERY_TYPE_DOMAIN_ID RecordQueryType = 7
	// Query for a domain name.
	// Supports wildcard patterns: "*education*", "healthcare/*", "*technology"
	RecordQueryType_RECORD_QUERY_TYPE_DOMAIN_NAME RecordQueryType = 8
)

func (RecordQueryType) Descriptor

func (RecordQueryType) Enum

func (x RecordQueryType) Enum() *RecordQueryType

func (RecordQueryType) EnumDescriptor deprecated

func (RecordQueryType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RecordQueryType.Descriptor instead.

func (RecordQueryType) Number

func (RecordQueryType) String

func (x RecordQueryType) String() string

func (RecordQueryType) Type

type SearchRequest

type SearchRequest struct {

	// List of queries to match against the records.
	Queries []*RecordQuery `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
	// Optional limit on the number of results to return.
	Limit *uint32 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	// Optional offset for pagination of results.
	Offset *uint32 `protobuf:"varint,3,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetLimit

func (x *SearchRequest) GetLimit() uint32

func (*SearchRequest) GetOffset

func (x *SearchRequest) GetOffset() uint32

func (*SearchRequest) GetQueries

func (x *SearchRequest) GetQueries() []*RecordQuery

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {

	// The CID of the record that matches the search criteria.
	RecordCid string `protobuf:"bytes,1,opt,name=record_cid,json=recordCid,proto3" json:"record_cid,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetRecordCid

func (x *SearchResponse) GetRecordCid() string

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type SearchServiceClient

type SearchServiceClient interface {
	// List records that this peer is currently providing that match the given parameters.
	// This operation does not interact with the network.
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (SearchService_SearchClient, error)
}

SearchServiceClient is the client API for SearchService 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 SearchServiceServer

type SearchServiceServer interface {
	// List records that this peer is currently providing that match the given parameters.
	// This operation does not interact with the network.
	Search(*SearchRequest, SearchService_SearchServer) error
}

SearchServiceServer is the server API for SearchService service. All implementations should embed UnimplementedSearchServiceServer for forward compatibility.

type SearchService_SearchClient

type SearchService_SearchClient interface {
	Recv() (*SearchResponse, error)
	grpc.ClientStream
}

type SearchService_SearchServer

type SearchService_SearchServer interface {
	Send(*SearchResponse) error
	grpc.ServerStream
}

type UnimplementedSearchServiceServer

type UnimplementedSearchServiceServer struct{}

UnimplementedSearchServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSearchServiceServer) Search

type UnsafeSearchServiceServer

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

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

Jump to

Keyboard shortcuts

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