data_usage

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

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

This section is empty.

Functions

This section is empty.

Types

type DataUsageFileCreator

type DataUsageFileCreator interface {
	AddStatements(statements []Statement) error
	Close()
	GetStatementCount() int
}

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 {
	config.ConfigMap
	TargetFile string
}

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.

type DataUsageSyncResult added in v0.15.0

type DataUsageSyncResult struct {
	Error *error2.ErrorResult
}

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.

type DataUsageSyncer added in v0.15.0

type DataUsageSyncer interface {
	SyncDataUsage(config *DataUsageSyncConfig) DataUsageSyncResult
}

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 {
	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) Client added in v0.15.0

func (DataUsageSyncerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*DataUsageSyncerPlugin) Server added in v0.15.0

func (p *DataUsageSyncerPlugin) Server(*plugin.MuxBroker) (interface{}, 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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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