Documentation
¶
Overview ¶
Package agentv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentServiceClient) error
- func RegisterAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentServiceServer) error
- func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
- type AgentServiceClient
- type AgentServiceServer
- type OwnerCheck
- func (*OwnerCheck) Descriptor() ([]byte, []int)deprecated
- func (x *OwnerCheck) GetAuth() isOwnerCheck_Auth
- func (x *OwnerCheck) GetNoAuth() *empty.Empty
- func (x *OwnerCheck) GetSecret() *SecretData
- func (*OwnerCheck) ProtoMessage()
- func (x *OwnerCheck) ProtoReflect() protoreflect.Message
- func (x *OwnerCheck) Reset()
- func (x *OwnerCheck) String() string
- type OwnerCheck_NoAuth
- type OwnerCheck_Secret
- type RegInfo
- type RegInfoReq
- type SecretData
- func (*SecretData) Descriptor() ([]byte, []int)deprecated
- func (x *SecretData) GetRawValue() string
- func (x *SecretData) GetSecureValue() string
- func (*SecretData) ProtoMessage()
- func (x *SecretData) ProtoReflect() protoreflect.Message
- func (x *SecretData) Reset()
- func (x *SecretData) String() string
- type UnimplementedAgentServiceServer
- type UnsafeAgentServiceServer
Constants ¶
const (
AgentService_GetAgentRegistration_FullMethodName = "/hbf.v1.agent.AgentService/GetAgentRegistration"
)
Variables ¶
var AgentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hbf.v1.agent.AgentService", HandlerType: (*AgentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAgentRegistration", Handler: _AgentService_GetAgentRegistration_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "agent/v1/service.proto", }
AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_agent_v1_messages_proto protoreflect.FileDescriptor
var File_agent_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentServiceHandler ¶
func RegisterAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAgentServiceHandler registers the http handlers for service AgentService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAgentServiceHandlerClient ¶
func RegisterAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentServiceClient) error
RegisterAgentServiceHandlerClient registers the http handlers for service AgentService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AgentServiceClient" to call the correct interceptors.
func RegisterAgentServiceHandlerFromEndpoint ¶
func RegisterAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAgentServiceHandlerFromEndpoint is same as RegisterAgentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAgentServiceHandlerServer ¶
func RegisterAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentServiceServer) error
RegisterAgentServiceHandlerServer registers the http handlers for service AgentService to "mux". UnaryRPC :call AgentServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentServiceHandlerFromEndpoint instead.
func RegisterAgentServiceServer ¶
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
Types ¶
type AgentServiceClient ¶
type AgentServiceClient interface {
GetAgentRegistration(ctx context.Context, in *RegInfoReq, opts ...grpc.CallOption) (*RegInfo, error)
}
AgentServiceClient is the client API for AgentService 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.
func NewAgentServiceClient ¶
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient
type AgentServiceServer ¶
type AgentServiceServer interface { GetAgentRegistration(context.Context, *RegInfoReq) (*RegInfo, error) // contains filtered or unexported methods }
AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.
type OwnerCheck ¶
type OwnerCheck struct { // Types that are valid to be assigned to Auth: // // *OwnerCheck_NoAuth // *OwnerCheck_Secret Auth isOwnerCheck_Auth `protobuf_oneof:"auth"` // contains filtered or unexported fields }
Methods for ownership verification
func (*OwnerCheck) Descriptor
deprecated
func (*OwnerCheck) Descriptor() ([]byte, []int)
Deprecated: Use OwnerCheck.ProtoReflect.Descriptor instead.
func (*OwnerCheck) GetAuth ¶
func (x *OwnerCheck) GetAuth() isOwnerCheck_Auth
func (*OwnerCheck) GetNoAuth ¶
func (x *OwnerCheck) GetNoAuth() *empty.Empty
func (*OwnerCheck) GetSecret ¶
func (x *OwnerCheck) GetSecret() *SecretData
func (*OwnerCheck) ProtoMessage ¶
func (*OwnerCheck) ProtoMessage()
func (*OwnerCheck) ProtoReflect ¶
func (x *OwnerCheck) ProtoReflect() protoreflect.Message
func (*OwnerCheck) Reset ¶
func (x *OwnerCheck) Reset()
func (*OwnerCheck) String ¶
func (x *OwnerCheck) String() string
type OwnerCheck_NoAuth ¶
type OwnerCheck_Secret ¶
type OwnerCheck_Secret struct {
Secret *SecretData `protobuf:"bytes,2,opt,name=secret,proto3,oneof"`
}
type RegInfo ¶
type RegInfo struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Basic registration details
func (*RegInfo) Descriptor
deprecated
func (*RegInfo) ProtoMessage ¶
func (*RegInfo) ProtoMessage()
func (*RegInfo) ProtoReflect ¶
func (x *RegInfo) ProtoReflect() protoreflect.Message
type RegInfoReq ¶
type RegInfoReq struct { Condition *OwnerCheck `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` // contains filtered or unexported fields }
Registration info request with ownership check
func (*RegInfoReq) Descriptor
deprecated
func (*RegInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use RegInfoReq.ProtoReflect.Descriptor instead.
func (*RegInfoReq) GetCondition ¶
func (x *RegInfoReq) GetCondition() *OwnerCheck
func (*RegInfoReq) ProtoMessage ¶
func (*RegInfoReq) ProtoMessage()
func (*RegInfoReq) ProtoReflect ¶
func (x *RegInfoReq) ProtoReflect() protoreflect.Message
func (*RegInfoReq) Reset ¶
func (x *RegInfoReq) Reset()
func (*RegInfoReq) String ¶
func (x *RegInfoReq) String() string
type SecretData ¶
type SecretData struct { // Base64-encoded plain value RawValue string `protobuf:"bytes,1,opt,name=raw_value,json=rawValue,proto3" json:"raw_value,omitempty"` // Base64-encoded encrypted value: BASE64(IV(16 bytes) + ciphertext) SecureValue string `protobuf:"bytes,2,opt,name=secure_value,json=secureValue,proto3" json:"secure_value,omitempty"` // contains filtered or unexported fields }
Authentication data
func (*SecretData) Descriptor
deprecated
func (*SecretData) Descriptor() ([]byte, []int)
Deprecated: Use SecretData.ProtoReflect.Descriptor instead.
func (*SecretData) GetRawValue ¶
func (x *SecretData) GetRawValue() string
func (*SecretData) GetSecureValue ¶
func (x *SecretData) GetSecureValue() string
func (*SecretData) ProtoMessage ¶
func (*SecretData) ProtoMessage()
func (*SecretData) ProtoReflect ¶
func (x *SecretData) ProtoReflect() protoreflect.Message
func (*SecretData) Reset ¶
func (x *SecretData) Reset()
func (*SecretData) String ¶
func (x *SecretData) String() string
type UnimplementedAgentServiceServer ¶
type UnimplementedAgentServiceServer struct{}
UnimplementedAgentServiceServer 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 (UnimplementedAgentServiceServer) GetAgentRegistration ¶
func (UnimplementedAgentServiceServer) GetAgentRegistration(context.Context, *RegInfoReq) (*RegInfo, error)
type UnsafeAgentServiceServer ¶
type UnsafeAgentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.