Documentation ¶
Overview ¶
Package exporter is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterExporterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterExporterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExporterClient) error
- func RegisterExporterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterExporterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExporterServer) error
- func RegisterExporterServer(s grpc.ServiceRegistrar, srv ExporterServer)
- type ExportRequest
- func (*ExportRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExportRequest) GetOptions() uint32
- func (x *ExportRequest) GetStartFrom() *timestamppb.Timestamp
- func (*ExportRequest) ProtoMessage()
- func (x *ExportRequest) ProtoReflect() protoreflect.Message
- func (x *ExportRequest) Reset()
- func (x *ExportRequest) String() string
- type ExportResponse
- func (*ExportResponse) Descriptor() ([]byte, []int)deprecated
- func (m *ExportResponse) GetMsg() isExportResponse_Msg
- func (x *ExportResponse) GetObject() *v3.Object
- func (x *ExportResponse) GetRelation() *v3.Relation
- func (*ExportResponse) ProtoMessage()
- func (x *ExportResponse) ProtoReflect() protoreflect.Message
- func (x *ExportResponse) Reset()
- func (x *ExportResponse) String() string
- type ExportResponse_Object
- type ExportResponse_Relation
- type ExporterClient
- type ExporterServer
- type Exporter_ExportClient
- type Exporter_ExportServer
- type Option
- type UnimplementedExporterServer
- type UnsafeExporterServer
Constants ¶
const (
Exporter_Export_FullMethodName = "/aserto.directory.exporter.v3.Exporter/Export"
)
Variables ¶
var ( Option_name = map[int32]string{ 0: "OPTION_UNKNOWN", 8: "OPTION_DATA_OBJECTS", 16: "OPTION_DATA_RELATIONS", 24: "OPTION_DATA", } Option_value = map[string]int32{ "OPTION_UNKNOWN": 0, "OPTION_DATA_OBJECTS": 8, "OPTION_DATA_RELATIONS": 16, "OPTION_DATA": 24, } )
Enum value maps for Option.
var Exporter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aserto.directory.exporter.v3.Exporter", HandlerType: (*ExporterServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Export", Handler: _Exporter_Export_Handler, ServerStreams: true, }, }, Metadata: "aserto/directory/exporter/v3/exporter.proto", }
Exporter_ServiceDesc is the grpc.ServiceDesc for Exporter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_aserto_directory_exporter_v3_exporter_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExporterHandler ¶
func RegisterExporterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterExporterHandler registers the http handlers for service Exporter to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterExporterHandlerClient ¶
func RegisterExporterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExporterClient) error
RegisterExporterHandlerClient registers the http handlers for service Exporter to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExporterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExporterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ExporterClient" to call the correct interceptors.
func RegisterExporterHandlerFromEndpoint ¶
func RegisterExporterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterExporterHandlerFromEndpoint is same as RegisterExporterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterExporterHandlerServer ¶
func RegisterExporterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExporterServer) error
RegisterExporterHandlerServer registers the http handlers for service Exporter to "mux". UnaryRPC :call ExporterServer 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 RegisterExporterHandlerFromEndpoint instead.
func RegisterExporterServer ¶
func RegisterExporterServer(s grpc.ServiceRegistrar, srv ExporterServer)
Types ¶
type ExportRequest ¶
type ExportRequest struct { // data export options mask Options uint32 `protobuf:"varint,1,opt,name=options,proto3" json:"options,omitempty"` // start export from timestamp (UTC) StartFrom *timestamppb.Timestamp `protobuf:"bytes,20,opt,name=start_from,json=startFrom,proto3" json:"start_from,omitempty"` // contains filtered or unexported fields }
func (*ExportRequest) Descriptor
deprecated
func (*ExportRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.
func (*ExportRequest) GetOptions ¶
func (x *ExportRequest) GetOptions() uint32
func (*ExportRequest) GetStartFrom ¶
func (x *ExportRequest) GetStartFrom() *timestamppb.Timestamp
func (*ExportRequest) ProtoMessage ¶
func (*ExportRequest) ProtoMessage()
func (*ExportRequest) ProtoReflect ¶
func (x *ExportRequest) ProtoReflect() protoreflect.Message
func (*ExportRequest) Reset ¶
func (x *ExportRequest) Reset()
func (*ExportRequest) String ¶
func (x *ExportRequest) String() string
type ExportResponse ¶
type ExportResponse struct { // Types that are assignable to Msg: // // *ExportResponse_Object // *ExportResponse_Relation Msg isExportResponse_Msg `protobuf_oneof:"msg"` // contains filtered or unexported fields }
func (*ExportResponse) Descriptor
deprecated
func (*ExportResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExportResponse.ProtoReflect.Descriptor instead.
func (*ExportResponse) GetMsg ¶
func (m *ExportResponse) GetMsg() isExportResponse_Msg
func (*ExportResponse) GetObject ¶
func (x *ExportResponse) GetObject() *v3.Object
func (*ExportResponse) GetRelation ¶
func (x *ExportResponse) GetRelation() *v3.Relation
func (*ExportResponse) ProtoMessage ¶
func (*ExportResponse) ProtoMessage()
func (*ExportResponse) ProtoReflect ¶
func (x *ExportResponse) ProtoReflect() protoreflect.Message
func (*ExportResponse) Reset ¶
func (x *ExportResponse) Reset()
func (*ExportResponse) String ¶
func (x *ExportResponse) String() string
type ExportResponse_Object ¶
type ExportResponse_Relation ¶
type ExporterClient ¶
type ExporterClient interface {
Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (Exporter_ExportClient, error)
}
ExporterClient is the client API for Exporter 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 NewExporterClient ¶
func NewExporterClient(cc grpc.ClientConnInterface) ExporterClient
type ExporterServer ¶
type ExporterServer interface {
Export(*ExportRequest, Exporter_ExportServer) error
}
ExporterServer is the server API for Exporter service. All implementations should embed UnimplementedExporterServer for forward compatibility
type Exporter_ExportClient ¶
type Exporter_ExportClient interface { Recv() (*ExportResponse, error) grpc.ClientStream }
type Exporter_ExportServer ¶
type Exporter_ExportServer interface { Send(*ExportResponse) error grpc.ServerStream }
type Option ¶
type Option int32
const ( // nothing selected (default initialization value) Option_OPTION_UNKNOWN Option = 0 // object instances Option_OPTION_DATA_OBJECTS Option = 8 // relation instances Option_OPTION_DATA_RELATIONS Option = 16 // all data = OPTION_DATA_OBJECTS | OPTION_DATA_RELATIONS Option_OPTION_DATA Option = 24 )
func (Option) Descriptor ¶
func (Option) Descriptor() protoreflect.EnumDescriptor
func (Option) EnumDescriptor
deprecated
func (Option) Number ¶
func (x Option) Number() protoreflect.EnumNumber
func (Option) Type ¶
func (Option) Type() protoreflect.EnumType
type UnimplementedExporterServer ¶
type UnimplementedExporterServer struct { }
UnimplementedExporterServer should be embedded to have forward compatible implementations.
func (UnimplementedExporterServer) Export ¶
func (UnimplementedExporterServer) Export(*ExportRequest, Exporter_ExportServer) error
type UnsafeExporterServer ¶
type UnsafeExporterServer interface {
// contains filtered or unexported methods
}
UnsafeExporterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExporterServer will result in compilation errors.