Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDataUsageSyncServiceServer(s grpc.ServiceRegistrar, srv DataUsageSyncServiceServer)
- type DataUsageFileCreator
- type DataUsageSyncConfig
- func (*DataUsageSyncConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DataUsageSyncConfig) GetConfigMap() *config.ConfigMap
- func (x *DataUsageSyncConfig) GetTargetFile() string
- func (*DataUsageSyncConfig) ProtoMessage()
- func (x *DataUsageSyncConfig) ProtoReflect() protoreflect.Message
- func (x *DataUsageSyncConfig) Reset()
- func (x *DataUsageSyncConfig) String() string
- type DataUsageSyncResult
- func (*DataUsageSyncResult) Descriptor() ([]byte, []int)deprecated
- func (x *DataUsageSyncResult) GetError() *error1.ErrorResultdeprecated
- func (x *DataUsageSyncResult) GetStatements() int32
- func (*DataUsageSyncResult) ProtoMessage()
- func (x *DataUsageSyncResult) ProtoReflect() protoreflect.Message
- func (x *DataUsageSyncResult) Reset()
- func (x *DataUsageSyncResult) String() string
- type DataUsageSyncServiceClient
- type DataUsageSyncServiceServer
- type DataUsageSyncer
- type DataUsageSyncerPlugin
- type DataUsageSyncerVersionHandler
- type Statement
- type UnimplementedDataUsageSyncServiceServer
- type UnsafeDataUsageSyncServiceServer
Constants ¶
const ( DataUsageSyncService_CliVersionInformation_FullMethodName = "/data_usage.DataUsageSyncService/CliVersionInformation" DataUsageSyncService_SyncDataUsage_FullMethodName = "/data_usage.DataUsageSyncService/SyncDataUsage" )
const DataUsageSyncerName = "dataUsageSyncer"
DataUsageSyncerName constant should not be used directly when implementing plugins. It's the registration name for the data usage syncer plugin, used by the CLI and the cli-plugin-base library (RegisterPlugins function) to register the plugins.
Variables ¶
var DataUsageSyncService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "data_usage.DataUsageSyncService", HandlerType: (*DataUsageSyncServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CliVersionInformation", Handler: _DataUsageSyncService_CliVersionInformation_Handler, }, { MethodName: "SyncDataUsage", Handler: _DataUsageSyncService_SyncDataUsage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "data_usage/data_usage.proto", }
DataUsageSyncService_ServiceDesc is the grpc.ServiceDesc for DataUsageSyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_data_usage_data_usage_proto protoreflect.FileDescriptor
var MinimalCliVersion = semver.MustParse("0.33.0-0")
Functions ¶
func RegisterDataUsageSyncServiceServer ¶ added in v0.32.0
func RegisterDataUsageSyncServiceServer(s grpc.ServiceRegistrar, srv DataUsageSyncServiceServer)
Types ¶
type DataUsageFileCreator ¶
type DataUsageFileCreator interface { AddStatements(statements []Statement) error Close() GetStatementCount() int GetImportFileSize() uint64 }
DataUsageFileCreator describes the interface for easily creating the data usage import files to be exported from the Raito CLI.
func NewDataUsageFileCreator ¶
func NewDataUsageFileCreator(config *DataUsageSyncConfig) (DataUsageFileCreator, error)
type DataUsageSyncConfig ¶ added in v0.15.0
type DataUsageSyncConfig struct { ConfigMap *config.ConfigMap `protobuf:"bytes,1,opt,name=config_map,json=configMap,proto3" json:"config_map,omitempty"` TargetFile string `protobuf:"bytes,2,opt,name=target_file,json=targetFile,proto3" json:"target_file,omitempty"` // contains filtered or unexported fields }
DataUsageSyncConfig represents the configuration that is passed from the CLI to the DataUsageSyncer plugin interface. It contains all the necessary configuration parameters for the plugin to function.
func (*DataUsageSyncConfig) Descriptor
deprecated
added in
v0.32.0
func (*DataUsageSyncConfig) Descriptor() ([]byte, []int)
Deprecated: Use DataUsageSyncConfig.ProtoReflect.Descriptor instead.
func (*DataUsageSyncConfig) GetConfigMap ¶ added in v0.32.0
func (x *DataUsageSyncConfig) GetConfigMap() *config.ConfigMap
func (*DataUsageSyncConfig) GetTargetFile ¶ added in v0.32.0
func (x *DataUsageSyncConfig) GetTargetFile() string
func (*DataUsageSyncConfig) ProtoMessage ¶ added in v0.32.0
func (*DataUsageSyncConfig) ProtoMessage()
func (*DataUsageSyncConfig) ProtoReflect ¶ added in v0.32.0
func (x *DataUsageSyncConfig) ProtoReflect() protoreflect.Message
func (*DataUsageSyncConfig) Reset ¶ added in v0.32.0
func (x *DataUsageSyncConfig) Reset()
func (*DataUsageSyncConfig) String ¶ added in v0.32.0
func (x *DataUsageSyncConfig) String() string
type DataUsageSyncResult ¶ added in v0.15.0
type DataUsageSyncResult struct { // Deprecated: Marked as deprecated in data_usage/data_usage.proto. Error *error1.ErrorResult `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Statements int32 `protobuf:"varint,2,opt,name=statements,proto3" json:"statements,omitempty"` // contains filtered or unexported fields }
DataUsageSyncResult represents the result from the data usage sync process. A potential error is also modeled in here so specific errors remain intact when passed over RPC.
func (*DataUsageSyncResult) Descriptor
deprecated
added in
v0.32.0
func (*DataUsageSyncResult) Descriptor() ([]byte, []int)
Deprecated: Use DataUsageSyncResult.ProtoReflect.Descriptor instead.
func (*DataUsageSyncResult) GetError
deprecated
added in
v0.32.0
func (x *DataUsageSyncResult) GetError() *error1.ErrorResult
Deprecated: Marked as deprecated in data_usage/data_usage.proto.
func (*DataUsageSyncResult) GetStatements ¶ added in v0.37.0
func (x *DataUsageSyncResult) GetStatements() int32
func (*DataUsageSyncResult) ProtoMessage ¶ added in v0.32.0
func (*DataUsageSyncResult) ProtoMessage()
func (*DataUsageSyncResult) ProtoReflect ¶ added in v0.32.0
func (x *DataUsageSyncResult) ProtoReflect() protoreflect.Message
func (*DataUsageSyncResult) Reset ¶ added in v0.32.0
func (x *DataUsageSyncResult) Reset()
func (*DataUsageSyncResult) String ¶ added in v0.32.0
func (x *DataUsageSyncResult) String() string
type DataUsageSyncServiceClient ¶ added in v0.32.0
type DataUsageSyncServiceClient interface { CliVersionInformation(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*version.CliBuildInformation, error) SyncDataUsage(ctx context.Context, in *DataUsageSyncConfig, opts ...grpc.CallOption) (*DataUsageSyncResult, error) }
DataUsageSyncServiceClient is the client API for DataUsageSyncService 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 NewDataUsageSyncServiceClient ¶ added in v0.32.0
func NewDataUsageSyncServiceClient(cc grpc.ClientConnInterface) DataUsageSyncServiceClient
type DataUsageSyncServiceServer ¶ added in v0.32.0
type DataUsageSyncServiceServer interface { CliVersionInformation(context.Context, *emptypb.Empty) (*version.CliBuildInformation, error) SyncDataUsage(context.Context, *DataUsageSyncConfig) (*DataUsageSyncResult, error) // contains filtered or unexported methods }
DataUsageSyncServiceServer is the server API for DataUsageSyncService service. All implementations must embed UnimplementedDataUsageSyncServiceServer for forward compatibility
type DataUsageSyncer ¶ added in v0.15.0
type DataUsageSyncer interface { version.CliVersionHandler SyncDataUsage(ctx context.Context, config *DataUsageSyncConfig) (*DataUsageSyncResult, error) }
DataUsageSyncer interface needs to be implemented by any plugin that wants to import data usage information into a Raito data source.
type DataUsageSyncerPlugin ¶ added in v0.15.0
type DataUsageSyncerPlugin struct { plugin.Plugin Impl DataUsageSyncer }
DataUsageSyncerPlugin is used on the server (CLI) and client (plugin) side to integrate with the plugin system. A plugin should not be using this directly, but instead depend on the cli-plugin-base library to register the plugins.
func (DataUsageSyncerPlugin) GRPCClient ¶ added in v0.32.0
func (DataUsageSyncerPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*DataUsageSyncerPlugin) GRPCServer ¶ added in v0.32.0
func (p *DataUsageSyncerPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type DataUsageSyncerVersionHandler ¶ added in v0.33.0
type DataUsageSyncerVersionHandler struct { }
func (*DataUsageSyncerVersionHandler) CliVersionInformation ¶ added in v0.33.0
func (h *DataUsageSyncerVersionHandler) CliVersionInformation(ctx context.Context) (*version.CliBuildInformation, error)
type Statement ¶
type Statement struct { ExternalId string `json:"externalId"` AccessedDataObjects []ap.WhatItem `json:"accessedDataObjects"` User string `json:"user"` Role string `json:"role"` Success bool `json:"success"` Status string `json:"status"` Query string `json:"query"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Bytes int `json:"bytes"` Rows int `json:"rows"` Credits float32 `json:"credits"` }
type UnimplementedDataUsageSyncServiceServer ¶ added in v0.32.0
type UnimplementedDataUsageSyncServiceServer struct { }
UnimplementedDataUsageSyncServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDataUsageSyncServiceServer) CliVersionInformation ¶ added in v0.33.0
func (UnimplementedDataUsageSyncServiceServer) CliVersionInformation(context.Context, *emptypb.Empty) (*version.CliBuildInformation, error)
func (UnimplementedDataUsageSyncServiceServer) SyncDataUsage ¶ added in v0.32.0
func (UnimplementedDataUsageSyncServiceServer) SyncDataUsage(context.Context, *DataUsageSyncConfig) (*DataUsageSyncResult, error)
type UnsafeDataUsageSyncServiceServer ¶ added in v0.32.0
type UnsafeDataUsageSyncServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDataUsageSyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataUsageSyncServiceServer will result in compilation errors.