exporter

package
v0.33.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 10

Documentation

Overview

Package exporter is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Exporter_Export_FullMethodName = "/aserto.directory.exporter.v3.Exporter/Export"
)

Variables

View Source
var (
	Option_name = map[int32]string{
		0:  "OPTION_UNKNOWN",
		8:  "OPTION_DATA_OBJECTS",
		16: "OPTION_DATA_RELATIONS",
		24: "OPTION_DATA",
		64: "OPTION_STATS",
	}
	Option_value = map[string]int32{
		"OPTION_UNKNOWN":        0,
		"OPTION_DATA_OBJECTS":   8,
		"OPTION_DATA_RELATIONS": 16,
		"OPTION_DATA":           24,
		"OPTION_STATS":          64,
	}
)

Enum value maps for Option.

View Source
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)

View Source
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. This client ignores the HTTP middlewares.

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. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

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) CloneMessageVT added in v0.33.2

func (m *ExportRequest) CloneMessageVT() proto.Message

func (*ExportRequest) CloneVT added in v0.33.2

func (m *ExportRequest) CloneVT() *ExportRequest

func (*ExportRequest) Descriptor deprecated

func (*ExportRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.

func (*ExportRequest) EqualMessageVT added in v0.33.2

func (this *ExportRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*ExportRequest) EqualVT added in v0.33.2

func (this *ExportRequest) EqualVT(that *ExportRequest) bool

func (*ExportRequest) GetOptions

func (x *ExportRequest) GetOptions() uint32

func (*ExportRequest) GetStartFrom

func (x *ExportRequest) GetStartFrom() *timestamppb.Timestamp

func (*ExportRequest) MarshalToSizedBufferVT added in v0.33.2

func (m *ExportRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExportRequest) MarshalToVT added in v0.33.2

func (m *ExportRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ExportRequest) MarshalVT added in v0.33.2

func (m *ExportRequest) MarshalVT() (dAtA []byte, err error)

func (*ExportRequest) ProtoMessage

func (*ExportRequest) ProtoMessage()

func (*ExportRequest) ProtoReflect

func (x *ExportRequest) ProtoReflect() protoreflect.Message

func (*ExportRequest) Reset

func (x *ExportRequest) Reset()

func (*ExportRequest) SizeVT added in v0.33.2

func (m *ExportRequest) SizeVT() (n int)

func (*ExportRequest) String

func (x *ExportRequest) String() string

func (*ExportRequest) UnmarshalVT added in v0.33.2

func (m *ExportRequest) UnmarshalVT(dAtA []byte) error

type ExportResponse

type ExportResponse struct {

	// Types that are assignable to Msg:
	//
	//	*ExportResponse_Object
	//	*ExportResponse_Relation
	//	*ExportResponse_Stats
	Msg isExportResponse_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

func (*ExportResponse) CloneMessageVT added in v0.33.2

func (m *ExportResponse) CloneMessageVT() proto.Message

func (*ExportResponse) CloneVT added in v0.33.2

func (m *ExportResponse) CloneVT() *ExportResponse

func (*ExportResponse) Descriptor deprecated

func (*ExportResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExportResponse.ProtoReflect.Descriptor instead.

func (*ExportResponse) EqualMessageVT added in v0.33.2

func (this *ExportResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*ExportResponse) EqualVT added in v0.33.2

func (this *ExportResponse) EqualVT(that *ExportResponse) bool

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) GetStats added in v0.30.6

func (x *ExportResponse) GetStats() *structpb.Struct

func (*ExportResponse) MarshalToSizedBufferVT added in v0.33.2

func (m *ExportResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExportResponse) MarshalToVT added in v0.33.2

func (m *ExportResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ExportResponse) MarshalVT added in v0.33.2

func (m *ExportResponse) MarshalVT() (dAtA []byte, err error)

func (*ExportResponse) ProtoMessage

func (*ExportResponse) ProtoMessage()

func (*ExportResponse) ProtoReflect

func (x *ExportResponse) ProtoReflect() protoreflect.Message

func (*ExportResponse) Reset

func (x *ExportResponse) Reset()

func (*ExportResponse) SizeVT added in v0.33.2

func (m *ExportResponse) SizeVT() (n int)

func (*ExportResponse) String

func (x *ExportResponse) String() string

func (*ExportResponse) UnmarshalVT added in v0.33.2

func (m *ExportResponse) UnmarshalVT(dAtA []byte) error

type ExportResponse_Object

type ExportResponse_Object struct {
	// object instance (data)
	Object *v3.Object `protobuf:"bytes,2,opt,name=object,proto3,oneof"`
}

func (*ExportResponse_Object) CloneVT added in v0.33.2

func (m *ExportResponse_Object) CloneVT() isExportResponse_Msg

func (*ExportResponse_Object) EqualVT added in v0.33.2

func (this *ExportResponse_Object) EqualVT(thatIface isExportResponse_Msg) bool

func (*ExportResponse_Object) MarshalToSizedBufferVT added in v0.33.2

func (m *ExportResponse_Object) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExportResponse_Object) MarshalToVT added in v0.33.2

func (m *ExportResponse_Object) MarshalToVT(dAtA []byte) (int, error)

func (*ExportResponse_Object) SizeVT added in v0.33.2

func (m *ExportResponse_Object) SizeVT() (n int)

type ExportResponse_Relation

type ExportResponse_Relation struct {
	// relation instance (data)
	Relation *v3.Relation `protobuf:"bytes,4,opt,name=relation,proto3,oneof"`
}

func (*ExportResponse_Relation) CloneVT added in v0.33.2

func (m *ExportResponse_Relation) CloneVT() isExportResponse_Msg

func (*ExportResponse_Relation) EqualVT added in v0.33.2

func (this *ExportResponse_Relation) EqualVT(thatIface isExportResponse_Msg) bool

func (*ExportResponse_Relation) MarshalToSizedBufferVT added in v0.33.2

func (m *ExportResponse_Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExportResponse_Relation) MarshalToVT added in v0.33.2

func (m *ExportResponse_Relation) MarshalToVT(dAtA []byte) (int, error)

func (*ExportResponse_Relation) SizeVT added in v0.33.2

func (m *ExportResponse_Relation) SizeVT() (n int)

type ExportResponse_Stats added in v0.30.6

type ExportResponse_Stats struct {
	// object and/or relation stats (no data)
	Stats *structpb.Struct `protobuf:"bytes,8,opt,name=stats,proto3,oneof"`
}

func (*ExportResponse_Stats) CloneVT added in v0.33.2

func (m *ExportResponse_Stats) CloneVT() isExportResponse_Msg

func (*ExportResponse_Stats) EqualVT added in v0.33.2

func (this *ExportResponse_Stats) EqualVT(thatIface isExportResponse_Msg) bool

func (*ExportResponse_Stats) MarshalToSizedBufferVT added in v0.33.2

func (m *ExportResponse_Stats) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExportResponse_Stats) MarshalToVT added in v0.33.2

