connection

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ID                  string                   `db:"id" json:"id"`
	Name                string                   `db:"name" json:"name"`
	ProviderType        types.SecretProvider     `db:"provider_type" json:"provider_type"`
	EncryptedSecretData types.ConnectionMetadata `db:"encrypted_secret_data" json:"encrypted_secret_data"`
	EnvironmentID       string                   `db:"environment_id" json:"environment_id"`
	types.BaseModel
}

Connection represents an integration connection in the system

func FromEnt

func FromEnt(entConn *ent.Connection) *Connection

FromEnt converts an ent.Connection to domain Connection

func (*Connection) GetStripeConfig

func (c *Connection) GetStripeConfig() (*StripeConnection, error)

GetStripeConfig extracts Stripe configuration from connection metadata

type Repository

type Repository interface {
	Create(ctx context.Context, connection *Connection) error
	Get(ctx context.Context, id string) (*Connection, error)
	GetByProvider(ctx context.Context, provider types.SecretProvider) (*Connection, error)
	List(ctx context.Context, filter *types.ConnectionFilter) ([]*Connection, error)
	Count(ctx context.Context, filter *types.ConnectionFilter) (int, error)
	Update(ctx context.Context, connection *Connection) error
	Delete(ctx context.Context, connection *Connection) error
}

Repository defines the interface for connection data operations

type StripeConnection

type StripeConnection struct {
	PublishableKey string `json:"publishable_key"`
	SecretKey      string `json:"secret_key"`
	WebhookSecret  string `json:"webhook_secret"`
	AccountID      string `json:"account_id,omitempty"`
}

StripeConnection represents Stripe-specific connection metadata

Jump to

Keyboard shortcuts

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