Documentation
¶
Index ¶
- Constants
- Variables
- func DecryptSecretHookFunc(hashKey string) mapstructure.DecodeHookFunc
- func LoadEnvHook(f reflect.Kind, t reflect.Kind, data interface{}) (interface{}, error)
- func NewConfig(editors ...ConfigEditor) config
- func NewPathBuilder(configPath string) pathBuilder
- func ToTomlBytes(config any) ([]byte, error)
- func ValOrDefault[T any](v nullable.Nullable[T], def T) T
- func ValidateBucketName(name string) error
- func ValidateFunctionSlug(slug string) error
- func ValidateFunctionsHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- func VersionCompare(a, b string) int
- type AddressFamily
- type BucketConfig
- type CaptchaProvider
- type Config
- type ConfigEditor
- type ConfigUpdater
- func (u *ConfigUpdater) UpdateApiConfig(ctx context.Context, projectRef string, c api, filter ...func(string) bool) error
- func (u *ConfigUpdater) UpdateAuthConfig(ctx context.Context, projectRef string, c auth, filter ...func(string) bool) error
- func (u *ConfigUpdater) UpdateDbConfig(ctx context.Context, projectRef string, c db, filter ...func(string) bool) error
- func (u *ConfigUpdater) UpdateDbNetworkRestrictionsConfig(ctx context.Context, projectRef string, n networkRestrictions, ...) error
- func (u *ConfigUpdater) UpdateDbSettingsConfig(ctx context.Context, projectRef string, s settings, ...) error
- func (u *ConfigUpdater) UpdateExperimentalConfig(ctx context.Context, projectRef string, exp experimental, ...) error
- func (u *ConfigUpdater) UpdateRemoteConfig(ctx context.Context, remote baseConfig, filter ...func(string) bool) error
- func (u *ConfigUpdater) UpdateStorageConfig(ctx context.Context, projectRef string, c storage, filter ...func(string) bool) error
- type CustomClaims
- type FunctionConfig
- type Glob
- type LogflareBackend
- type PasswordRequirements
- type PoolMode
- type RequestPolicy
- type Secret
- type SecretsConfig
- type SessionReplicationRole
Constants ¶
const ENCRYPTED_PREFIX = "encrypted:"
const HASHED_PREFIX = "hash:"
const PRIVATE_KEY_PREFIX = "DOTENV_PRIVATE_KEY"
Variables ¶
var (
Images images
)
Functions ¶
func DecryptSecretHookFunc ¶
func DecryptSecretHookFunc(hashKey string) mapstructure.DecodeHookFunc
func LoadEnvHook ¶
LoadEnvHook is a mapstructure decode hook that loads environment variables from strings formatted as env(VAR_NAME).
func NewConfig ¶
func NewConfig(editors ...ConfigEditor) config
func NewPathBuilder ¶
func NewPathBuilder(configPath string) pathBuilder
func ToTomlBytes ¶
func ValOrDefault ¶
func ValidateBucketName ¶
func ValidateFunctionSlug ¶
func ValidateFunctionsHook ¶
ValidateFunctionsHook is a mapstructure decode hook that validates the functions config format.
func VersionCompare ¶
Types ¶
type AddressFamily ¶
type AddressFamily string
const ( AddressIPv6 AddressFamily = "IPv6" AddressIPv4 AddressFamily = "IPv4" )
func (*AddressFamily) UnmarshalText ¶
func (f *AddressFamily) UnmarshalText(text []byte) error
type BucketConfig ¶
type BucketConfig map[string]bucket
type CaptchaProvider ¶
type CaptchaProvider string
const ( HCaptchaProvider CaptchaProvider = "hcaptcha" TurnstileProvider CaptchaProvider = "turnstile" )
func (*CaptchaProvider) UnmarshalText ¶
func (p *CaptchaProvider) UnmarshalText(text []byte) error
type ConfigEditor ¶
type ConfigEditor func(Config)
func WithHostname ¶
func WithHostname(hostname string) ConfigEditor
type ConfigUpdater ¶
type ConfigUpdater struct {
// contains filtered or unexported fields
}
func NewConfigUpdater ¶
func NewConfigUpdater(client v1API.ClientWithResponses) ConfigUpdater
func (*ConfigUpdater) UpdateApiConfig ¶
func (*ConfigUpdater) UpdateAuthConfig ¶
func (*ConfigUpdater) UpdateDbConfig ¶
func (*ConfigUpdater) UpdateDbNetworkRestrictionsConfig ¶ added in v1.0.6
func (*ConfigUpdater) UpdateDbSettingsConfig ¶
func (*ConfigUpdater) UpdateExperimentalConfig ¶
func (*ConfigUpdater) UpdateRemoteConfig ¶
func (*ConfigUpdater) UpdateStorageConfig ¶
type CustomClaims ¶
type CustomClaims struct { // Overrides Issuer to maintain json order when marshalling Issuer string `json:"iss,omitempty"` Ref string `json:"ref,omitempty"` Role string `json:"role"` jwt.RegisteredClaims }
func (CustomClaims) NewToken ¶
func (c CustomClaims) NewToken() *jwt.Token
type FunctionConfig ¶
type FunctionConfig map[string]function
We follow these rules when adding new config:
- Update init_config.toml (and init_config.test.toml) with the new key, default value, and comments to explain usage.
- Update config struct with new field and toml tag (spelled in snake_case).
- Add custom field validations to LoadConfigFS function for eg. integer range checks.
If you are adding new user defined secrets, such as OAuth provider secret, the default value in init_config.toml should be an env var substitution. For example,
> secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
Default values for internal configs should be added to `var Config` initializer.
type LogflareBackend ¶
type LogflareBackend string
const ( LogflarePostgres LogflareBackend = "postgres" LogflareBigQuery LogflareBackend = "bigquery" )
func (*LogflareBackend) UnmarshalText ¶
func (b *LogflareBackend) UnmarshalText(text []byte) error
type PasswordRequirements ¶
type PasswordRequirements string
const ( NoRequirements PasswordRequirements = "" LettersDigits PasswordRequirements = "letters_digits" LowerUpperLettersDigits PasswordRequirements = "lower_upper_letters_digits" LowerUpperLettersDigitsSymbols PasswordRequirements = "lower_upper_letters_digits_symbols" )
func NewPasswordRequirement ¶
func NewPasswordRequirement(c v1API.UpdateAuthConfigBodyPasswordRequiredCharacters) PasswordRequirements
func (PasswordRequirements) ToChar ¶
func (r PasswordRequirements) ToChar() v1API.UpdateAuthConfigBodyPasswordRequiredCharacters
func (*PasswordRequirements) UnmarshalText ¶
func (r *PasswordRequirements) UnmarshalText(text []byte) error
type RequestPolicy ¶
type RequestPolicy string
const ( PolicyPerWorker RequestPolicy = "per_worker" PolicyOneshot RequestPolicy = "oneshot" )
func (*RequestPolicy) UnmarshalText ¶
func (p *RequestPolicy) UnmarshalText(text []byte) error
type Secret ¶
func (Secret) MarshalText ¶
type SecretsConfig ¶
We follow these rules when adding new config:
- Update init_config.toml (and init_config.test.toml) with the new key, default value, and comments to explain usage.
- Update config struct with new field and toml tag (spelled in snake_case).
- Add custom field validations to LoadConfigFS function for eg. integer range checks.
If you are adding new user defined secrets, such as OAuth provider secret, the default value in init_config.toml should be an env var substitution. For example,
> secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
Default values for internal configs should be added to `var Config` initializer.
type SessionReplicationRole ¶
type SessionReplicationRole string
const ( SessionReplicationRoleOrigin SessionReplicationRole = "origin" SessionReplicationRoleReplica SessionReplicationRole = "replica" SessionReplicationRoleLocal SessionReplicationRole = "local" )
func (*SessionReplicationRole) UnmarshalText ¶
func (r *SessionReplicationRole) UnmarshalText(text []byte) error