integration

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 7 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

This section is empty.

Variables

View Source
var (
	ErrorNotFound     = errors.New("Integration not found")
	ErrorTooMany      = errors.New("Too many of this Integration found")
	ErrorIdTypeNotSet = errors.New("Integration ID and Type not set")
)

Functions

func Decode

func Decode(src *Integration, dst *Integration) error

func Encode

func Encode(src *Integration, dst *Integration) error

Types

type Adyen added in v1.37.0

type Adyen struct {
	APIKey          string `json:"apiKey,omitempty" datastore:",noindex"`
	MerchantAccount string `json:"merchantAccount,omitempty"`
	HMACKey         string `json:"hmacKey,omitempty" datastore:",noindex"`
	Environment     string `json:"environment,omitempty"` // "test" or "live"
	LiveURLPrefix   string `json:"liveUrlPrefix,omitempty"`
}

Adyen connection

type Affiliate

type Affiliate struct {
	SuccessUrl string `json:"successUrl,omitempty"`
	ErrorUrl   string `json:"errorUrl,omitempty"`
}

Affiliate configuration

type AnalyticsCustom

type AnalyticsCustom struct {
	AnalyticsIntegration

	Code string `json:"code,omitempty"`
}

type AnalyticsFacebookConversions

type AnalyticsFacebookConversions struct {
	AnalyticsIntegration

	Value    string `json:"value,omitempty"`
	Currency string `json:"currency,omitempty"`
}

type AnalyticsFacebookPixel

type AnalyticsFacebookPixel struct {
	AnalyticsIntegration

	Values Values `json:"values,omitempty"`
}

type AnalyticsGoogleAdwords

type AnalyticsGoogleAdwords struct {
	AnalyticsIntegration
}

type AnalyticsGoogleAnalytics

type AnalyticsGoogleAnalytics struct {
	AnalyticsIntegration
}

type AnalyticsHeap

type AnalyticsHeap struct {
	AnalyticsIntegration
}

type AnalyticsIntegration

type AnalyticsIntegration struct {
	// Common to all integrations
	Event string `json:"event,omitempty"`
	Id    string `json:"id,omitempty"`

	// Sampling percentage
	Sampling float64 `json:"sampling,omitempty"`
}

Generic fields

type AnalyticsSentry

type AnalyticsSentry struct {
	AnalyticsIntegration
}

type AuthorizeNet

type AuthorizeNet struct {
	// For convenience duplicated
	Sandbox AuthorizeNetConnection `json:"sandbox"`
	Live    AuthorizeNetConnection `json:"live"`
}

type AuthorizeNetConnection

type AuthorizeNetConnection struct {
	LoginId        string `json:"loginId,omitempty"`
	TransactionKey string `json:"transactionKey,omitempty"`
	Key            string `json:"key,omitempty"`
}

Authorize.net connection

type Bitcoin

type Bitcoin struct {
	Address     string `json:"address,omitempty"`
	TestAddress string `json:"testAddress,omitempty"`
}

Bitcoin

type Braintree added in v1.37.0

type Braintree struct {
	MerchantID  string `json:"merchantId,omitempty"`
	PublicKey   string `json:"publicKey,omitempty"`
	PrivateKey  string `json:"privateKey,omitempty" datastore:",noindex"`
	Environment string `json:"environment,omitempty"` // "sandbox" or "production"
}

Braintree connection

type EOSSecurityToken

type EOSSecurityToken struct {
	TokenAccount    string `json:"tokenAccount,omitempty"`
	RegistryAccount string `json:"registryAccount,omitempty"`
	PrivateKey      string `json:"-"`
}

type Ethereum

type Ethereum struct {
	Address     string `json:"address,omitempty"`
	TestAddress string `json:"testAddress,omitempty"`
}

Ethereum

type EthereumSecurityToken

