Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiConfig ¶
type ApiConfig struct {
Rest RestConfig `json:"rest"`
GraphQL GraphQLConfig `json:"graphql"`
}
ApiConfig is the top-level config persisted and served by the admin API.
func DefaultApiConfig ¶
func DefaultApiConfig() ApiConfig
DefaultApiConfig returns the out-of-the-box API configuration.
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore persists ApiConfig as JSON in a local file. If the file does not exist, DefaultApiConfig() is returned.
func NewFileStore ¶
NewFileStore creates a FileStore that reads/writes path.
type GraphQLConfig ¶
type GraphQLConfig struct {
Introspection bool `json:"introspection"`
MaxQueryDepth int `json:"max_query_depth"`
MaxRows int `json:"max_rows"`
}
GraphQLConfig holds runtime configuration for the pg_graphql proxy.
type RestConfig ¶
type RestConfig struct {
Schema string `json:"schema"`
MaxRows int `json:"max_rows"`
CacheMaxTTL int `json:"cache_max_ttl"`
CacheTables map[string]RestTableCacheConfig `json:"cache_tables"`
}
RestConfig holds runtime configuration for the PostgREST proxy.
func (RestConfig) TableCacheAllowed ¶
func (r RestConfig) TableCacheAllowed(table string) (RestTableCacheConfig, bool)
TableCacheAllowed reports whether server REST cache may run for table.
type RestTableCacheConfig ¶
type RestTableCacheConfig struct {
Enabled bool `json:"enabled"`
AllowPublic bool `json:"allow_public"`
}
RestTableCacheConfig controls server-side REST GET caching for one table.
Click to show internal directories.
Click to hide internal directories.