Documentation ¶
Index ¶
- Constants
- Variables
- func GetMailClient(ctx context.Context) (mail.EmailClient, error)
- func GetNow() time.Time
- func GetOAuthConfig(ctx context.Context) (*config.AuthConfig, error)
- func GetPrivateKey(ctx context.Context) (*rsa.PrivateKey, error)
- func GetRequestHeaders(ctx context.Context) (map[string][]string, error)
- func GetSecret(ctx context.Context, secret string) (string, error)
- func GetSecrets(ctx context.Context) map[string]string
- func WithEnv(ctx context.Context, env KeelEnv) context.Context
- func WithMailClient(ctx context.Context, client mail.EmailClient) context.Context
- func WithOAuthConfig(ctx context.Context, config *config.AuthConfig) context.Context
- func WithPrivateKey(ctx context.Context, privateKey *rsa.PrivateKey) context.Context
- func WithRequestHeaders(ctx context.Context, headers map[string][]string) context.Context
- func WithSecrets(ctx context.Context, secrets map[string]string) context.Context
- type EnvKeyContextType
- type KeelEnv
Constants ¶
View Source
const ( ContextIdentityField = "identity" ContextIsAuthenticatedField = "isAuthenticated" ContextNowField = "now" ContextEnvField = "env" ContextSecretField = "secret" )
View Source
const ContextTarget string = "ctx"
View Source
const (
SecretContextKey secretContextKey = "secret"
)
Variables ¶
View Source
var ContextFieldTypes = map[string]proto.Type{ ContextIdentityField: proto.Type_TYPE_MODEL, ContextIsAuthenticatedField: proto.Type_TYPE_BOOL, ContextNowField: proto.Type_TYPE_DATETIME, ContextEnvField: proto.Type_TYPE_OBJECT, ContextSecretField: proto.Type_TYPE_SECRET, }
Functions ¶
func GetMailClient ¶
func GetMailClient(ctx context.Context) (mail.EmailClient, error)
func GetOAuthConfig ¶ added in v0.372.0
func GetOAuthConfig(ctx context.Context) (*config.AuthConfig, error)
func GetPrivateKey ¶
func GetPrivateKey(ctx context.Context) (*rsa.PrivateKey, error)
func WithMailClient ¶
func WithOAuthConfig ¶ added in v0.372.0
func WithPrivateKey ¶
func WithRequestHeaders ¶
Types ¶
type EnvKeyContextType ¶
type EnvKeyContextType string
Click to show internal directories.
Click to hide internal directories.