Versions in this module Expand all Collapse all v0 v0.0.4 Jan 9, 2026 v0.0.3 Jan 9, 2026 Changes in this version type Mutation + Delay string type Query + Delay string v0.0.2 Jan 9, 2026 Changes in this version + var DefaultAcceptTypes = AcceptTypes + type AcceptType string + const AcceptForm + const AcceptJSON + type AcceptTypes []AcceptType + func (a *AcceptTypes) UnmarshalYAML(value *yaml.Node) error + type CORSConfig struct + AllowCredentials bool + AllowedOrigins []string + MaxAge int + func (c *CORSConfig) IsPermissive() bool + func (c *CORSConfig) UnmarshalYAML(value *yaml.Node) error + type CSVConfig struct + ValueParser string + type Config struct + CSV *CSVConfig + Database *DatabaseConfig + GlobalHelpers *GlobalHelpers + HTTP *HTTPConfig + Mutations []Mutation + Queries []Query + func Parse(data []byte) (Config, error) + func ParseFile(filename string) (Config, error) + func (cfg *Config) CORSEnabled() bool + func (cfg *Config) DSN() string + func (cfg *Config) Driver() (string, error) + func (cfg *Config) GetCORS() *CORSConfig + func (cfg *Config) RequiresDB() bool + func (cfg *Config) ValidateTransforms() error + type DatabaseConfig struct + DSN string + Init *DatabaseInit + type DatabaseInit struct + SQL string + SQLFiles []string + func (d *DatabaseInit) UnmarshalYAML(value *yaml.Node) error + type EntityType string + const EntityMutation + const EntityQuery + type GlobalHelpers struct + JS string + JSFiles []string + func (g *GlobalHelpers) UnmarshalYAML(value *yaml.Node) error + type HTTPConfig struct + CORS *CORSConfig + type Mock struct + Array []any + ArrayJS string + ArrayJSON string + ArrayJSONFile string + CSV string + CSVFile string + Delay string + Enabled bool + Filter string + JSONL string + JSONLFile string + Object map[string]any + ObjectJS string + ObjectJSON string + ObjectJSONFile string + func (m *Mock) GetJS() string + func (m *Mock) IsArraySource() bool + func (m *Mock) IsEmpty() bool + func (m *Mock) IsObjectSource() bool + func (m *Mock) UnmarshalYAML(value *yaml.Node) error + func (m *Mock) Validate() error + func (m *Mock) ValidateForTypeMany() error + func (m *Mock) ValidateForTypeOne() error + type Mutation struct + Accepts *AcceptTypes + Method string + Mock *Mock + Path string + SQL string + Transform *Transform + Type MutationType + func (m Mutation) GetAccepts() AcceptTypes + func (m Mutation) GetMethod() string + func (m Mutation) HasMock() bool + type MutationType string + const MutationTypeMany + const MutationTypeNone + const MutationTypeOne + type OpType string + const OpTypeMany + const OpTypeNone + const OpTypeOne + type PostTransform struct + All string + Each string + func (p *PostTransform) UnmarshalYAML(value *yaml.Node) error + type Query struct + Accepts *AcceptTypes + HandleNotFound bool + Method string + Mock *Mock + Path string + SQL string + Transform *Transform + Type QueryType + func (q Query) GetAccepts() AcceptTypes + func (q Query) GetMethod() string + func (q Query) HasMock() bool + type QueryType string + const QueryTypeMany + const QueryTypeOne + type Transform struct + Post PostTransform + Pre string