actions

package
v0.12.30 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: LGPL-3.0, LGPL-3.0 Imports: 104 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const IntegrationRuntimeInstallTopic = "daptin.integration.install"

Variables

View Source
var EntityTypeToColumnTypeMap = map[fieldtypes.EntityType]string{
	fieldtypes.DateTime:    "datetime",
	fieldtypes.Id:          "label",
	fieldtypes.Time:        "time",
	fieldtypes.Date:        "date",
	fieldtypes.Ipaddress:   "label",
	fieldtypes.Money:       "measurement",
	fieldtypes.Rating5:     "measurement",
	fieldtypes.Rating10:    "measurement",
	fieldtypes.Rating100:   "measurement",
	fieldtypes.Timestamp:   "timestamp",
	fieldtypes.NumberInt:   "measurement",
	fieldtypes.NumberFloat: "measurement",
	fieldtypes.Boolean:     "truefalse",
	fieldtypes.Latitude:    "location.latitude",
	fieldtypes.Longitude:   "location.longitude",
	fieldtypes.City:        "label",
	fieldtypes.Country:     "label",
	fieldtypes.Continent:   "label",
	fieldtypes.State:       "label",
	fieldtypes.Pincode:     "label",
	fieldtypes.None:        "content",
	fieldtypes.Label:       "label",
	fieldtypes.Name:        "name",
	fieldtypes.Email:       "email",
	fieldtypes.Content:     "content",
	fieldtypes.Json:        "json",
	fieldtypes.Color:       "color",
	fieldtypes.Alias:       "alias",
	fieldtypes.Namespace:   "namespace",
}

Functions

func BeginsWithCheck

func BeginsWithCheck(str string, beginsWith string) bool

func CreateIntegrationRequestBody added in v0.12.6

func CreateIntegrationRequestBody(mode Mode, mediaType string, schema *openapi3.Schema, values map[string]interface{}) (interface{}, error)

func CreateIntegrationRequestBodyFromSchemaRef added in v0.12.8

func CreateIntegrationRequestBodyFromSchemaRef(mode Mode, mediaType string, schemaRef *openapi3.SchemaRef, values map[string]interface{}) (interface{}, error)

func CreateRequestBody

func CreateRequestBody(mode Mode, mediaType string, name string, schema *openapi3.Schema, values map[string]interface{}) (interface{}, error)

OpenAPIExample creates an example structure from an OpenAPI 3 schema object, which is an extended subset of JSON Schema. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#schemaObject

func CreateStreamingExportWriter

func CreateStreamingExportWriter(format ExportFormat) (resource.StreamingExportWriter, error)

CreateStreamingExportWriter creates the appropriate writer based on format

func EndsWith

func EndsWith(str string, endsWith string) (string, bool)

func EndsWithCheck

func EndsWithCheck(str string, endsWith string) bool

func GetBodyParameterNames

func GetBodyParameterNames(mode Mode, name string, schema *openapi3.Schema) ([]string, error)

func GetBodyParameterNamesFromSchemaRef added in v0.12.8

func GetBodyParameterNamesFromSchemaRef(mode Mode, required bool, schemaRef *openapi3.SchemaRef) ([]string, error)

func GetDataArray

func GetDataArray(sheet *xlsx.Sheet) (dataMap []map[string]interface{}, columnNames []string, err error)

func GetFakeRow

func GetFakeRow(columns []api2go.ColumnInfo) map[string]interface{}

func GetOauthConnectionDescription

func GetOauthConnectionDescription(authenticator string, dbResource *resource.DbResource, transaction *sqlx.Tx) (*oauth2.Config, daptinid.DaptinReferenceId, map[string]interface{}, error)

func GetParametersNames

func GetParametersNames(s string) ([]string, error)

func GetTokensScope

func GetTokensScope(tokUrl string, scope string, clientId string, clientSecret string, token string) (map[string]interface{}, error)

func GetValueAsArrayString

func GetValueAsArrayString(inFields map[string]interface{}, keyName string) []string

func NewAcmeTlsCertificateGenerateActionPerformer

