stripe

package
v3.83.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Index

Constants

View Source
const (
	SECRET_PREFIX      = "sk_"
	PUBLISHABLE_PREFIX = "pk_"
	RESTRICTED_PREFIX  = "rk_"
	LIVE_PREFIX        = "live_"
	TEST_PREFIX        = "test_"
	SECRET             = "Secret"
	PUBLISHABLE        = "Publishable"
	RESTRICTED         = "Restricted"
	LIVE               = "Live"
	TEST               = "Test"
)

Variables

View Source
var (
	PermissionStrings = map[Permission]string{}/* 101 elements not displayed */

	StringToPermission = map[string]Permission{}/* 101 elements not displayed */

	PermissionIDs = map[Permission]int{}/* 101 elements not displayed */

	IdToPermission = map[int]Permission{}/* 101 elements not displayed */

)

Functions

func AnalyzeAndPrintPermissions added in v3.80.5

func AnalyzeAndPrintPermissions(cfg *config.Config, key string)

func StatusContains

func StatusContains(status int, vals []int) bool

Types

type Analyzer added in v3.80.6

type Analyzer struct {
	Cfg *config.Config
}

func (Analyzer) Analyze added in v3.80.6

func (a Analyzer) Analyze(_ context.Context, credInfo map[string]string) (*analyzers.AnalyzerResult, error)

func (Analyzer) Type added in v3.80.6

type Category

type Category map[string]map[string]HttpStatusTest

type Config

type Config struct {
	Categories map[string]Category `yaml:"categories"`
}

type HttpStatusTest

type HttpStatusTest struct {
	Endpoint        string      `yaml:"Endpoint"`
	Method          string      `yaml:"Method"`
	Payload         interface{} `yaml:"Payload"`
	ValidStatuses   []int       `yaml:"Valid"`
	InvalidStatuses []int       `yaml:"Invalid"`
}

func (*HttpStatusTest) RunTest

func (h *HttpStatusTest) RunTest(cfg *config.Config, headers map[string]string) (bool, error)

type Permission

