option

package
v0.0.0-...-e4b22d0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package option contains optional arguments for rockset.RockClient convenience methods.

Index

Constants

View Source
const AllClusters = "*ALL*"

AllClusters is the string representation of all current and future clusters.

Variables

This section is empty.

Functions

func IsGlobalAction

func IsGlobalAction(action string) bool

IsGlobalAction returns true if action is a GlobalAction

func IsIntegrationAction

func IsIntegrationAction(action string) bool

IsIntegrationAction returns true if action is am IntegrationAction

func IsWorkspaceAction

func IsWorkspaceAction(action string) bool

IsWorkspaceAction returns true if action is am WorkspaceAction

func WithWorkspace

func WithWorkspace(name string) func(o *ListCollectionOptions)

Types

type APIKeyOption

type APIKeyOption func(*APIKeyOptions)

func ForUser

func ForUser(username string) APIKeyOption

ForUser is used to scope API Key commands to a particular user.

type APIKeyOptions

type APIKeyOptions struct {
	User *string
}

type APIKeyRoleOption

type APIKeyRoleOption func(*APIKeyRoleOptions)

func WithRole

func WithRole(role string) APIKeyRoleOption

type APIKeyRoleOptions

type APIKeyRoleOptions struct {
	Role *string
}

type AWSCredentials

type AWSCredentials struct {
	*openapi.AwsAccessKey
	*openapi.AwsRole
}

type AWSCredentialsFn

type AWSCredentialsFn func(o *AWSCredentials)

func AWSKeys

func AWSKeys(accessKey, secretKey string) AWSCredentialsFn

func AWSRole

func AWSRole(roleARN string) AWSCredentialsFn

type AliasOption

type AliasOption func(*AliasOptions)

func WithAliasDescription

func WithAliasDescription(name string) AliasOption

WithAliasDescription is used to optionally set the description for an alias.

type AliasOptions

type AliasOptions struct {
	Description *string
}

type CSV

type CSV func(*openapi.CsvParams)

func WithEncoding

func WithEncoding(encoding string) CSV

func WithEscapeChar

func WithEscapeChar(escape string) CSV

WithEscapeChar sets the CSV escape character. Defaults to \

func WithFirstLineAsColumnNames

func WithFirstLineAsColumnNames() CSV

WithFirstLineAsColumnNames enables the use of the first row as the column names

func WithQuoteChar

func WithQuoteChar(quote string) CSV

WithQuoteChar sets the CSV quote character. Defaults to "

func WithSeparator

func WithSeparator(separator string) CSV

WithSeparator sets the CSV separator. Defaults to ,

type ClusterPrivileges

type ClusterPrivileges func(*openapi.Privilege)

func WithAllCluster

func WithAllCluster() ClusterPrivileges

WithAllCluster is used to specify all current and future clusters for a WithWorkspacePrivilege.

func WithCluster

func WithCluster(name string) ClusterPrivileges

WithCluster is used to specify a cluster for a WithWorkspacePrivilege.

type CollectionOption

type CollectionOption func(o *openapi.CreateCollectionRequest)

func WithCollectionClusteringKey

func WithCollectionClusteringKey(fieldName, fieldType string, keys []string) CollectionOption

WithCollectionClusteringKey adds a clustering key. Can be specified multiple times.

func WithCollectionFieldMapping

func WithCollectionFieldMapping(name string, dropAll bool, outputField OutputFieldFn,
	inputFields ...InputFieldFn) CollectionOption

WithCollectionFieldMapping adds a field mapping to the collection. If dropAll is true, the input and output fields are not set.

func WithCollectionRetention

func WithCollectionRetention(d time.Duration) CollectionOption

WithCollectionRetention sets the retention in seconds for documents.

func WithDynamoDBMaxRCU

func WithDynamoDBMaxRCU(maxRCU int64) CollectionOption

WithDynamoDBMaxRCU sets the max RCU for a DynamoDB collection.

func WithFieldMappingQuery

func WithFieldMappingQuery(sql string) CollectionOption

WithFieldMappingQuery sets the field mapping query

func WithInsertOnly

func WithInsertOnly() CollectionOption

WithInsertOnly enables insert only for the collection

type CreateQueryLambdaOption

