Documentation
¶
Index ¶
- func BuildConnectionDSN(dbname string) string
- type DBTX
- type PostgresStore
- type PostgresStoreMigrater
- func (mig *PostgresStoreMigrater) Close() error
- func (mig *PostgresStoreMigrater) Down() error
- func (mig *PostgresStoreMigrater) Force(version int) error
- func (mig *PostgresStoreMigrater) List() ([]string, error)
- func (mig *PostgresStoreMigrater) SetLogger(logger migrate.Logger)
- func (mig *PostgresStoreMigrater) To(version uint) error
- func (mig *PostgresStoreMigrater) Up() error
- func (mig *PostgresStoreMigrater) Version() (uint, bool, error)
- type Queries
- func (q *Queries) CustomerExists(ctx context.Context, id string) (bool, error)
- func (q *Queries) DeleteAllCustomers(ctx context.Context) error
- func (q *Queries) DeleteAllPrices(ctx context.Context) error
- func (q *Queries) DeleteAllProducts(ctx context.Context) error
- func (q *Queries) DeleteAllSubscriptions(ctx context.Context) error
- func (q *Queries) DeleteCurrentSyncState(ctx context.Context) error
- func (q *Queries) DeletePrice(ctx context.Context, id string) error
- func (q *Queries) DeleteProduct(ctx context.Context, id string) error
- func (q *Queries) GetCurrentSyncState(ctx context.Context) (StripeSyncState, error)
- func (q *Queries) PriceExists(ctx context.Context, id string) (bool, error)
- func (q *Queries) ProductExists(ctx context.Context, id string) (bool, error)
- func (q *Queries) SetSyncState(ctx context.Context, lastEvent int64) error
- func (q *Queries) UpsertCustomer(ctx context.Context, arg UpsertCustomerParams) error
- func (q *Queries) UpsertPrice(ctx context.Context, arg UpsertPriceParams) error
- func (q *Queries) UpsertProduct(ctx context.Context, arg UpsertProductParams) error
- func (q *Queries) UpsertSubscription(ctx context.Context, arg UpsertSubscriptionParams) error
- func (q *Queries) UpsertSubscriptionItem(ctx context.Context, arg UpsertSubscriptionItemParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type StripeCustomer
- type StripePrice
- type StripeProduct
- type StripeSubscription
- type StripeSubscriptionItem
- type StripeSyncState
- type UpsertCustomerParams
- type UpsertPriceParams
- type UpsertProductParams
- type UpsertSubscriptionItemParams
- type UpsertSubscriptionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConnectionDSN ¶
Types ¶
type PostgresStore ¶
type PostgresStore struct {
Q *Queries
// contains filtered or unexported fields
}
func NewPostgresStore ¶
func NewPostgresStore() *PostgresStore
func NewPostgresTestStore ¶
func NewPostgresTestStore() (*PostgresStore, func())
func (*PostgresStore) GetMigrater ¶
func (pgs *PostgresStore) GetMigrater() (*PostgresStoreMigrater, error)
type PostgresStoreMigrater ¶
type PostgresStoreMigrater struct {
// contains filtered or unexported fields
}
func (*PostgresStoreMigrater) Close ¶
func (mig *PostgresStoreMigrater) Close() error
func (*PostgresStoreMigrater) Down ¶
func (mig *PostgresStoreMigrater) Down() error
func (*PostgresStoreMigrater) Force ¶
func (mig *PostgresStoreMigrater) Force(version int) error
func (*PostgresStoreMigrater) List ¶
func (mig *PostgresStoreMigrater) List() ([]string, error)
func (*PostgresStoreMigrater) SetLogger ¶
func (mig *PostgresStoreMigrater) SetLogger(logger migrate.Logger)
func (*PostgresStoreMigrater) To ¶
func (mig *PostgresStoreMigrater) To(version uint) error
func (*PostgresStoreMigrater) Up ¶
func (mig *PostgresStoreMigrater) Up() error
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CustomerExists ¶
func (*Queries) DeleteAllCustomers ¶
func (*Queries) DeleteAllSubscriptions ¶
func (*Queries) DeleteCurrentSyncState ¶
func (*Queries) DeleteProduct ¶
func (*Queries) GetCurrentSyncState ¶
func (q *Queries) GetCurrentSyncState(ctx context.Context) (StripeSyncState, error)
func (*Queries) PriceExists ¶
func (*Queries) ProductExists ¶
func (*Queries) SetSyncState ¶
func (*Queries) UpsertCustomer ¶
func (q *Queries) UpsertCustomer(ctx context.Context, arg UpsertCustomerParams) error
func (*Queries) UpsertPrice ¶
func (q *Queries) UpsertPrice(ctx context.Context, arg UpsertPriceParams) error
func (*Queries) UpsertProduct ¶
func (q *Queries) UpsertProduct(ctx context.Context, arg UpsertProductParams) error
func (*Queries) UpsertSubscription ¶
func (q *Queries) UpsertSubscription(ctx context.Context, arg UpsertSubscriptionParams) error
func (*Queries) UpsertSubscriptionItem ¶
func (q *Queries) UpsertSubscriptionItem(ctx context.Context, arg UpsertSubscriptionItemParams) error
type StripeCustomer ¶
type StripeCustomer struct {
ID string
Object string
Address pqtype.NullRawMessage
Description sql.NullString
Email sql.NullString
Metadata pqtype.NullRawMessage
Name sql.NullString
Phone sql.NullString
Shipping pqtype.NullRawMessage
Balance sql.NullInt64
Created int64
Currency sql.NullString
DefaultSource sql.NullString
Delinquent bool
Discount pqtype.NullRawMessage
InvoicePrefix string
InvoiceSettings pqtype.NullRawMessage
Livemode bool
NextInvoiceSequence int64
PreferredLocales []string
TaxExempt string
Deleted bool
UpdatedAt time.Time
}
type StripePrice ¶
type StripePrice struct {
ID string
Object string
Active bool
Currency string
Metadata pqtype.NullRawMessage
Nickname sql.NullString
Recurring pqtype.NullRawMessage
Type string
UnitAmount sql.NullInt64
BillingScheme string
Created int64
Livemode bool
LookupKey sql.NullString
TiersMode sql.NullString
TransformQuantity pqtype.NullRawMessage
UnitAmountDecimal sql.NullFloat64
Product string
UpdatedAt time.Time
}
type StripeProduct ¶
type StripeProduct struct {
ID string
Object string
Active bool
Description sql.NullString
Metadata pqtype.NullRawMessage
Name string
Created int64
Images []string
Livemode bool
PackageDimensions pqtype.NullRawMessage
Shippable bool
StatementDescriptor sql.NullString
UnitLabel sql.NullString
Updated int64
Url sql.NullString
UpdatedAt time.Time
}
type StripeSubscription ¶
type StripeSubscription struct {
ID string
Object string
CancelAtPeriodEnd bool
CurrentPeriodEnd int64
CurrentPeriodStart int64
DefaultPaymentMethod sql.NullString
Metadata pqtype.NullRawMessage
PendingSetupIntent sql.NullString
PendingUpdate pqtype.NullRawMessage
Status string
ApplicationFeePercent sql.NullFloat64
BillingCycleAnchor int64
BillingThresholds pqtype.NullRawMessage
CancelAt sql.NullInt64
CanceledAt sql.NullInt64
CollectionMethod string
Created int64
DaysUntilDue sql.NullInt64
DefaultSource sql.NullString
DefaultTaxRates pqtype.NullRawMessage
Discount pqtype.NullRawMessage
EndedAt sql.NullInt64
Livemode bool
NextPendingInvoiceItemInvoice sql.NullInt64
PauseCollection pqtype.NullRawMessage
PendingInvoiceItemInterval pqtype.NullRawMessage
StartDate int64
TransferData pqtype.NullRawMessage
TrialEnd sql.NullInt64
TrialStart sql.NullInt64
Schedule sql.NullString
Customer string
UpdatedAt time.Time
}
type StripeSubscriptionItem ¶
type StripeSubscriptionItem struct {
ID string
Object string
BillingThresholds pqtype.NullRawMessage
Created int64
Metadata pqtype.NullRawMessage
Quantity int64
Price string
Subscription string
TaxRates pqtype.NullRawMessage
}
type StripeSyncState ¶
type UpsertCustomerParams ¶
type UpsertCustomerParams struct {
ID string
Object string
Address pqtype.NullRawMessage
Description sql.NullString
Email sql.NullString
Metadata pqtype.NullRawMessage
Name sql.NullString
Phone sql.NullString
Shipping pqtype.NullRawMessage
Balance sql.NullInt64
Created int64
Currency sql.NullString
Delinquent bool
Discount pqtype.NullRawMessage
InvoicePrefix string
InvoiceSettings pqtype.NullRawMessage
Livemode bool
NextInvoiceSequence int64
PreferredLocales []string
TaxExempt string
Deleted bool
}
type UpsertPriceParams ¶
type UpsertPriceParams struct {
ID string
Object string
Active bool
BillingScheme string
Created int64
Currency string
Livemode bool
LookupKey sql.NullString
Metadata pqtype.NullRawMessage
Nickname sql.NullString
Recurring pqtype.NullRawMessage
Type string
UnitAmount sql.NullInt64
TiersMode sql.NullString
TransformQuantity pqtype.NullRawMessage
UnitAmountDecimal sql.NullFloat64
Product string
}
type UpsertProductParams ¶
type UpsertProductParams struct {
ID string
Object string
Active bool
Description sql.NullString
Metadata pqtype.NullRawMessage
Name string
Created int64
Images []string
Livemode bool
PackageDimensions pqtype.NullRawMessage
Shippable bool
StatementDescriptor sql.NullString
UnitLabel sql.NullString
Updated int64
Url sql.NullString
}
type UpsertSubscriptionItemParams ¶
type UpsertSubscriptionItemParams struct {
ID string
Object string
BillingThresholds pqtype.NullRawMessage
Created int64
Metadata pqtype.NullRawMessage
Price string
Quantity int64
Subscription string
TaxRates pqtype.NullRawMessage
}
type UpsertSubscriptionParams ¶
type UpsertSubscriptionParams struct {
ID string
Object string
CancelAtPeriodEnd bool
CurrentPeriodEnd int64
CurrentPeriodStart int64
Metadata pqtype.NullRawMessage
PendingUpdate pqtype.NullRawMessage
Status string
ApplicationFeePercent sql.NullFloat64
BillingCycleAnchor int64
BillingThresholds pqtype.NullRawMessage
CancelAt sql.NullInt64
CanceledAt sql.NullInt64
CollectionMethod string
Created int64
DaysUntilDue sql.NullInt64
DefaultTaxRates pqtype.NullRawMessage
Discount pqtype.NullRawMessage
EndedAt sql.NullInt64
Livemode bool
NextPendingInvoiceItemInvoice sql.NullInt64
PauseCollection pqtype.NullRawMessage
PendingInvoiceItemInterval pqtype.NullRawMessage
StartDate int64
TransferData pqtype.NullRawMessage
TrialEnd sql.NullInt64
TrialStart sql.NullInt64
Customer string
}
Click to show internal directories.
Click to hide internal directories.