type EthereumSecurityToken struct {
	TokenAddress    string `json:"tokenAddress,omitempty"`
	RegistryAddress string `json:"registryAddress,omitempty"`
	PrivateKey      string `json:"-"`
}

Security Tokens

type Integration

type Integration struct {
	Type      Type            `json:"type,omitempty"`
	Enabled   bool            `json:"enabled,omitempty"`
	Show      bool            `json:"show,omitempty"`
	Id        string          `json:"id,omitempty"`
	Data      json.RawMessage `json:"data,omitempty"`
	CreatedAt time.Time       `json:"createdAt,omitempty"`
	UpdatedAt time.Time       `json:"updatedAt,omitempty"`

	// Analytics
	AnalyticsCustom              AnalyticsCustom              `json:"-"`
	AnalyticsFacebookPixel       AnalyticsFacebookPixel       `json:"-"`
	AnalyticsFacebookConversions AnalyticsFacebookConversions `json:"-"`
	AnalyticsGoogleAdwords       AnalyticsGoogleAdwords       `json:"-"`
	AnalyticsGoogleAnalytics     AnalyticsGoogleAnalytics     `json:"-"`
	AnalyticsHeap                AnalyticsHeap                `json:"-"`
	AnalyticsSentry              AnalyticsSentry              `json:"-"`

	// Others
	AuthorizeNet  AuthorizeNet  `json:"-"`
	Bitcoin       Bitcoin       `json:"-"`
	Ethereum      Ethereum      `json:"-"`
	Mailchimp     Mailchimp     `json:"-"`
	Mandrill      Mandrill      `json:"-"`
	Netlify       Netlify       `json:"-"`
	Paypal        Paypal        `json:"-"`
	Plaid         Plaid         `json:"-"`
	Reamaze       Reamaze       `json:"-"`
	Recaptcha     Recaptcha     `json:"-"`
	Salesforce    Salesforce    `json:"-"`
	Shipwire      Shipwire      `json:"-"`
	SendGrid      SendGrid      `json:"-"`
	SMTPRelay     SMTPRelay     `json:"-"`
	Stripe        Stripe        `json:"-"`
	SecurityToken SecurityToken `json:"-"`
	Woopra        Woopra        `json:"-"`
}

type Integrations

type Integrations []Integration

func (Integrations) Append

func (i Integrations) Append(src *Integration) (Integrations, error)

func (Integrations) EmailMarketingProvider

func (i Integrations) EmailMarketingProvider() (*Integration, error)

func (Integrations) EmailProvider

func (i Integrations) EmailProvider() (*Integration, error)

func (Integrations) FilterByType

func (i Integrations) FilterByType(typ Type) Integrations

func (Integrations) FindById

func (i Integrations) FindById(id string) (*Integration, error)

func (Integrations) FindByType

func (i Integrations) FindByType(typ Type) *Integration

func (Integrations) MustAppend

func (i Integrations) MustAppend(src *Integration) Integrations

func (Integrations) MustRemove

func (i Integrations) MustRemove(id string) Integrations

func (Integrations) MustUpdate

func (i Integrations) MustUpdate(in *Integration) Integrations

func (Integrations) Remove

func (i Integrations) Remove(id string) (Integrations, error)

func (Integrations) Update

func (i Integrations) Update(src *Integration) (Integrations, error)

type LemonSqueezy added in v1.37.0

type LemonSqueezy struct {
	APIKey           string `json:"apiKey,omitempty" datastore:",noindex"`
	StoreID          string `json:"storeId,omitempty"`
	WebhookSecret    string `json:"webhookSecret,omitempty" datastore:",noindex"`
	DefaultVariantID string `json:"defaultVariantId,omitempty"`
}

LemonSqueezy connection

type Mailchimp

type Mailchimp struct {
	ListId      string `json:"listId,omitempty"`
	APIKey      string `json:"apiKey,omitempty"`
	CheckoutUrl string `json:"checkoutUrl,omitempty"`
}

Mailchimp settings

