Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterSignetAgentServer(s grpc.ServiceRegistrar, srv SignetAgentServer)
- type Identity
- type ListIdentitiesResponse
- func (*ListIdentitiesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListIdentitiesResponse) GetIdentities() []*Identity
- func (*ListIdentitiesResponse) ProtoMessage()
- func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message
- func (x *ListIdentitiesResponse) Reset()
- func (x *ListIdentitiesResponse) String() string
- type SignRequest
- type SignResponse
- type SignetAgentClient
- type SignetAgentServer
- type UnimplementedSignetAgentServer
- type UnsafeSignetAgentServer
Constants ¶
const ( SignetAgent_Sign_FullMethodName = "/signet.agent.v1.SignetAgent/Sign" SignetAgent_ListIdentities_FullMethodName = "/signet.agent.v1.SignetAgent/ListIdentities" )
Variables ¶
var File_pkg_agent_api_v1_agent_proto protoreflect.FileDescriptor
var SignetAgent_ServiceDesc = grpc.ServiceDesc{ ServiceName: "signet.agent.v1.SignetAgent", HandlerType: (*SignetAgentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Sign", Handler: _SignetAgent_Sign_Handler, }, { MethodName: "ListIdentities", Handler: _SignetAgent_ListIdentities_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/agent/api/v1/agent.proto", }
SignetAgent_ServiceDesc is the grpc.ServiceDesc for SignetAgent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSignetAgentServer ¶
func RegisterSignetAgentServer(s grpc.ServiceRegistrar, srv SignetAgentServer)
Types ¶
type Identity ¶
type Identity struct {
// The unique identifier for the key (e.g., SHA256 fingerprint of the public key).
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// A human-readable comment for the identity (e.g., key file path or hardware token name).
Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
// contains filtered or unexported fields
}
func (*Identity) Descriptor
deprecated
func (*Identity) GetComment ¶
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
type ListIdentitiesResponse ¶
type ListIdentitiesResponse struct {
Identities []*Identity `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"`
// contains filtered or unexported fields
}
func (*ListIdentitiesResponse) Descriptor
deprecated
func (*ListIdentitiesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListIdentitiesResponse.ProtoReflect.Descriptor instead.
func (*ListIdentitiesResponse) GetIdentities ¶
func (x *ListIdentitiesResponse) GetIdentities() []*Identity
func (*ListIdentitiesResponse) ProtoMessage ¶
func (*ListIdentitiesResponse) ProtoMessage()
func (*ListIdentitiesResponse) ProtoReflect ¶
func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message
func (*ListIdentitiesResponse) Reset ¶
func (x *ListIdentitiesResponse) Reset()
func (*ListIdentitiesResponse) String ¶
func (x *ListIdentitiesResponse) String() string
type SignRequest ¶
type SignRequest struct {
// The raw data to be signed (e.g. a git commit object).
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// Optional: A specific key ID to use for signing. If empty, the agent
// will use its default identity.
KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
// contains filtered or unexported fields
}
func (*SignRequest) Descriptor
deprecated
func (*SignRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignRequest.ProtoReflect.Descriptor instead.
func (*SignRequest) GetData ¶
func (x *SignRequest) GetData() []byte
func (*SignRequest) GetKeyId ¶
func (x *SignRequest) GetKeyId() string
func (*SignRequest) ProtoMessage ¶
func (*SignRequest) ProtoMessage()
func (*SignRequest) ProtoReflect ¶
func (x *SignRequest) ProtoReflect() protoreflect.Message
func (*SignRequest) Reset ¶
func (x *SignRequest) Reset()
func (*SignRequest) String ¶
func (x *SignRequest) String() string
type SignResponse ¶
type SignResponse struct {
// The full COSE Sign1 signature envelope.
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
func (*SignResponse) Descriptor
deprecated
func (*SignResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignResponse.ProtoReflect.Descriptor instead.
func (*SignResponse) GetSignature ¶
func (x *SignResponse) GetSignature() []byte
func (*SignResponse) ProtoMessage ¶
func (*SignResponse) ProtoMessage()
func (*SignResponse) ProtoReflect ¶
func (x *SignResponse) ProtoReflect() protoreflect.Message
func (*SignResponse) Reset ¶
func (x *SignResponse) Reset()
func (*SignResponse) String ¶
func (x *SignResponse) String() string
type SignetAgentClient ¶
type SignetAgentClient interface {
// Sign uses an available identity to sign the given data, returning
// a full Signet signature. This is the primary function of the agent.
Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error)
// ListIdentities returns all the identities (keys) the agent can currently use.
ListIdentities(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListIdentitiesResponse, error)
}
SignetAgentClient is the client API for SignetAgent 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.
SignetAgent is the service that runs in the background to provide signing and identity management.
func NewSignetAgentClient ¶
func NewSignetAgentClient(cc grpc.ClientConnInterface) SignetAgentClient
type SignetAgentServer ¶
type SignetAgentServer interface {
// Sign uses an available identity to sign the given data, returning
// a full Signet signature. This is the primary function of the agent.
Sign(context.Context, *SignRequest) (*SignResponse, error)
// ListIdentities returns all the identities (keys) the agent can currently use.
ListIdentities(context.Context, *emptypb.Empty) (*ListIdentitiesResponse, error)
// contains filtered or unexported methods
}
SignetAgentServer is the server API for SignetAgent service. All implementations must embed UnimplementedSignetAgentServer for forward compatibility.
SignetAgent is the service that runs in the background to provide signing and identity management.
type UnimplementedSignetAgentServer ¶
type UnimplementedSignetAgentServer struct{}
UnimplementedSignetAgentServer must 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 (UnimplementedSignetAgentServer) ListIdentities ¶
func (UnimplementedSignetAgentServer) ListIdentities(context.Context, *emptypb.Empty) (*ListIdentitiesResponse, error)
func (UnimplementedSignetAgentServer) Sign ¶
func (UnimplementedSignetAgentServer) Sign(context.Context, *SignRequest) (*SignResponse, error)
type UnsafeSignetAgentServer ¶
type UnsafeSignetAgentServer interface {
// contains filtered or unexported methods
}
UnsafeSignetAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignetAgentServer will result in compilation errors.