stripe

package
v0.5.0-linux-arm64 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 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

Overview

Package stripe implements bounded revenue reads from the Stripe API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsReadStatement

func IsReadStatement(raw json.RawMessage) bool

func Validate

func Validate(cfg *Config, creds Credentials) error

func ValidateRestrictedKey

func ValidateRestrictedKey(cfg *Config, creds Credentials) error

ValidateRestrictedKey checks customer-supplied credentials before storage or a draft test.

Types

type Config

type Config struct {
	Mode string `json:"mode" validate:"required,oneof=test live"`
}

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

func New

func New(_ context.Context, cfg Config, creds Credentials) (*Connector, error)

func (*Connector) Close

func (c *Connector) Close() error

func (*Connector) Execute

func (*Connector) IntrospectSchema

func (c *Connector) IntrospectSchema(ctx context.Context) (*Schema, error)

func (*Connector) TestConnection

func (c *Connector) TestConnection(ctx context.Context) error

type Credentials

type Credentials struct {
	APIKey      string `json:"api_key,omitempty"`
	AccessToken string `json:"access_token,omitempty"`
	OAuthMode   string `json:"oauth_mode,omitempty"`
}

type ObjectSchema

type ObjectSchema struct {
	Name       string           `json:"name"`
	Properties []PropertySchema `json:"properties"`
}

type PropertySchema

type PropertySchema struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type Schema

type Schema struct {
	Objects []ObjectSchema `json:"objects"`
}

type SchemaIntrospector

type SchemaIntrospector interface {
	IntrospectSchema(context.Context) (*Schema, error)
}

Jump to

Keyboard shortcuts

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