type Mandrill

type Mandrill struct {
	APIKey string `json:"apiKey,omitempty"`
}

Mandrill settings

type Mercury added in v1.36.3

type Mercury struct {
	APIToken      string `json:"apiToken,omitempty"`
	WebhookSecret string `json:"webhookSecret,omitempty"`
	AccountID     string `json:"accountId,omitempty"`
}

Mercury bank connection

type Netlify

type Netlify struct {
	AccessToken string    `json:"accessToken,omitempty"`
	CreatedAt   time.Time `json:"createdAt,omitempty"`
	Email       string    `json:"email,omitempty"`
	Id          string    `json:"id,omitempty"`
	Uid         string    `json:"uId,omitempty"`
}

Netlify settings

type Paypal

type Paypal struct {
	Live struct {
		Email             string `json:"email,omitempty"`
		SecurityUserId    string `json:"securityUserId,omitempty"`
		SecurityPassword  string `json:"securityPassword,omitempty" datastore:",noindex"`
		SecuritySignature string `json:"SecuritySignature,omitempty" datastore:",noindex"`
		ApplicationId     string `json:"applicationId,omitempty"`
	} `json:"live,omitempty"`
	Test struct {
		Email             string `json:"email,omitempty"`
		SecurityUserId    string `json:"securityUserId,omitempty"`
		SecurityPassword  string `json:"securityPassword,omitempty" datastore:",noindex"`
		SecuritySignature string `json:"SecuritySignature,omitempty" datastore:",noindex"`
		ApplicationId     string `json:"applicationId,omitempty"`
	} `json:"test,omitempty"`

	ConfirmUrl string `json:"confirmUrl,omitempty" datastore:",noindex"`
	CancelUrl  string `json:"cancelUrl,omitempty" datastore:",noindex"`
}

Paypal connection

type Plaid

type Plaid struct {
	ClientId  string `json:"clientId,omitempty"`
	Secret    string `json:"secret,omitempty" datastore:",noindex"`
	PublicKey string `json:"pubKey,omitempty"`
}

Plaid keys

type Reamaze

type Reamaze struct {
	Secret string `json:"secret,omitempty"`
}

type Recaptcha

type Recaptcha struct {
	Enabled   bool   `json:"enabled,omitempty"`
	SecretKey string `json:"secretKey,omitempty"`
}

type Recurly added in v1.37.0

type Recurly struct {
	APIKey    string `json:"apiKey,omitempty" datastore:",noindex"`
	Subdomain string `json:"subdomain,omitempty"`
}

Recurly connection

type SMTPRelay

type SMTPRelay struct {
	Username string   `json:"username"`
	Password string   `json:"password"`
	Host     string   `json:"host"`
	Port     string   `json:"port"`
	MailFrom string   `json:"mailFrom"`
	MailTo   []string `json:"mailTo"`
	Msg      string   `json:"msg"`
}

SMTP settings

type Salesforce

type Salesforce struct {
	AccessToken        string `json:"accessToken,omitempty"`
	DefaultPriceBookId string `json:"defaultPriceBookId,omitempty"`
	// personalized login url
	Id           string `json:"id,omitempty"`
	InstanceUrl  string `json:"instanceUrl,omitempty"`
	IssuedAt     string `json:"issuedAt,omitempty"`
	RefreshToken string `json:"refreshToken,omitempty"`
	Signature    string `json:"signature,omitempty" datastore:",noindex"`
}

Salesforce settings

type SecurityToken

type SecurityToken struct {
	Ethereum EthereumSecurityToken `json:"ethereum,omitempty"`
	EOS      EOSSecurityToken      `json:"eos,omitempty"`
}

type SendGrid

type SendGrid struct {
	APIKey string `json:"apiKey,omitempty"`
}

SendGrid settings

type Shipwire

type Shipwire struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type Square

