Documentation ¶
Index ¶
- Constants
- Variables
- func NewConfig(editors ...ConfigEditor) config
- func NewPathBuilder(configPath string) pathBuilder
- func ToTomlBytes(config any) ([]byte, error)
- func ValidateBucketName(name string) error
- func ValidateFunctionSlug(slug string) error
- type AddressFamily
- type BucketConfig
- 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) 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 LogflareBackend
- type PasswordRequirements
- type PoolMode
- type RequestPolicy
- type SessionReplicationRole
Constants ¶
View Source
const ( Pg15Image = "supabase/postgres:15.6.1.143" // Append to JobImages when adding new dependencies below DifferImage = "supabase/pgadmin-schema-diff:cli-0.0.5" MigraImage = "supabase/migra:3.0.1663481299" PgProveImage = "supabase/pg_prove:3.36" )
Variables ¶
View Source
var JobImages = []string{ DifferImage, MigraImage, PgProveImage, }
View Source
var ServiceImages = []string{
gotrueImage,
realtimeImage,
storageImage,
imageProxyImage,
kongImage,
inbucketImage,
postgrestImage,
pgmetaImage,
studioImage,
edgeRuntimeImage,
logflareImage,
vectorImage,
supavisorImage,
}
Functions ¶
func NewConfig ¶
func NewConfig(editors ...ConfigEditor) config
func NewPathBuilder ¶
func NewPathBuilder(configPath string) pathBuilder
func ToTomlBytes ¶
func ValidateBucketName ¶
func ValidateFunctionSlug ¶
Types ¶
type AddressFamily ¶
type AddressFamily string
const ( AddressIPv6 AddressFamily = "IPv6" AddressIPv4 AddressFamily = "IPv4" )
type BucketConfig ¶
type BucketConfig map[string]bucket
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) 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)"
If you are adding an internal config or secret that doesn't need to be overridden by the user, exclude the field from toml serialization. For example,
type auth struct { AnonKey string `toml:"-" mapstructure:"anon_key"` }
Use `mapstructure:"anon_key"` tag only if you want inject values from a predictable environment variable, such as SUPABASE_AUTH_ANON_KEY.
Default values for internal configs should be added to `var Config` initializer.
type LogflareBackend ¶
type LogflareBackend string
const ( LogflarePostgres LogflareBackend = "postgres" LogflareBigQuery LogflareBackend = "bigquery" )
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
type RequestPolicy ¶
type RequestPolicy string
const ( PolicyPerWorker RequestPolicy = "per_worker" PolicyOneshot RequestPolicy = "oneshot" )
type SessionReplicationRole ¶
type SessionReplicationRole string
const ( SessionReplicationRoleOrigin SessionReplicationRole = "origin" SessionReplicationRoleReplica SessionReplicationRole = "replica" SessionReplicationRoleLocal SessionReplicationRole = "local" )
Click to show internal directories.
Click to hide internal directories.