sendgrid

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package sendgrid provides a verifier for SendGrid API keys. It uses the SendGrid API GET /v3/scopes endpoint to check key validity. That endpoint returns the scopes granted to the key itself and requires no particular permission, so every valid key can reach it regardless of how it is scoped. This avoids misclassifying a valid but narrowly scoped (restricted) key as invalid: a scoped endpoint such as /v3/user/profile returns 403 for a live key lacking that specific scope, which must not read as revoked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Verifier

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

Verifier checks whether a SendGrid API key is active by calling the SendGrid API. It NEVER logs or persists raw key values.

func (*Verifier) Type

func (v *Verifier) Type() string

Type returns the detector ID this verifier handles.

func (*Verifier) Verify

Verify checks if the detected SendGrid API key is valid/active. Raw contains the key value.

Jump to

Keyboard shortcuts

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