type Square struct {
	WebhookSignatureKey string           `json:"webhookSignatureKey,omitempty"`
	Sandbox             SquareConnection `json:"sandbox"`
	Production          SquareConnection `json:"production"`
}

type SquareConnection

type SquareConnection struct {
	ApplicationId string `json:"applicationId,omitempty"`
	AccessToken   string `json:"accessToken,omitempty"`
	LocationId    string `json:"locationId,omitempty"`
}

Square connection

type Stripe

type Stripe struct {
	// For convenience duplicated
	AccessToken    string `json:"accessToken,omitempty"`
	PublishableKey string `json:"publishableKey,omitempty"`
	RefreshToken   string `json:"refreshToken,omitempty"`
	UserId         string `json:"userId,omitempty"`

	// Save entire live and test tokens
	Live StripeConnectToken `json:"live,omitempty" datastore:",noindex"`
	Test StripeConnectToken `json:"test,omitempty" datastore:",noindex"`
}

Stripe holds legacy Stripe integration credentials. Retained for backward compatibility with stored organization data.

type StripeConnectToken added in v1.36.4

type StripeConnectToken struct {
	AccessToken    string `json:"accessToken,omitempty"`
	PublishableKey string `json:"publishableKey,omitempty"`
	RefreshToken   string `json:"refreshToken,omitempty"`
	UserId         string `json:"userId,omitempty"`
	Livemode       bool   `json:"livemode,omitempty"`
	Scope          string `json:"scope,omitempty"`
	TokenType      string `json:"tokenType,omitempty"`
}

StripeConnectToken holds legacy Stripe Connect OAuth credentials. Retained for backward compatibility with stored data.

type Type

type Type string
const (
	// Analytics
	AnalyticsCustomType              Type = "analytics-custom"
	AnalyticsFacebookPixelType       Type = "analytics-facebook-pixel"
	AnalyticsFacebookConversionsType Type = "analytics-facebook-conversions"
	AnalyticsGoogleAdwordsType       Type = "analytics-google-adwords"
	AnalyticsGoogleAnalyticsType     Type = "analytics-google-analytics"
	AnalyticsHeapType                Type = "analytics-heap"
	AnalyticsSentryType              Type = "analytics-sentry"

	// Others
	AuthorizeNetType  Type = "authorizeNet"
	BitcoinType       Type = "bitcoin"
	EthereumType      Type = "ethereum"
	MailchimpType     Type = "mailchimp"
	MandrillType      Type = "mandrill"
	MercuryType       Type = "mercury"
	NetlifyType       Type = "netlify"
	PaypalType        Type = "paypal"
	PlaidType         Type = "plaid"
	ReamazeType       Type = "reamaze"
	RecaptchaType     Type = "recaptcha"
	SalesforceType    Type = "salesforce"
	SecurityTokenType Type = "securityToken"
	WireTransferType  Type = "wireTransfer"
	SendGridType      Type = "sendgrid"
	ShipwireType      Type = "shipwire"
	SMTPRelayType     Type = "smtprelay"
	StripeType        Type = "stripe"
	WoopraType        Type = "woopra"
)

type Value

type Value analytics.Value

Override value for a given event

type Values

type Values analytics.Values

type WireTransfer added in v1.36.3

type WireTransfer struct {
	BankName      string `json:"bankName,omitempty"`
	AccountHolder string `json:"accountHolder,omitempty"`
	RoutingNumber string `json:"routingNumber,omitempty"`
	AccountNumber string `json:"accountNumber,omitempty"`
	SWIFT         string `json:"swift,omitempty"`
	IBAN          string `json:"iban,omitempty"`
	BankAddress   string `json:"bankAddress,omitempty"`
	Reference     string `json:"reference,omitempty"`
	Instructions  string `json:"instructions,omitempty"`
}

WireTransfer holds bank wire transfer details for an organization

type Woopra

type Woopra struct {
	Domain string `json:"domain,omitempty"`
}

Jump to

Keyboard shortcuts

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