v1

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const (
	SearchService_SearchCIDs_FullMethodName    = "/agntcy.dir.search.v1.SearchService/SearchCIDs"
	SearchService_SearchRecords_FullMethodName = "/agntcy.dir.search.v1.SearchService/SearchRecords"
)

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_NAME",
		7:  "RECORD_QUERY_TYPE_DOMAIN_ID",
		8:  "RECORD_QUERY_TYPE_DOMAIN_NAME",
		9:  "RECORD_QUERY_TYPE_CREATED_AT",
		10: "RECORD_QUERY_TYPE_AUTHOR",
		11: "RECORD_QUERY_TYPE_SCHEMA_VERSION",
		12: "RECORD_QUERY_TYPE_MODULE_ID",
	}
	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_NAME":    6,
		"RECORD_QUERY_TYPE_DOMAIN_ID":      7,
		"RECORD_QUERY_TYPE_DOMAIN_NAME":    8,
		"RECORD_QUERY_TYPE_CREATED_AT":     9,
		"RECORD_QUERY_TYPE_AUTHOR":         10,
		"RECORD_QUERY_TYPE_SCHEMA_VERSION": 11,
		"RECORD_QUERY_TYPE_MODULE_ID":      12,
	}
)

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:    "SearchCIDs",
			Handler:       _SearchService_SearchCIDs_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SearchRecords",
			Handler:       _SearchService_SearchRecords_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 name.
	// Supports wildcard patterns: "*-plugin", "*-module", "core*", "mod-?", "plugin-[0-9]"
	RecordQueryType_RECORD_QUERY_TYPE_MODULE_NAME 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
	// Query for a record's created_at timestamp.
	// Supports wildcard patterns for date strings: "2025-*", ">=2025-01-01"
	RecordQueryType_RECORD_QUERY_TYPE_CREATED_AT RecordQueryType = 9
	// Query for a record author.
	// Supports wildcard patterns: "AGNTCY*", "*@example.com", "*Team*"
	RecordQueryType_RECORD_QUERY_TYPE_AUTHOR RecordQueryType = 10
	// Query for a schema version.
	// Supports wildcard patterns: "0.7.*", "0.*", "1.0.?"
	RecordQueryType_RECORD_QUERY_TYPE_SCHEMA_VERSION RecordQueryType = 11
	// Query for a module ID.
	// Numeric field - exact match only, no wildcard support.
	RecordQueryType_RECORD_QUERY_TYPE_MODULE_ID RecordQueryType = 12
)

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 SearchCIDsRequest added in v0.5.6

type SearchCIDsRequest 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 (*SearchCIDsRequest) Descriptor deprecated added in v0.5.6

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

Deprecated: Use SearchCIDsRequest.ProtoReflect.Descriptor instead.

func (*SearchCIDsRequest) GetLimit added in v0.5.6

func (x *SearchCIDsRequest) GetLimit() uint32

func (*SearchCIDsRequest) GetOffset added in v0.5.6

func (x *SearchCIDsRequest) GetOffset() uint32

func (*SearchCIDsRequest) GetQueries added in v0.5.6

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

func (*SearchCIDsRequest) ProtoMessage added in v0.5.6

func (*SearchCIDsRequest) ProtoMessage()

func (*SearchCIDsRequest) ProtoReflect added in v0.5.6

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

func (*SearchCIDsRequest) Reset added in v0.5.6

func (x *SearchCIDsRequest) Reset()

func (*SearchCIDsRequest) String added in v0.5.6

func (x *SearchCIDsRequest) String() string

type SearchCIDsResponse added in v0.5.6

type SearchCIDsResponse 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 (*SearchCIDsResponse) Descriptor deprecated added in v0.5.6

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

Deprecated: Use SearchCIDsResponse.ProtoReflect.Descriptor instead.

func (*SearchCIDsResponse) GetRecordCid added in v0.5.6

func (x *SearchCIDsResponse) GetRecordCid() string

func (*SearchCIDsResponse) ProtoMessage added in v0.5.6

func (*SearchCIDsResponse) ProtoMessage()

func (*SearchCIDsResponse) ProtoReflect added in v0.5.6

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