func NewAcmeTlsCertificateGenerateActionPerformer(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, hostSwitch *gin.Engine, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewActionCommitTransactionPerformer

func NewActionCommitTransactionPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewAwsMailSendActionPerformer

func NewAwsMailSendActionPerformer(cruds map[string]*resource.DbResource, mailDaemon *guerrilla.Daemon, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewBecomeAdminPerformer

func NewBecomeAdminPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewCloudStoreFileDeleteActionPerformer

func NewCloudStoreFileDeleteActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCloudStoreFileGetActionPerformer

func NewCloudStoreFileGetActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCloudStoreFileListActionPerformer

func NewCloudStoreFileListActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCloudStoreFolderCreateActionPerformer

func NewCloudStoreFolderCreateActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCloudStorePathMoveActionPerformer

func NewCloudStorePathMoveActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCloudStoreSiteCreateActionPerformer

func NewCloudStoreSiteCreateActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewCommandExecuteActionPerformer

func NewCommandExecuteActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

Create a new action performer for command execute using exec.Command

func NewDeleteWorldColumnPerformer

func NewDeleteWorldColumnPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewDeleteWorldPerformer

func NewDeleteWorldPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewDownloadCmsConfigPerformer

func NewDownloadCmsConfigPerformer(initConfig *resource.CmsConfig) (actionresponse.ActionPerformerInterface, error)

func NewExportCsvDataPerformer

func NewExportCsvDataPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewExportDataPerformer

func NewExportDataPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

NewExportDataPerformer creates a new instance of the export data performer

func NewGenerateJwtTokenPerformer

func NewGenerateJwtTokenPerformer(configStore *resource.ConfigStore, cruds map[string]*resource.DbResource, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewGenerateOauth2TokenPerformer

func NewGenerateOauth2TokenPerformer(configStore *resource.ConfigStore, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewGeneratePasswordResetActionPerformer

func NewGeneratePasswordResetActionPerformer(configStore *resource.ConfigStore, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewGeneratePasswordResetVerifyActionPerformer

func NewGeneratePasswordResetVerifyActionPerformer(configStore *resource.ConfigStore, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewGraphqlEnablePerformer

func NewGraphqlEnablePerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewImportCloudStoreFilesPerformer

func NewImportCloudStoreFilesPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewImportDataPerformer

func NewImportDataPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

NewImportDataPerformer creates a new instance of the import data performer

func NewIntegrationActionPerformer

func NewIntegrationActionPerformer(integration resource.Integration, initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (performer actionresponse.ActionPerformerInterface, err error)

Create a new action performer for becoming administrator action

func NewIntegrationInstallationPerformer

func NewIntegrationInstallationPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx, instanceID string) (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewLLMChatPerformer added in v0.11.7

func NewLLMChatPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, provider *llm.GoAIProvider) (actionresponse.ActionPerformerInterface, error)

func NewLLMEmbeddingPerformer added in v0.11.7

func NewLLMEmbeddingPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, provider *llm.GoAIProvider) (actionresponse.ActionPerformerInterface, error)

func NewMailSendActionPerformer

func NewMailSendActionPerformer(cruds map[string]*resource.DbResource, mailDaemon *guerrilla.Daemon, certificateManager *resource.CertificateManager) (actionresponse.ActionPerformerInterface, error)

func NewMailServersSyncActionPerformer

func NewMailServersSyncActionPerformer(cruds map[string]*resource.DbResource, mailDaemon *guerrilla.Daemon, certificateManager *resource.CertificateManager) (actionresponse.ActionPerformerInterface, error)

func NewMailboxStatusActionPerformer added in v0.12.17

func NewMailboxStatusActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewMakeResponsePerformer

func NewMakeResponsePerformer() (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewNetworkRequestPerformer

func NewNetworkRequestPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientDisablePerformer added in v0.11.6

func NewOAuthClientDisablePerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientEnablePerformer added in v0.11.6

func NewOAuthClientEnablePerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientRegisterPerformer added in v0.11.6

func NewOAuthClientRegisterPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientRevokeTokensPerformer added in v0.11.6

func NewOAuthClientRevokeTokensPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientRotateSecretPerformer added in v0.11.6

func NewOAuthClientRotateSecretPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOAuthClientUpdatePerformer added in v0.11.6

func NewOAuthClientUpdatePerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewOauthLoginBeginActionPerformer

func NewOauthLoginBeginActionPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewOauthLoginResponseActionPerformer

func NewOauthLoginResponseActionPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewOtpGenerateActionPerformer

func NewOtpGenerateActionPerformer(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewOtpLoginVerifyActionPerformer

func NewOtpLoginVerifyActionPerformer(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewOuathProfileExchangePerformer

func NewOuathProfileExchangePerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewPublishToTopicPerformer

func NewPublishToTopicPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewRandomDataGeneratePerformer

func NewRandomDataGeneratePerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewRandomValueGeneratePerformer

func NewRandomValueGeneratePerformer() (actionresponse.ActionPerformerInterface, error)

Create a new action performer for becoming administrator action

func NewRenameWorldColumnPerformer

func NewRenameWorldColumnPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewRenderTemplateActionPerformer

func NewRenderTemplateActionPerformer(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewRestartSystemPerformer

func NewRestartSystemPerformer(initConfig *resource.CmsConfig) (actionresponse.ActionPerformerInterface, error)

func NewSelfTlsCertificateGenerateActionPerformer

func NewSelfTlsCertificateGenerateActionPerformer(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, certificateManager *resource.CertificateManager, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewSwitchSessionUserActionPerformer

func NewSwitchSessionUserActionPerformer(configStore *resource.ConfigStore, cruds map[string]*resource.DbResource, transaction *sqlx.Tx) (actionresponse.ActionPerformerInterface, error)

func NewSyncColumnStorageActionPerformer

func NewSyncColumnStorageActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewSyncSiteStorageActionPerformer

func NewSyncSiteStorageActionPerformer(cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewUploadCsvFileToEntityPerformer

func NewUploadCsvFileToEntityPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func NewUploadFileToEntityPerformer

func NewUploadFileToEntityPerformer(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) (actionresponse.ActionPerformerInterface, error)

func ParseRsaPrivateKeyFromPemStr

func ParseRsaPrivateKeyFromPemStr(privPEM string) (*rsa.PrivateKey, error)

func PublishIntegrationRuntimeInstallEvent added in v0.12.12

func PublishIntegrationRuntimeInstallEvent(cruds map[string]*resource.DbResource, referenceID daptinid.DaptinReferenceId, providerName string, requestID string, sourceInstanceID string) error

func RefreshIntegrationRuntimeByReferenceID added in v0.12.12

func RefreshIntegrationRuntimeByReferenceID(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, referenceID daptinid.DaptinReferenceId) error

func RefreshIntegrationRuntimeFromRow added in v0.12.12

func RefreshIntegrationRuntimeFromRow(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, integration map[string]interface{}, transaction *sqlx.Tx) error

func SmallSnakeCaseText

func SmallSnakeCaseText(str string) string

func StartIntegrationRuntimeInstallSubscriber added in v0.12.12

func StartIntegrationRuntimeInstallSubscriber(cruds map[string]*resource.DbResource, configStore *resource.ConfigStore, sourceInstanceID string)

func ToURLQuery

func ToURLQuery(input interface{}) map[string]string

ToURLQuery converts a Go object into a x-www-form-urlencoded query string

Types

type ExportFormat

type ExportFormat string

ExportFormat represents supported export formats

const (
	// FormatJSON exports data as JSON
	FormatJSON ExportFormat = "json"
	// FormatCSV exports data as CSV
	FormatCSV ExportFormat = "csv"
	// FormatXLSX exports data as Excel spreadsheet
	FormatXLSX ExportFormat = "xlsx"
	// FormatPDF exports data as PDF
	FormatPDF ExportFormat = "pdf"
	// FormatHTML exports data as HTML (HTML document)
	FormatHTML ExportFormat = "html"
)

type ImportFormat

type ImportFormat string

ImportFormat represents supported import formats

const (
	// ImportFormatJSON imports data from JSON
	ImportFormatJSON ImportFormat = "json"
	// ImportFormatCSV imports data from CSV
	ImportFormatCSV ImportFormat = "csv"
	// ImportFormatXLSX imports data from Excel spreadsheet
	ImportFormatXLSX ImportFormat = "xlsx"
)

func DetectFileFormat

func DetectFileFormat(fileContent []byte, fileName string) ImportFormat

DetectFileFormat attempts to determine the format of the import file

type IntegrationRuntimeInstallMessage added in v0.12.12

type IntegrationRuntimeInstallMessage struct {
	ReferenceID      string `json:"reference_id"`
	ProviderName     string `json:"provider_name"`
	RequestID        string `json:"request_id"`
	SourceInstanceID string `json:"source_instance_id"`
}

type Mode

type Mode int

Mode defines a mode of operation for example generation.

const (
	// ModeRequest is for the request body (writes to the server)
	ModeRequest Mode = iota
	// ModeResponse is for the response body (reads from the server)
	ModeResponse
)

type StreamingCSVParser

type StreamingCSVParser struct {
	// contains filtered or unexported fields
}

StreamingCSVParser implements CSV import parsing

func (*StreamingCSVParser) GetColumnsForTable

func (p *StreamingCSVParser) GetColumnsForTable(tableName string) ([]string, error)

GetColumnsForTable returns the column names for a specific table

func (*StreamingCSVParser) GetFormat

func (p *StreamingCSVParser) GetFormat() ImportFormat

GetFormat returns the format of this parser

func (*StreamingCSVParser) GetTableNames

func (p *StreamingCSVParser) GetTableNames() ([]string, error)

GetTableNames returns the names of tables in the CSV

func (*StreamingCSVParser) Initialize

func (p *StreamingCSVParser) Initialize(fileContent []byte, tableName string) error

Initialize prepares the CSV parser

func (*StreamingCSVParser) ParseRows

func (p *StreamingCSVParser) ParseRows(tableName string, batchSize int, handler func(rows []map[string]interface{}) error) error

ParseRows processes rows for a specific table

type StreamingCSVWriter

type StreamingCSVWriter struct {
	// contains filtered or unexported fields
}

StreamingCSVWriter implements streaming CSV export

func (*StreamingCSVWriter) Finalize

func (w *StreamingCSVWriter) Finalize() ([]byte, error)

Finalize completes the CSV export

func (*StreamingCSVWriter) Initialize

func (w *StreamingCSVWriter) Initialize(tableNames []string, includeHeaders bool, selectedColumns map[string][]string) error

Initialize prepares the CSV writer

func (*StreamingCSVWriter) WriteHeaders

func (w *StreamingCSVWriter) WriteHeaders(tableName string, columns []string) error

WriteHeaders writes column headers for CSV

func (*StreamingCSVWriter) WriteRows

func (w *StreamingCSVWriter) WriteRows(tableName string, rows []map[string]interface{}) error

WriteRows writes a batch of rows in CSV format

func (*StreamingCSVWriter) WriteTable

func (w *StreamingCSVWriter) WriteTable(tableName string) error

WriteTable writes a table name header if multiple tables

type StreamingHTMLWriter

type StreamingHTMLWriter struct {
	// contains filtered or unexported fields
}

StreamingHTMLWriter implements streaming HTML table export

func (*StreamingHTMLWriter) Finalize

func (w *StreamingHTMLWriter) Finalize() ([]byte, error)

Finalize completes the HTML export with JavaScript for interactivity

func (*StreamingHTMLWriter) Initialize

func (w *StreamingHTMLWriter) Initialize(tableNames []string, includeHeaders bool, selectedColumns map[string][]string) error

Initialize prepares the HTML writer

func (*StreamingHTMLWriter) WriteHeaders

func (w *StreamingHTMLWriter) WriteHeaders(tableName string, columns []string) error

WriteHeaders writes the table headers with styling

func (*StreamingHTMLWriter) WriteRows

func (w *StreamingHTMLWriter) WriteRows(tableName string, rows []map[string]interface{}) error

WriteRows writes a batch of rows with alternating colors and hover effects

func (*StreamingHTMLWriter) WriteTable

func (w *StreamingHTMLWriter) WriteTable(tableName string) error

WriteTable writes a table with appropriate styling and structure

type StreamingImportParser

type StreamingImportParser interface {
	// Initialize prepares the parser with the file content
	Initialize(fileContent []byte, tableName string) error

	// GetTableNames returns the names of tables found in the import file
	GetTableNames() ([]string, error)

	// GetColumnsForTable returns the column names for a specific table
	GetColumnsForTable(tableName string) ([]string, error)

	// ParseRows processes rows for a specific table and calls the handler for each batch
	ParseRows(tableName string, batchSize int, handler func(rows []map[string]interface{}) error) error

	// GetFormat returns the format of this parser
	GetFormat() ImportFormat
}

StreamingImportParser defines the interface for import parsers

func CreateStreamingImportParser

func CreateStreamingImportParser(format ImportFormat) (StreamingImportParser, error)

CreateStreamingImportParser creates the appropriate parser based on format

type StreamingJSONParser

type StreamingJSONParser struct {
	// contains filtered or unexported fields
}

StreamingJSONParser implements JSON import parsing

func (*StreamingJSONParser) GetColumnsForTable

func (p *StreamingJSONParser) GetColumnsForTable(tableName string) ([]string, error)

GetColumnsForTable returns the column names for a specific table

func (*StreamingJSONParser) GetFormat

func (p *StreamingJSONParser) GetFormat() ImportFormat

GetFormat returns the format of this parser

func (*StreamingJSONParser) GetTableNames

func (p *StreamingJSONParser) GetTableNames() ([]string, error)

GetTableNames returns the names of tables in the JSON

func (*StreamingJSONParser) Initialize

func (p *StreamingJSONParser) Initialize(fileContent []byte, tableName string) error

Initialize prepares the JSON parser

func (*StreamingJSONParser) ParseRows

func (p *StreamingJSONParser) ParseRows(tableName string, batchSize int, handler func(rows []map[string]interface{}) error) error

ParseRows processes rows for a specific table

type StreamingJSONWriter

type StreamingJSONWriter struct {
	// contains filtered or unexported fields
}

StreamingJSONWriter implements streaming JSON export

func (*StreamingJSONWriter) Finalize

func (w *StreamingJSONWriter) Finalize() ([]byte, error)

Finalize completes the JSON export

func (*StreamingJSONWriter) Initialize

func (w *StreamingJSONWriter) Initialize(tableNames []string, includeHeaders bool, selectedColumns map[string][]string) error

Initialize prepares the JSON writer

func (*StreamingJSONWriter) WriteHeaders

func (w *StreamingJSONWriter) WriteHeaders(tableName string, columns []string) error

WriteHeaders is a no-op for JSON

func (*StreamingJSONWriter) WriteRows

func (w *StreamingJSONWriter) WriteRows(tableName string, rows []map[string]interface{}) error

WriteRows writes a batch of rows in JSON format

func (*StreamingJSONWriter) WriteTable

func (w *StreamingJSONWriter) WriteTable(tableName string) error

WriteTable writes a table name header

type StreamingPDFWriter

type StreamingPDFWriter struct {
	// contains filtered or unexported fields
}

StreamingPDFWriter implements streaming PDF export

func (*StreamingPDFWriter) Finalize

func (w *StreamingPDFWriter) Finalize() ([]byte, error)

Finalize completes the PDF export

func (*StreamingPDFWriter) Initialize

func (w *StreamingPDFWriter) Initialize(tableNames []string, includeHeaders bool, selectedColumns map[string][]string) error

Initialize prepares the PDF writer

func (*StreamingPDFWriter) WriteHeaders

func (w *StreamingPDFWriter) WriteHeaders(tableName string, columns []string) error

WriteHeaders writes column headers for PDF

func (*StreamingPDFWriter) WriteRows

func (w *StreamingPDFWriter) WriteRows(tableName string, rows []map[string]interface{}) error

WriteRows writes a batch of rows in PDF format

func (*StreamingPDFWriter) WriteTable

func (w *StreamingPDFWriter) WriteTable(tableName string) error

WriteTable adds a new page for each table

type StreamingXLSXParser

type StreamingXLSXParser struct {
	// contains filtered or unexported fields
}

StreamingXLSXParser implements Excel spreadsheet import parsing

func (*StreamingXLSXParser) GetColumnsForTable

func (p *StreamingXLSXParser) GetColumnsForTable(tableName string) ([]string, error)

GetColumnsForTable returns the column names for a specific sheet

func (*StreamingXLSXParser) GetFormat

func (p *StreamingXLSXParser) GetFormat() ImportFormat

GetFormat returns the format of this parser

func (*StreamingXLSXParser) GetTableNames

func (p *StreamingXLSXParser) GetTableNames() ([]string, error)

GetTableNames returns the names of sheets in the XLSX

func (*StreamingXLSXParser) Initialize

func (p *StreamingXLSXParser) Initialize(fileContent []byte, tableName string) error

Initialize prepares the XLSX parser

func (*StreamingXLSXParser) ParseRows

func (p *StreamingXLSXParser) ParseRows(tableName string, batchSize int, handler func(rows []map[string]interface{}) error) error

ParseRows processes rows for a specific sheet

type StreamingXLSXWriter

type StreamingXLSXWriter struct {
	// contains filtered or unexported fields
}

StreamingXLSXWriter implements streaming XLSX export

func (*StreamingXLSXWriter) Finalize

func (w *StreamingXLSXWriter) Finalize() ([]byte, error)

Finalize completes the XLSX export

func (*StreamingXLSXWriter) Initialize

func (w *StreamingXLSXWriter) Initialize(tableNames []string, includeHeaders bool, selectedColumns map[string][]string) error

Initialize prepares the XLSX writer

func (*StreamingXLSXWriter) WriteHeaders

func (w *StreamingXLSXWriter) WriteHeaders(tableName string, columns []string) error

WriteHeaders writes column headers for XLSX

func (*StreamingXLSXWriter) WriteRows

func (w *StreamingXLSXWriter) WriteRows(tableName string, rows []map[string]interface{}) error

WriteRows writes a batch of rows in XLSX format

func (*StreamingXLSXWriter) WriteTable

func (w *StreamingXLSXWriter) WriteTable(tableName string) error

WriteTable creates a sheet for the table

type TokenResponse

type TokenResponse struct {
	oauth2.Token
	Scope string
}

Source Files

Jump to

Keyboard shortcuts

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