type CreateQueryLambdaOption func(request *CreateQueryLambdaOptions)

func WithDefaultParameter

func WithDefaultParameter(name, paramType, value string) CreateQueryLambdaOption

func WithQueryLambdaDescription

func WithQueryLambdaDescription(desc string) CreateQueryLambdaOption

type CreateQueryLambdaOptions

type CreateQueryLambdaOptions struct {
	Description     *string
	QueryParameters []openapi.QueryParameter
}

type DynamoDBIntegration

type DynamoDBIntegration struct {
	openapi.DynamodbIntegration
	Description *string
}

type DynamoDBIntegrationOption

type DynamoDBIntegrationOption func(request *DynamoDBIntegration)

func WithDynamoDBIntegrationDescription

func WithDynamoDBIntegrationDescription(desc string) DynamoDBIntegrationOption

type EventTimeInfoFormat

type EventTimeInfoFormat string
const (
	MillisecondsSinceEpoch EventTimeInfoFormat = "milliseconds_since_epoch"
	SecondsSinceEpoch      EventTimeInfoFormat = "seconds_since_epoch"
)

type ExecuteQueryLambdaRequest

type ExecuteQueryLambdaRequest struct {
	openapi.ExecuteQueryLambdaRequest
	Tag     string
	Version string
}

type FieldMissingAction

type FieldMissingAction string
const (
	FieldMissingSkip FieldMissingAction = "SKIP"
	FieldMissingPass FieldMissingAction = "PASS"
)

func (FieldMissingAction) String

func (f FieldMissingAction) String() string

type GCSIntegration

type GCSIntegration struct {
	Description *string
}

type GCSIntegrationOption

type GCSIntegrationOption func(request *GCSIntegration)

func WithGCSIntegrationDescription

func WithGCSIntegrationDescription(desc string) GCSIntegrationOption

type GlobalAction

type GlobalAction int

GlobalAction is the type for RBAC actions that operate on global resources.

const (
	UnknownGlobalAction GlobalAction = iota
	AllGlobalActions
	GetOrgGlobal
	GetCurrentUserGlobal
	InviteUserGlobal
	DeleteUserGlobal
	ListUsersGlobal
	GetBillingGlobal
	UpdateBillingGlobal
	UpdateSettingsGlobal
	GetMetricsGlobal
	UpdateViGlobal
	ListViGlobal
	CreateWsGlobal
	ListWsGlobal
	CreateIntegrationGlobal
	DeleteIntegrationGlobal
	ListIntegrationsGlobal
	UpdateResourceOwnerGlobal
	CreateAPIKeyGlobal
	CreateRoleGlobal
	UpdateRoleGlobal
	DeleteRoleGlobal
	ListRolesGlobal
	GrantRevokeRoleGlobal
)

func GetGlobalAction

func GetGlobalAction(action string) GlobalAction

GetGlobalAction returns the corresponding GlobalAction

func (GlobalAction) String

func (a GlobalAction) String() string

String returns the string representation used for the REST API call

type IPAllowlistOption

type IPAllowlistOption func(*IPAllowlistOptions)

func WithIPAllowlistDescription

func WithIPAllowlistDescription(desc string) IPAllowlistOption

WithIPAllowlistDescription is used to optionally set the IP allowlist description.

type IPAllowlistOptions

type IPAllowlistOptions struct {
	Description *string
}

type InputFieldFn

type InputFieldFn func(field *openapi.InputField)

func InputField

func InputField(fieldName string, ifMissing FieldMissingAction, drop bool, parameterName string) InputFieldFn

type IntegrationAction

type IntegrationAction int

IntegrationAction is the type for actions that operate on integrations.

const (
	UnknownIntegrationAction IntegrationAction = iota
	AllIntegrationActions
	CreateCollectionIntegration
)

func GetIntegrationAction

func GetIntegrationAction(action string) IntegrationAction

GetIntegrationAction returns the corresponding IntegrationAction

func (IntegrationAction) String

func (a IntegrationAction) String() string

String returns the string representation used for the REST API call

type KafkaIntegration

type KafkaIntegration struct {
	Description *string
}

type KafkaIntegrationOption

type KafkaIntegrationOption func(request *KafkaIntegration)

func WithKafkaIntegrationDescription

