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 GetStorage(ctx context.Context) (storage.Storer, error)
- func HasStorage(ctx context.Context) bool
- 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
- func WithStorage(ctx context.Context, svc storage.Storer) 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 GetStorage ¶ added in v0.388.0
GetStorage will return the Storer service from the context
func HasStorage ¶ added in v0.388.0
HasStorage checks if the context has a Storer service
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.