Documentation ¶
Overview ¶
Package remote is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterRemoteHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRemoteHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RemoteClient) error
- func RegisterRemoteHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRemoteHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RemoteServer) error
- func RegisterRemoteServer(s grpc.ServiceRegistrar, srv RemoteServer)
- type CommandStreamRequest
- func (*CommandStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommandStreamRequest) GetCommandId() string
- func (m *CommandStreamRequest) GetData() isCommandStreamRequest_Data
- func (x *CommandStreamRequest) GetError() *errdetails.ErrorInfo
- func (x *CommandStreamRequest) GetRegisterAuthorizer() *RegisterAuthorizerServerCmd
- func (x *CommandStreamRequest) GetTriggerImageDiscovery() *TriggerImageDiscoveryClientResp
- func (*CommandStreamRequest) ProtoMessage()
- func (x *CommandStreamRequest) ProtoReflect() protoreflect.Message
- func (x *CommandStreamRequest) Reset()
- func (x *CommandStreamRequest) String() string
- type CommandStreamRequest_Error
- type CommandStreamRequest_RegisterAuthorizer
- type CommandStreamRequest_TriggerImageDiscovery
- type CommandStreamResponse
- func (*CommandStreamResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommandStreamResponse) GetCommandId() string
- func (m *CommandStreamResponse) GetData() isCommandStreamResponse_Data
- func (x *CommandStreamResponse) GetError() *errdetails.ErrorInfo
- func (x *CommandStreamResponse) GetRegisterAuthorizer() *RegisterAuthorizerServerResp
- func (x *CommandStreamResponse) GetTriggerImageDiscovery() *TriggerImageDiscoveryClientCmd
- func (*CommandStreamResponse) ProtoMessage()
- func (x *CommandStreamResponse) ProtoReflect() protoreflect.Message
- func (x *CommandStreamResponse) Reset()
- func (x *CommandStreamResponse) String() string
- type CommandStreamResponse_Error
- type CommandStreamResponse_RegisterAuthorizer
- type CommandStreamResponse_TriggerImageDiscovery
- type RegisterAuthorizerServerCmd
- func (*RegisterAuthorizerServerCmd) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterAuthorizerServerCmd) GetAuthorizerId() string
- func (*RegisterAuthorizerServerCmd) ProtoMessage()
- func (x *RegisterAuthorizerServerCmd) ProtoReflect() protoreflect.Message
- func (x *RegisterAuthorizerServerCmd) Reset()
- func (x *RegisterAuthorizerServerCmd) String() string
- type RegisterAuthorizerServerResp
- func (*RegisterAuthorizerServerResp) Descriptor() ([]byte, []int)deprecated
- func (*RegisterAuthorizerServerResp) ProtoMessage()
- func (x *RegisterAuthorizerServerResp) ProtoReflect() protoreflect.Message
- func (x *RegisterAuthorizerServerResp) Reset()
- func (x *RegisterAuthorizerServerResp) String() string
- type RemoteClient
- type RemoteServer
- type Remote_CommandStreamClient
- type Remote_CommandStreamServer
- type TriggerImageDiscoveryClientCmd
- func (*TriggerImageDiscoveryClientCmd) Descriptor() ([]byte, []int)deprecated
- func (x *TriggerImageDiscoveryClientCmd) GetOrganization() string
- func (x *TriggerImageDiscoveryClientCmd) GetRepository() string
- func (*TriggerImageDiscoveryClientCmd) ProtoMessage()
- func (x *TriggerImageDiscoveryClientCmd) ProtoReflect() protoreflect.Message
- func (x *TriggerImageDiscoveryClientCmd) Reset()
- func (x *TriggerImageDiscoveryClientCmd) String() string
- type TriggerImageDiscoveryClientResp
- func (*TriggerImageDiscoveryClientResp) Descriptor() ([]byte, []int)deprecated
- func (*TriggerImageDiscoveryClientResp) ProtoMessage()
- func (x *TriggerImageDiscoveryClientResp) ProtoReflect() protoreflect.Message
- func (x *TriggerImageDiscoveryClientResp) Reset()
- func (x *TriggerImageDiscoveryClientResp) String() string
- type UnimplementedRemoteServer
- type UnsafeRemoteServer
Constants ¶
This section is empty.
Variables ¶
var File_aserto_remote_v1_remote_proto protoreflect.FileDescriptor
var Remote_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aserto.remote.v1.Remote", HandlerType: (*RemoteServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "CommandStream", Handler: _Remote_CommandStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "aserto/remote/v1/remote.proto", }
Remote_ServiceDesc is the grpc.ServiceDesc for Remote service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRemoteHandler ¶
RegisterRemoteHandler registers the http handlers for service Remote to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRemoteHandlerClient ¶
func RegisterRemoteHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RemoteClient) error
RegisterRemoteHandlerClient registers the http handlers for service Remote to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RemoteClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RemoteClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RemoteClient" to call the correct interceptors.
func RegisterRemoteHandlerFromEndpoint ¶
func RegisterRemoteHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRemoteHandlerFromEndpoint is same as RegisterRemoteHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRemoteHandlerServer ¶
func RegisterRemoteHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RemoteServer) error
RegisterRemoteHandlerServer registers the http handlers for service Remote to "mux". UnaryRPC :call RemoteServer 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 RegisterRemoteHandlerFromEndpoint instead.
func RegisterRemoteServer ¶
func RegisterRemoteServer(s grpc.ServiceRegistrar, srv RemoteServer)
Types ¶
type CommandStreamRequest ¶
type CommandStreamRequest struct { CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` // Types that are assignable to Data: // *CommandStreamRequest_Error // *CommandStreamRequest_TriggerImageDiscovery // *CommandStreamRequest_RegisterAuthorizer Data isCommandStreamRequest_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*CommandStreamRequest) Descriptor
deprecated
func (*CommandStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommandStreamRequest.ProtoReflect.Descriptor instead.
func (*CommandStreamRequest) GetCommandId ¶
func (x *CommandStreamRequest) GetCommandId() string
func (*CommandStreamRequest) GetData ¶
func (m *CommandStreamRequest) GetData() isCommandStreamRequest_Data
func (*CommandStreamRequest) GetError ¶
func (x *CommandStreamRequest) GetError() *errdetails.ErrorInfo
func (*CommandStreamRequest) GetRegisterAuthorizer ¶
func (x *CommandStreamRequest) GetRegisterAuthorizer() *RegisterAuthorizerServerCmd
func (*CommandStreamRequest) GetTriggerImageDiscovery ¶
func (x *CommandStreamRequest) GetTriggerImageDiscovery() *TriggerImageDiscoveryClientResp
func (*CommandStreamRequest) ProtoMessage ¶
func (*CommandStreamRequest) ProtoMessage()
func (*CommandStreamRequest) ProtoReflect ¶
func (x *CommandStreamRequest) ProtoReflect() protoreflect.Message
func (*CommandStreamRequest) Reset ¶
func (x *CommandStreamRequest) Reset()
func (*CommandStreamRequest) String ¶
func (x *CommandStreamRequest) String() string
type CommandStreamRequest_Error ¶
type CommandStreamRequest_Error struct {
Error *errdetails.ErrorInfo `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}
type CommandStreamRequest_RegisterAuthorizer ¶
type CommandStreamRequest_RegisterAuthorizer struct {
RegisterAuthorizer *RegisterAuthorizerServerCmd `protobuf:"bytes,4,opt,name=register_authorizer,json=registerAuthorizer,proto3,oneof"`
}
type CommandStreamRequest_TriggerImageDiscovery ¶
type CommandStreamRequest_TriggerImageDiscovery struct {
TriggerImageDiscovery *TriggerImageDiscoveryClientResp `protobuf:"bytes,3,opt,name=trigger_image_discovery,json=triggerImageDiscovery,proto3,oneof"`
}
type CommandStreamResponse ¶
type CommandStreamResponse struct { CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` // Types that are assignable to Data: // *CommandStreamResponse_Error // *CommandStreamResponse_TriggerImageDiscovery // *CommandStreamResponse_RegisterAuthorizer Data isCommandStreamResponse_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*CommandStreamResponse) Descriptor
deprecated
func (*CommandStreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommandStreamResponse.ProtoReflect.Descriptor instead.
func (*CommandStreamResponse) GetCommandId ¶
func (x *CommandStreamResponse) GetCommandId() string
func (*CommandStreamResponse) GetData ¶
func (m *CommandStreamResponse) GetData() isCommandStreamResponse_Data
func (*CommandStreamResponse) GetError ¶
func (x *CommandStreamResponse) GetError() *errdetails.ErrorInfo
func (*CommandStreamResponse) GetRegisterAuthorizer ¶
func (x *CommandStreamResponse) GetRegisterAuthorizer() *RegisterAuthorizerServerResp
func (*CommandStreamResponse) GetTriggerImageDiscovery ¶
func (x *CommandStreamResponse) GetTriggerImageDiscovery() *TriggerImageDiscoveryClientCmd
func (*CommandStreamResponse) ProtoMessage ¶
func (*CommandStreamResponse) ProtoMessage()
func (*CommandStreamResponse) ProtoReflect ¶
func (x *CommandStreamResponse) ProtoReflect() protoreflect.Message
func (*CommandStreamResponse) Reset ¶
func (x *CommandStreamResponse) Reset()
func (*CommandStreamResponse) String ¶
func (x *CommandStreamResponse) String() string
type CommandStreamResponse_Error ¶
type CommandStreamResponse_Error struct {
Error *errdetails.ErrorInfo `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}
type CommandStreamResponse_RegisterAuthorizer ¶
type CommandStreamResponse_RegisterAuthorizer struct {
RegisterAuthorizer *RegisterAuthorizerServerResp `protobuf:"bytes,4,opt,name=register_authorizer,json=registerAuthorizer,proto3,oneof"`
}
type CommandStreamResponse_TriggerImageDiscovery ¶
type CommandStreamResponse_TriggerImageDiscovery struct {
TriggerImageDiscovery *TriggerImageDiscoveryClientCmd `protobuf:"bytes,3,opt,name=trigger_image_discovery,json=triggerImageDiscovery,proto3,oneof"`
}
type RegisterAuthorizerServerCmd ¶
type RegisterAuthorizerServerCmd struct { AuthorizerId string `protobuf:"bytes,1,opt,name=authorizer_id,json=authorizerId,proto3" json:"authorizer_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterAuthorizerServerCmd) Descriptor
deprecated
func (*RegisterAuthorizerServerCmd) Descriptor() ([]byte, []int)
Deprecated: Use RegisterAuthorizerServerCmd.ProtoReflect.Descriptor instead.
func (*RegisterAuthorizerServerCmd) GetAuthorizerId ¶
func (x *RegisterAuthorizerServerCmd) GetAuthorizerId() string
func (*RegisterAuthorizerServerCmd) ProtoMessage ¶
func (*RegisterAuthorizerServerCmd) ProtoMessage()
func (*RegisterAuthorizerServerCmd) ProtoReflect ¶
func (x *RegisterAuthorizerServerCmd) ProtoReflect() protoreflect.Message
func (*RegisterAuthorizerServerCmd) Reset ¶
func (x *RegisterAuthorizerServerCmd) Reset()
func (*RegisterAuthorizerServerCmd) String ¶
func (x *RegisterAuthorizerServerCmd) String() string
type RegisterAuthorizerServerResp ¶
type RegisterAuthorizerServerResp struct {
// contains filtered or unexported fields
}
func (*RegisterAuthorizerServerResp) Descriptor
deprecated
func (*RegisterAuthorizerServerResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterAuthorizerServerResp.ProtoReflect.Descriptor instead.
func (*RegisterAuthorizerServerResp) ProtoMessage ¶
func (*RegisterAuthorizerServerResp) ProtoMessage()
func (*RegisterAuthorizerServerResp) ProtoReflect ¶
func (x *RegisterAuthorizerServerResp) ProtoReflect() protoreflect.Message
func (*RegisterAuthorizerServerResp) Reset ¶
func (x *RegisterAuthorizerServerResp) Reset()
func (*RegisterAuthorizerServerResp) String ¶
func (x *RegisterAuthorizerServerResp) String() string
type RemoteClient ¶
type RemoteClient interface {
CommandStream(ctx context.Context, opts ...grpc.CallOption) (Remote_CommandStreamClient, error)
}
RemoteClient is the client API for Remote 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 NewRemoteClient ¶
func NewRemoteClient(cc grpc.ClientConnInterface) RemoteClient
type RemoteServer ¶
type RemoteServer interface {
CommandStream(Remote_CommandStreamServer) error
}
RemoteServer is the server API for Remote service. All implementations should embed UnimplementedRemoteServer for forward compatibility
type Remote_CommandStreamClient ¶
type Remote_CommandStreamClient interface { Send(*CommandStreamRequest) error Recv() (*CommandStreamResponse, error) grpc.ClientStream }
type Remote_CommandStreamServer ¶
type Remote_CommandStreamServer interface { Send(*CommandStreamResponse) error Recv() (*CommandStreamRequest, error) grpc.ServerStream }
type TriggerImageDiscoveryClientCmd ¶
type TriggerImageDiscoveryClientCmd struct { Organization string `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"` Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` // contains filtered or unexported fields }
func (*TriggerImageDiscoveryClientCmd) Descriptor
deprecated
func (*TriggerImageDiscoveryClientCmd) Descriptor() ([]byte, []int)
Deprecated: Use TriggerImageDiscoveryClientCmd.ProtoReflect.Descriptor instead.
func (*TriggerImageDiscoveryClientCmd) GetOrganization ¶
func (x *TriggerImageDiscoveryClientCmd) GetOrganization() string
func (*TriggerImageDiscoveryClientCmd) GetRepository ¶
func (x *TriggerImageDiscoveryClientCmd) GetRepository() string
func (*TriggerImageDiscoveryClientCmd) ProtoMessage ¶
func (*TriggerImageDiscoveryClientCmd) ProtoMessage()
func (*TriggerImageDiscoveryClientCmd) ProtoReflect ¶
func (x *TriggerImageDiscoveryClientCmd) ProtoReflect() protoreflect.Message
func (*TriggerImageDiscoveryClientCmd) Reset ¶
func (x *TriggerImageDiscoveryClientCmd) Reset()
func (*TriggerImageDiscoveryClientCmd) String ¶
func (x *TriggerImageDiscoveryClientCmd) String() string
type TriggerImageDiscoveryClientResp ¶
type TriggerImageDiscoveryClientResp struct {
// contains filtered or unexported fields
}
func (*TriggerImageDiscoveryClientResp) Descriptor
deprecated
func (*TriggerImageDiscoveryClientResp) Descriptor() ([]byte, []int)
Deprecated: Use TriggerImageDiscoveryClientResp.ProtoReflect.Descriptor instead.
func (*TriggerImageDiscoveryClientResp) ProtoMessage ¶
func (*TriggerImageDiscoveryClientResp) ProtoMessage()
func (*TriggerImageDiscoveryClientResp) ProtoReflect ¶
func (x *TriggerImageDiscoveryClientResp) ProtoReflect() protoreflect.Message
func (*TriggerImageDiscoveryClientResp) Reset ¶
func (x *TriggerImageDiscoveryClientResp) Reset()
func (*TriggerImageDiscoveryClientResp) String ¶
func (x *TriggerImageDiscoveryClientResp) String() string
type UnimplementedRemoteServer ¶
type UnimplementedRemoteServer struct { }
UnimplementedRemoteServer should be embedded to have forward compatible implementations.
func (UnimplementedRemoteServer) CommandStream ¶
func (UnimplementedRemoteServer) CommandStream(Remote_CommandStreamServer) error
type UnsafeRemoteServer ¶
type UnsafeRemoteServer interface {
// contains filtered or unexported methods
}
UnsafeRemoteServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RemoteServer will result in compilation errors.