func WithKafkaIntegrationDescription(desc string) KafkaIntegrationOption

type KinesisIntegration

type KinesisIntegration struct {
	openapi.KinesisIntegration
	Description *string
}

type KinesisIntegrationOption

type KinesisIntegrationOption func(request *KinesisIntegration)

func WithKinesisIntegrationDescription

func WithKinesisIntegrationDescription(desc string) KinesisIntegrationOption

type ListAliasesOption

type ListAliasesOption func(*ListAliasesOptions)

func WithAliasWorkspace

func WithAliasWorkspace(name string) ListAliasesOption

WithAliasWorkspace is used to scope a listing of aliases to a workspace.

type ListAliasesOptions

type ListAliasesOptions struct {
	Workspace string
}

type ListCollectionOption

type ListCollectionOption func(o *ListCollectionOptions)

type ListCollectionOptions

type ListCollectionOptions struct {
	Workspace *string
}

type ListQueryLambdaOption

type ListQueryLambdaOption func(request *ListQueryLambdaOptions)

func WithQueryLambdaWorkspace

func WithQueryLambdaWorkspace(name string) ListQueryLambdaOption

type ListQueryLambdaOptions

type ListQueryLambdaOptions struct {
	Workspace *string
}

type ListViewOption

type ListViewOption func(o *ListViewOptions)

func WithViewWorkspace

func WithViewWorkspace(ws string) ListViewOption

WithViewWorkspace limits ListViews to the specified workspace

type ListViewOptions

type ListViewOptions struct {
	Workspace string
}

type MongoDBIntegration

type MongoDBIntegration struct {
	Description *string
}

type MongoDBIntegrationOption

type MongoDBIntegrationOption func(request *MongoDBIntegration)

func WithMongoDBIntegrationDescription

func WithMongoDBIntegrationDescription(desc string) MongoDBIntegrationOption

type OnError

type OnError string
const (
	OnErrorSkip OnError = "SKIP"
	OnErrorFail OnError = "FAIL"
)

func (OnError) String

func (e OnError) String() string

type OutputFieldFn

type OutputFieldFn func(field *openapi.OutputField)

func OutputField

func OutputField(fieldName string, sql string, onError OnError) OutputFieldFn

type QueryLambdaOption

type QueryLambdaOption func(request *ExecuteQueryLambdaRequest)

func WithParameter2

func WithParameter2(name, valueType, value string) QueryLambdaOption

func WithRowLimit2

func WithRowLimit2(limit int32) QueryLambdaOption

func WithTag

func WithTag(tag string) QueryLambdaOption

func WithVersion

func WithVersion(version string) QueryLambdaOption

func WithWarnings2

func WithWarnings2() QueryLambdaOption

type QueryOption

type QueryOption func(request *openapi.QueryRequestSql)

func WithParameter

func WithParameter(name, valueType, value string) QueryOption

func WithRowLimit

func WithRowLimit(limit int32) QueryOption

func WithWarnings

func WithWarnings() QueryOption

type RoleOption

type RoleOption func(p *RoleOptions)

func WithGlobalPrivilege

func WithGlobalPrivilege(action GlobalAction) RoleOption

WithGlobalPrivilege is used to add a global action to a role.

func WithIntegrationPrivilege

func WithIntegrationPrivilege(action IntegrationAction, integration string) RoleOption

WithIntegrationPrivilege is used to add an integration action to a role.

func WithRoleDescription

func WithRoleDescription(desc string) RoleOption

WithRoleDescription is used to optionally set a role description.

func WithWorkspacePrivilege

func WithWorkspacePrivilege(action WorkspaceAction, workspace string, options ...ClusterPrivileges) RoleOption

WithWorkspacePrivilege is used to add a workspace action to a role. If WithCluster isn't specified, the privilege applied to all clusters. Only the last WithCluster is what is used.

type RoleOptions

type RoleOptions struct {
	// Description of the role
	Description *string
	Privileges  []openapi.Privilege
}

RoleOptions is used to hold optional workspace settings

type S3Integration

type S3Integration struct {
	openapi.S3Integration
	Description *string
}

type S3IntegrationOption

type S3IntegrationOption func(request *S3Integration)

func WithS3IntegrationDescription

func WithS3IntegrationDescription(desc string) S3IntegrationOption

type SegmentIntegration

type SegmentIntegration struct {
	Description *string
}

type SegmentIntegrationOption

type SegmentIntegrationOption func(request *SegmentIntegration)

func WithSegmentIntegrationDescription

func WithSegmentIntegrationDescription(desc string) SegmentIntegrationOption

type ViewOption

type ViewOption func(p *ViewOptions)

func WithViewDescription

func WithViewDescription(desc string) ViewOption

WithViewDescription is used to optionally set a view description.

type ViewOptions

type ViewOptions struct {
	// Description of the view
	Description *string
}

ViewOptions is used to hold optional view settings

type VirtualInstanceOption

type VirtualInstanceOption func(*VirtualInstanceOptions)

func WithVIMonitoring

func WithVIMonitoring(enabled bool) VirtualInstanceOption

WithVIMonitoring is used to optionally set the virtual instance monitoring.

func WithVISize

WithVISize is used to optionally set the virtual instance size.

func WithVIType

WithVIType is used to optionally set the virtual instance type.

type VirtualInstanceOptions

type VirtualInstanceOptions struct {
	MonitoringEnabled *bool
	Type              *string
	Size              *string
}

VirtualInstanceOptions contains the optional settings for a virtual instance.

type VirtualInstanceSize

type VirtualInstanceSize string
const (
	FreeSize     VirtualInstanceSize = "FREE"
	SharedSize   VirtualInstanceSize = "SHARED"
	SmallSize    VirtualInstanceSize = "SMALL"
	MediumSize   VirtualInstanceSize = "MEDIUM"
	LargeSize    VirtualInstanceSize = "LARGE"
	XLargeSize   VirtualInstanceSize = "XLARGE"
	XLarge2Size  VirtualInstanceSize = "XLARGE2"
	XLarge4Size  VirtualInstanceSize = "XLARGE4"
	XLarge8Size  VirtualInstanceSize = "XLARGE8"
	XLarge16Size VirtualInstanceSize = "XLARGE16"
)

func (VirtualInstanceSize) String

func (t VirtualInstanceSize) String() string

type VirtualInstanceType

type VirtualInstanceType string
const (
	FreeType     VirtualInstanceType = "FREE"
	SharedType   VirtualInstanceType = "SHARED"
	SmallType    VirtualInstanceType = "SMALL"
	MediumType   VirtualInstanceType = "MEDIUM"
	LargeType    VirtualInstanceType = "LARGE"
	XLargeType   VirtualInstanceType = "XLARGE"
	XLarge2Type  VirtualInstanceType = "XLARGE2"
	XLarge4Type  VirtualInstanceType = "XLARGE4"
	XLarge8Type  VirtualInstanceType = "XLARGE8"
	XLarge16Type VirtualInstanceType = "XLARGE16"
)

func (VirtualInstanceType) String

func (t VirtualInstanceType) String() string

type WorkspaceAction

type WorkspaceAction int

WorkspaceAction is the type for actions that operate on workspaces.

const (
	UnknownWorkspaceAction WorkspaceAction = iota
	AllWorkspaceActions
	DeleteWs
	QueryDataWs
	WriteDataWs
	CreateCollectionWs
	DeleteCollectionWs
	CreateAliasWs
	DeleteAliasWs
	ListResourcesWs
	CreateQueryLambdaWs
	DeleteQueryLambdaWs
	ExecuteQueryLambdaWs
	CreateViewWs
	DeleteViewWs
)

func GetWorkspaceAction

func GetWorkspaceAction(action string) WorkspaceAction

GetWorkspaceAction returns the corresponding WorkspaceAction

func (WorkspaceAction) String

func (a WorkspaceAction) String() string

String returns the string representation used for the REST API call

type WorkspaceOption

type WorkspaceOption func(p *WorkspaceOptions)

func WithWorkspaceDescription

func WithWorkspaceDescription(desc string) WorkspaceOption

WithWorkspaceDescription is used to optionally set a workspace description.

type WorkspaceOptions

type WorkspaceOptions struct {
	// Description of the workspace
	Description *string
}

WorkspaceOptions is used to hold optional workspace settings

Jump to

Keyboard shortcuts

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