Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNamingServiceServer(s grpc.ServiceRegistrar, srv NamingServiceServer)
- type DomainVerification
- func (*DomainVerification) Descriptor() ([]byte, []int)deprecated
- func (x *DomainVerification) GetDomain() string
- func (x *DomainVerification) GetKeyId() string
- func (x *DomainVerification) GetMethod() string
- func (x *DomainVerification) GetVerifiedAt() *timestamppb.Timestamp
- func (*DomainVerification) ProtoMessage()
- func (x *DomainVerification) ProtoReflect() protoreflect.Message
- func (x *DomainVerification) Reset()
- func (x *DomainVerification) String() string
- type GetVerificationInfoRequest
- func (*GetVerificationInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetVerificationInfoRequest) GetCid() string
- func (x *GetVerificationInfoRequest) GetName() string
- func (x *GetVerificationInfoRequest) GetVersion() string
- func (*GetVerificationInfoRequest) ProtoMessage()
- func (x *GetVerificationInfoRequest) ProtoReflect() protoreflect.Message
- func (x *GetVerificationInfoRequest) Reset()
- func (x *GetVerificationInfoRequest) String() string
- type GetVerificationInfoResponse
- func (*GetVerificationInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetVerificationInfoResponse) GetErrorMessage() string
- func (x *GetVerificationInfoResponse) GetVerification() *Verification
- func (x *GetVerificationInfoResponse) GetVerified() bool
- func (*GetVerificationInfoResponse) ProtoMessage()
- func (x *GetVerificationInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetVerificationInfoResponse) Reset()
- func (x *GetVerificationInfoResponse) String() string
- type NamingServiceClient
- type NamingServiceServer
- type ResolveRequest
- func (*ResolveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResolveRequest) GetName() string
- func (x *ResolveRequest) GetVersion() string
- func (*ResolveRequest) ProtoMessage()
- func (x *ResolveRequest) ProtoReflect() protoreflect.Message
- func (x *ResolveRequest) Reset()
- func (x *ResolveRequest) String() string
- type ResolveResponse
- type UnimplementedNamingServiceServer
- type UnsafeNamingServiceServer
- type Verification
- func (*Verification) Descriptor() ([]byte, []int)deprecated
- func (x *Verification) GetDomain() *DomainVerification
- func (x *Verification) GetInfo() isVerification_Info
- func (*Verification) ProtoMessage()
- func (x *Verification) ProtoReflect() protoreflect.Message
- func (x *Verification) Reset()
- func (x *Verification) String() string
- type Verification_Domain
Constants ¶
const ( NamingService_GetVerificationInfo_FullMethodName = "/agntcy.dir.naming.v1.NamingService/GetVerificationInfo" NamingService_Resolve_FullMethodName = "/agntcy.dir.naming.v1.NamingService/Resolve" )
Variables ¶
var File_agntcy_dir_naming_v1_name_verification_proto protoreflect.FileDescriptor
var File_agntcy_dir_naming_v1_naming_service_proto protoreflect.FileDescriptor
var NamingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agntcy.dir.naming.v1.NamingService", HandlerType: (*NamingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetVerificationInfo", Handler: _NamingService_GetVerificationInfo_Handler, }, { MethodName: "Resolve", Handler: _NamingService_Resolve_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "agntcy/dir/naming/v1/naming_service.proto", }
NamingService_ServiceDesc is the grpc.ServiceDesc for NamingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNamingServiceServer ¶
func RegisterNamingServiceServer(s grpc.ServiceRegistrar, srv NamingServiceServer)
Types ¶
type DomainVerification ¶
type DomainVerification struct {
// The domain that was verified (e.g., "cisco.com").
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
// The verification method used: "wellknown".
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
// The identifier of the domain's public key that matched the record's signing key.
// This is the "id" field from the well-known file.
KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
// When the verification was performed.
VerifiedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=verified_at,json=verifiedAt,proto3" json:"verified_at,omitempty"`
// contains filtered or unexported fields
}
DomainVerification represents the result of verifying that a record's signing key is authorized by the domain claimed in the record's name.
func (*DomainVerification) Descriptor
deprecated
func (*DomainVerification) Descriptor() ([]byte, []int)
Deprecated: Use DomainVerification.ProtoReflect.Descriptor instead.
func (*DomainVerification) GetDomain ¶
func (x *DomainVerification) GetDomain() string
func (*DomainVerification) GetKeyId ¶
func (x *DomainVerification) GetKeyId() string
func (*DomainVerification) GetMethod ¶
func (x *DomainVerification) GetMethod() string
func (*DomainVerification) GetVerifiedAt ¶
func (x *DomainVerification) GetVerifiedAt() *timestamppb.Timestamp
func (*DomainVerification) ProtoMessage ¶
func (*DomainVerification) ProtoMessage()
func (*DomainVerification) ProtoReflect ¶
func (x *DomainVerification) ProtoReflect() protoreflect.Message
func (*DomainVerification) Reset ¶
func (x *DomainVerification) Reset()
func (*DomainVerification) String ¶
func (x *DomainVerification) String() string
type GetVerificationInfoRequest ¶
type GetVerificationInfoRequest struct {
// The CID of the record to check.
// If provided, name and version are ignored.
Cid *string `protobuf:"bytes,1,opt,name=cid,proto3,oneof" json:"cid,omitempty"`
// The name of the record to check (e.g., "cisco.com/agent").
// Used when cid is not provided.
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
// Optional version when looking up by name (e.g., "v1.0.0").
// If not specified, the latest version is used.
Version *string `protobuf:"bytes,3,opt,name=version,proto3,oneof" json:"version,omitempty"`
// contains filtered or unexported fields
}
GetVerificationInfoRequest is the request for retrieving verification info. Either cid OR name must be provided. If name is provided, it will be resolved to a CID first (using the latest version if version is not specified).
func (*GetVerificationInfoRequest) Descriptor
deprecated
func (*GetVerificationInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetVerificationInfoRequest.ProtoReflect.Descriptor instead.
func (*GetVerificationInfoRequest) GetCid ¶
func (x *GetVerificationInfoRequest) GetCid() string
func (*GetVerificationInfoRequest) GetName ¶
func (x *GetVerificationInfoRequest) GetName() string
func (*GetVerificationInfoRequest) GetVersion ¶
func (x *GetVerificationInfoRequest) GetVersion() string
func (*GetVerificationInfoRequest) ProtoMessage ¶
func (*GetVerificationInfoRequest) ProtoMessage()
func (*GetVerificationInfoRequest) ProtoReflect ¶
func (x *GetVerificationInfoRequest) ProtoReflect() protoreflect.Message
func (*GetVerificationInfoRequest) Reset ¶
func (x *GetVerificationInfoRequest) Reset()
func (*GetVerificationInfoRequest) String ¶
func (x *GetVerificationInfoRequest) String() string
type GetVerificationInfoResponse ¶
type GetVerificationInfoResponse struct {
// Whether the record has verified name ownership.
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
// The verification details (only set if verified is true).
Verification *Verification `protobuf:"bytes,2,opt,name=verification,proto3" json:"verification,omitempty"`
// Error message if lookup failed.
ErrorMessage *string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
GetVerificationInfoResponse is the response for retrieving verification info.
func (*GetVerificationInfoResponse) Descriptor
deprecated
func (*GetVerificationInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetVerificationInfoResponse.ProtoReflect.Descriptor instead.
func (*GetVerificationInfoResponse) GetErrorMessage ¶
func (x *GetVerificationInfoResponse) GetErrorMessage() string
func (*GetVerificationInfoResponse) GetVerification ¶
func (x *GetVerificationInfoResponse) GetVerification() *Verification
func (*GetVerificationInfoResponse) GetVerified ¶
func (x *GetVerificationInfoResponse) GetVerified() bool
func (*GetVerificationInfoResponse) ProtoMessage ¶
func (*GetVerificationInfoResponse) ProtoMessage()
func (*GetVerificationInfoResponse) ProtoReflect ¶
func (x *GetVerificationInfoResponse) ProtoReflect() protoreflect.Message
func (*GetVerificationInfoResponse) Reset ¶
func (x *GetVerificationInfoResponse) Reset()
func (*GetVerificationInfoResponse) String ¶
func (x *GetVerificationInfoResponse) String() string
type NamingServiceClient ¶
type NamingServiceClient interface {
// GetVerificationInfo retrieves the verification info for a record.
GetVerificationInfo(ctx context.Context, in *GetVerificationInfoRequest, opts ...grpc.CallOption) (*GetVerificationInfoResponse, error)
// Resolve resolves a record reference (name with optional version) to CIDs.
// Supports Docker-style references:
// - "name" -> returns all versions (newest first)
// - "name:version" -> returns the specific version
// - "name@cid" -> hash-verified lookup (latest version)
// - "name:version@cid" -> hash-verified lookup (specific version)
//
// Returns an error if no matching record is found.
Resolve(ctx context.Context, in *ResolveRequest, opts ...grpc.CallOption) (*ResolveResponse, error)
}
NamingServiceClient is the client API for NamingService 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.
NamingService provides methods for name resolution and verification. Note: Verification is performed automatically by the backend scheduler for signed records with verifiable names (http://, https:// prefixes).
func NewNamingServiceClient ¶
func NewNamingServiceClient(cc grpc.ClientConnInterface) NamingServiceClient
type NamingServiceServer ¶
type NamingServiceServer interface {
// GetVerificationInfo retrieves the verification info for a record.
GetVerificationInfo(context.Context, *GetVerificationInfoRequest) (*GetVerificationInfoResponse, error)
// Resolve resolves a record reference (name with optional version) to CIDs.
// Supports Docker-style references:
// - "name" -> returns all versions (newest first)
// - "name:version" -> returns the specific version
// - "name@cid" -> hash-verified lookup (latest version)
// - "name:version@cid" -> hash-verified lookup (specific version)
//
// Returns an error if no matching record is found.
Resolve(context.Context, *ResolveRequest) (*ResolveResponse, error)
}
NamingServiceServer is the server API for NamingService service. All implementations should embed UnimplementedNamingServiceServer for forward compatibility.
NamingService provides methods for name resolution and verification. Note: Verification is performed automatically by the backend scheduler for signed records with verifiable names (http://, https:// prefixes).
type ResolveRequest ¶
type ResolveRequest struct {
// The name of the record to resolve (e.g., "cisco.com/agent").
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional version to resolve to (e.g., "v1.0.0").
Version *string `protobuf:"bytes,2,opt,name=version,proto3,oneof" json:"version,omitempty"`
// contains filtered or unexported fields
}
ResolveRequest is the request for resolving a record reference to CIDs.
func (*ResolveRequest) Descriptor
deprecated
func (*ResolveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResolveRequest.ProtoReflect.Descriptor instead.
func (*ResolveRequest) GetName ¶
func (x *ResolveRequest) GetName() string
func (*ResolveRequest) GetVersion ¶
func (x *ResolveRequest) GetVersion() string
func (*ResolveRequest) ProtoMessage ¶
func (*ResolveRequest) ProtoMessage()
func (*ResolveRequest) ProtoReflect ¶
func (x *ResolveRequest) ProtoReflect() protoreflect.Message
func (*ResolveRequest) Reset ¶
func (x *ResolveRequest) Reset()
func (*ResolveRequest) String ¶
func (x *ResolveRequest) String() string
type ResolveResponse ¶
type ResolveResponse struct {
// The resolved record references (newest first by created_at).
Records []*v1.NamedRecordRef `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// contains filtered or unexported fields
}
ResolveResponse is the response containing the resolved records.
func (*ResolveResponse) Descriptor
deprecated
func (*ResolveResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResolveResponse.ProtoReflect.Descriptor instead.
func (*ResolveResponse) GetRecords ¶
func (x *ResolveResponse) GetRecords() []*v1.NamedRecordRef
func (*ResolveResponse) ProtoMessage ¶
func (*ResolveResponse) ProtoMessage()
func (*ResolveResponse) ProtoReflect ¶
func (x *ResolveResponse) ProtoReflect() protoreflect.Message
func (*ResolveResponse) Reset ¶
func (x *ResolveResponse) Reset()
func (*ResolveResponse) String ¶
func (x *ResolveResponse) String() string
type UnimplementedNamingServiceServer ¶
type UnimplementedNamingServiceServer struct{}
UnimplementedNamingServiceServer 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 (UnimplementedNamingServiceServer) GetVerificationInfo ¶
func (UnimplementedNamingServiceServer) GetVerificationInfo(context.Context, *GetVerificationInfoRequest) (*GetVerificationInfoResponse, error)
func (UnimplementedNamingServiceServer) Resolve ¶
func (UnimplementedNamingServiceServer) Resolve(context.Context, *ResolveRequest) (*ResolveResponse, error)
type UnsafeNamingServiceServer ¶
type UnsafeNamingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNamingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NamingServiceServer will result in compilation errors.
type Verification ¶
type Verification struct {
// Types that are valid to be assigned to Info:
//
// *Verification_Domain
Info isVerification_Info `protobuf_oneof:"info"`
// contains filtered or unexported fields
}
Verification represents the result of verifying a record's name ownership. It uses a oneof to support different verification types.
func NewDomainVerification ¶
func NewDomainVerification(dv *DomainVerification) *Verification
NewDomainVerification creates a new Verification with DomainVerification info.
func (*Verification) Descriptor
deprecated
func (*Verification) Descriptor() ([]byte, []int)
Deprecated: Use Verification.ProtoReflect.Descriptor instead.
func (*Verification) GetDomain ¶
func (x *Verification) GetDomain() *DomainVerification
func (*Verification) GetInfo ¶
func (x *Verification) GetInfo() isVerification_Info
func (*Verification) ProtoMessage ¶
func (*Verification) ProtoMessage()
func (*Verification) ProtoReflect ¶
func (x *Verification) ProtoReflect() protoreflect.Message
func (*Verification) Reset ¶
func (x *Verification) Reset()
func (*Verification) String ¶
func (x *Verification) String() string
type Verification_Domain ¶
type Verification_Domain struct {
// Domain verification details.
Domain *DomainVerification `protobuf:"bytes,1,opt,name=domain,proto3,oneof"` // Future verification types can be added here.
}