client

package
v0.0.0-...-424f6f9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JSONSchema string

Functions

func Configure

func Configure(ctx context.Context, logger zerolog.Logger, spec []byte, opts plugin.NewClientOptions) (plugin.Client, error)

func Identifier

func Identifier(name string) string

Types

type Client

type Client struct {
	plugin.UnimplementedDestination
	// contains filtered or unexported fields
}

func (Client) Close

func (c Client) Close(_ context.Context) error

func (*Client) ID

func (*Client) ID() string

func (Client) Sync

func (c Client) Sync(ctx context.Context, options plugin.SyncOptions, res chan<- message.SyncMessage) error

func (Client) Tables

func (c Client) Tables(ctx context.Context, opts plugin.TableOptions) (schema.Tables, error)

type Spec

type Spec struct {
	// The ID of the project to use for this client. If not specified, the project id will be auto-detected from the credentials.
	ProjectID string `json:"project_id"`
	// If `true` the `service_account_json` content will be treated as base64-encoded.
	UseBase64 bool `json:"use_base64" jsonschema:"default=false"`
	//  Service account JSON content.
	ServiceAccountJSON string `json:"service_account_json"`
	// Maximum batch size for each request when reading Firestore data.
	MaxBatchSize int `json:"max_batch_size" jsonschema:"minimum=1"`
	// List of fields to order the results by.
	OrderBy string `json:"order_by"`
	// The order direction used when `order_by` is `true`.
	OrderDirection string `json:"order_direction" jsonschema:"enum=asc,enum=desc,default=asc"`
}

Spec is the (nested) spec used by Firestore Source Plugin

func (Spec) JSONSchemaExtend

func (Spec) JSONSchemaExtend(sc *jsonschema.Schema)

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

func (*Spec) Validate

func (s *Spec) Validate() error

type Stringer

type Stringer interface {
	String() string
}

Directories

Path Synopsis
spec
gen

Jump to

Keyboard shortcuts

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