func (m *ExportResponse_Stats) MarshalToVT(dAtA []byte) (int, error)

func (*ExportResponse_Stats) SizeVT added in v0.33.2

func (m *ExportResponse_Stats) SizeVT() (n int)

type ExporterClient

type ExporterClient interface {
	// export objects and relations as a stream
	Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportResponse], 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 objects and relations as a stream
	Export(*ExportRequest, grpc.ServerStreamingServer[ExportResponse]) error
}

ExporterServer is the server API for Exporter service. All implementations should embed UnimplementedExporterServer for forward compatibility.

type Exporter_ExportClient

type Exporter_ExportClient = grpc.ServerStreamingClient[ExportResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Exporter_ExportServer

type Exporter_ExportServer = grpc.ServerStreamingServer[ExportResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

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
	// stats
	Option_OPTION_STATS Option = 64
)

func (Option) Descriptor

func (Option) Descriptor() protoreflect.EnumDescriptor

func (Option) Enum

func (x Option) Enum() *Option

func (Option) EnumDescriptor deprecated

func (Option) EnumDescriptor() ([]byte, []int)

Deprecated: Use Option.Descriptor instead.

func (Option) Number

func (x Option) Number() protoreflect.EnumNumber

func (Option) String

func (x Option) String() string

func (Option) Type

func (Option) Type() protoreflect.EnumType

type UnimplementedExporterServer

type UnimplementedExporterServer struct{}

UnimplementedExporterServer 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 (UnimplementedExporterServer) Export

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL