stripe

package
v3.82.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

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

This section is empty.

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 struct {
	Name  string
	Value *string
}

type PermissionsCategory

type PermissionsCategory struct {
	Name        string
	Permissions []Permission
}

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