type Permission int
const (
	Invalid                             Permission = iota
	ConnectedAccountRead                Permission = iota
	AccountLinkWrite                    Permission = iota
	ApplePayDomainRead                  Permission = iota
	ApplePayDomainWrite                 Permission = iota
	ApplicationFeeRead                  Permission = iota
	ApplicationFeeWrite                 Permission = iota
	BalanceRead                         Permission = iota
	BalanceTransactionSourceRead        Permission = iota
	BillingClockRead                    Permission = iota
	BillingClockWrite                   Permission = iota
	ChargeRead                          Permission = iota
	ChargeWrite                         Permission = iota
	CheckoutSessionRead                 Permission = iota
	CheckoutSessionWrite                Permission = iota
	TerminalConfigurationRead           Permission = iota
	TerminalConfigurationWrite          Permission = iota
	TerminalConnectionTokenWrite        Permission = iota
	CouponRead                          Permission = iota
	CouponWrite                         Permission = iota
	CreditNoteRead                      Permission = iota
	CreditNoteWrite                     Permission = iota
	CustomerPortalRead                  Permission = iota
	CustomerPortalWrite                 Permission = iota
	CustomerRead                        Permission = iota
	CustomerWrite                       Permission = iota
	DisputeRead                         Permission = iota
	DisputeWrite                        Permission = iota
	EditLinkWrite                       Permission = iota
	ElementsWrite                       Permission = iota
	EventRead                           Permission = iota
	FileRead                            Permission = iota
	FileWrite                           Permission = iota
	InvoiceRead                         Permission = iota
	InvoiceWrite                        Permission = iota
	IssuingAuthorizationRead            Permission = iota
	IssuingAuthorizationWrite           Permission = iota
	IssuingCardRead                     Permission = iota
	IssuingCardWrite                    Permission = iota
	IssuingCardholderRead               Permission = iota
	IssuingCardholderWrite              Permission = iota
	IssuingDisputeRead                  Permission = iota
	IssuingDisputeWrite                 Permission = iota
	IssuingTransactionRead              Permission = iota
	IssuingTransactionWrite             Permission = iota
	TerminalLocationRead                Permission = iota
	TerminalLocationWrite               Permission = iota
	MandateRead                         Permission = iota
	MandateWrite                        Permission = iota
	OrderRead                           Permission = iota
	OrderWrite                          Permission = iota
	PaymentIntentRead                   Permission = iota
	PaymentIntentWrite                  Permission = iota
	PaymentLinksRead                    Permission = iota
	PaymentLinksWrite                   Permission = iota
	PaymentMethodRead                   Permission = iota
	PaymentMethodWrite                  Permission = iota
	PayoutRead                          Permission = iota
	PayoutWrite                         Permission = iota
	PlanRead                            Permission = iota
	PlanWrite                           Permission = iota
	ProductRead                         Permission = iota
	ProductWrite                        Permission = iota
	PromotionCodeRead                   Permission = iota
	PromotionCodeWrite                  Permission = iota
	QuoteRead                           Permission = iota
	QuoteWrite                          Permission = iota
	TerminalReaderRead                  Permission = iota
	TerminalReaderWrite                 Permission = iota
	ReportRunsAndReportTypesRead        Permission = iota
	ReviewRead                          Permission = iota
	ReviewWrite                         Permission = iota
	SecretWrite                         Permission = iota
	SetupIntentRead                     Permission = iota
	SetupIntentWrite                    Permission = iota
	ShippingRateRead                    Permission = iota
	ShippingRateWrite                   Permission = iota
	SkuRead                             Permission = iota
	SkuWrite                            Permission = iota
	SourceRead                          Permission = iota
	SourceWrite                         Permission = iota
	SubscriptionRead                    Permission = iota
	SubscriptionWrite                   Permission = iota
	TaxRateRead                         Permission = iota
	TaxRateWrite                        Permission = iota
	TaxSettingsRead                     Permission = iota
	TaxSettingsWrite                    Permission = iota
	TaxCalculationsAndTransactionsRead  Permission = iota
	TaxCalculationsAndTransactionsWrite Permission = iota
	TokenRead                           Permission = iota
	TokenWrite                          Permission = iota
	TopUpRead                           Permission = iota
	TopUpWrite                          Permission = iota
	TransferRead                        Permission = iota
	TransferWrite                       Permission = iota
	UsageRecordRead                     Permission = iota
	UsageRecordWrite                    Permission = iota
	UserEmailRead                       Permission = iota
	WebhookRead                         Permission = iota
	WebhookWrite                        Permission = iota
	IssuingCardSensitiveRead            Permission = iota
	FundingInstructionRead              Permission = iota
)

func PermissionFromID added in v3.82.3

func PermissionFromID(id int) (Permission, error)

PermissionFromID converts an ID to its Permission enum

func PermissionFromString added in v3.82.3

func PermissionFromString(s string) (Permission, error)

PermissionFromString converts a string representation to its Permission enum

func (Permission) ToID added in v3.82.3

func (p Permission) ToID() (int, error)

ToID converts a Permission enum to its ID

func (Permission) ToString added in v3.82.3

func (p Permission) ToString() (string, error)

ToString converts a Permission enum to its string representation

type PermissionStruct added in v3.82.3

type PermissionStruct struct {
	Name  string
	Value *string
}

type PermissionsCategory

type PermissionsCategory struct {
	Name        string
	Permissions []PermissionStruct
}

type SecretInfo added in v3.80.5

type SecretInfo struct {
	KeyType     string
	KeyEnv      string
	Valid       bool
	Permissions []PermissionsCategory
}

func AnalyzePermissions

func AnalyzePermissions(cfg *config.Config, key string) (*SecretInfo, error)

Jump to

Keyboard shortcuts

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