fabra

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 8 Imported by: 0

README

Fabra Go SDK

Use the Fabra API to build customer-facing data warehouse integrations to let your customers start sending data to your application. Unblock your sales pipeline in days, not months.

SDK Installation

go get github.com/fabra-io/go-sdk

SDK Example Usage

package main

import(
	"context"
	"log"
	"github.com/fabra-io/go-sdk"
	"github.com/fabra-io/go-sdk/pkg/models/operations"
)

func main() {
    s := fabra.New(
        fabra.WithSecurity(shared.Security{
            APIKeyAuth: "YOUR_API_KEY_HERE",
        }),
    )

    ctx := context.Background()
    res, err := s.Connection.GetNamespaces(ctx, 548814)
    if err != nil {
        log.Fatal(err)
    }

    if res.Namespaces != nil {
        // handle response
    }
}

Available Resources and Operations

Connection
Destination
LinkToken
Object
Source
Sync
SDK Generated by Speakeasy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerList = []string{
	"https://api.fabra.io",
}

ServerList contains the list of servers available to the SDK

Functions

func Bool added in v0.6.0

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32 added in v0.6.0

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64 added in v0.6.0

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int added in v0.6.0

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64 added in v0.6.0

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func String added in v0.5.1

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type Fabra

type Fabra struct {
	// Connection - Operations on connections
	Connection *connection
	// Destination - Operations on destinations
	Destination *destination
	// LinkToken - Operations on link tokens
	LinkToken *linkToken
	// Object - Operations on objects
	Object *object
	// Source - Operations on sources
	Source *source
	// Sync - Operations on syncs
	Sync *sync
	// contains filtered or unexported fields
}

func New

func New(opts ...SDKOption) *Fabra

New creates a new instance of the SDK with the provided options

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type SDKOption

type SDKOption func(*Fabra)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithSecurity

func WithSecurity(security shared.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL added in v0.5.1

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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