func (*SearchCIDsResponse) Reset added in v0.5.6

func (x *SearchCIDsResponse) Reset()

func (*SearchCIDsResponse) String added in v0.5.6

func (x *SearchCIDsResponse) String() string

type SearchRecordsRequest added in v0.5.6

type SearchRecordsRequest 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 (*SearchRecordsRequest) Descriptor deprecated added in v0.5.6

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

Deprecated: Use SearchRecordsRequest.ProtoReflect.Descriptor instead.

func (*SearchRecordsRequest) GetLimit added in v0.5.6

func (x *SearchRecordsRequest) GetLimit() uint32

func (*SearchRecordsRequest) GetOffset added in v0.5.6

func (x *SearchRecordsRequest) GetOffset() uint32

func (*SearchRecordsRequest) GetQueries added in v0.5.6

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

func (*SearchRecordsRequest) ProtoMessage added in v0.5.6

func (*SearchRecordsRequest) ProtoMessage()

func (*SearchRecordsRequest) ProtoReflect added in v0.5.6

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

func (*SearchRecordsRequest) Reset added in v0.5.6

func (x *SearchRecordsRequest) Reset()

func (*SearchRecordsRequest) String added in v0.5.6

func (x *SearchRecordsRequest) String() string

type SearchRecordsResponse added in v0.5.6

type SearchRecordsResponse struct {

	// The full record that matches the search criteria.
	Record *v1.Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRecordsResponse) Descriptor deprecated added in v0.5.6

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

Deprecated: Use SearchRecordsResponse.ProtoReflect.Descriptor instead.

func (*SearchRecordsResponse) GetRecord added in v0.5.6

func (x *SearchRecordsResponse) GetRecord() *v1.Record

func (*SearchRecordsResponse) ProtoMessage added in v0.5.6

func (*SearchRecordsResponse) ProtoMessage()

func (*SearchRecordsResponse) ProtoReflect added in v0.5.6

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

func (*SearchRecordsResponse) Reset added in v0.5.6

func (x *SearchRecordsResponse) Reset()

func (*SearchRecordsResponse) String added in v0.5.6

func (x *SearchRecordsResponse) String() string

type SearchServiceClient

type SearchServiceClient interface {
	// Search for record CIDs that match the given parameters.
	// Returns only CIDs for efficient lookups and piping to other commands.
	// This operation does not interact with the network.
	SearchCIDs(ctx context.Context, in *SearchCIDsRequest, opts ...grpc.CallOption) (SearchService_SearchCIDsClient, error)
	// Search for full records that match the given parameters.
	// Returns complete record data including all metadata, skills, domains, etc.
	// This operation does not interact with the network.
	SearchRecords(ctx context.Context, in *SearchRecordsRequest, opts ...grpc.CallOption) (SearchService_SearchRecordsClient, 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 {
	// Search for record CIDs that match the given parameters.
	// Returns only CIDs for efficient lookups and piping to other commands.
	// This operation does not interact with the network.
	SearchCIDs(*SearchCIDsRequest, SearchService_SearchCIDsServer) error
	// Search for full records that match the given parameters.
	// Returns complete record data including all metadata, skills, domains, etc.
	// This operation does not interact with the network.
	SearchRecords(*SearchRecordsRequest, SearchService_SearchRecordsServer) error
}

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

type SearchService_SearchCIDsClient added in v0.5.6

type SearchService_SearchCIDsClient interface {
	Recv() (*SearchCIDsResponse, error)
	grpc.ClientStream
}

type SearchService_SearchCIDsServer added in v0.5.6

type SearchService_SearchCIDsServer interface {
	Send(*SearchCIDsResponse) error
	grpc.ServerStream
}

type SearchService_SearchRecordsClient added in v0.5.6

type SearchService_SearchRecordsClient interface {
	Recv() (*SearchRecordsResponse, error)
	grpc.ClientStream
}

type SearchService_SearchRecordsServer added in v0.5.6

type SearchService_SearchRecordsServer interface {
	Send(*SearchRecordsResponse) 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) SearchCIDs added in v0.5.6

func (UnimplementedSearchServiceServer) SearchRecords added in v0.5.6

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