Documentation ¶
Index ¶
Constants ¶
View Source
const Version = "1.0.0"
Variables ¶
View Source
var ErrFailedUpgrade = errors.New("failed to upgrade config")
View Source
var ErrNotFound = errors.New("could not find gen.yaml")
Functions ¶
Types ¶
type Config ¶
type Config struct { ConfigVersion string `yaml:"configVersion"` Management *Management `yaml:"management,omitempty"` Generation Generation `yaml:"generation"` Languages map[string]LanguageConfig `yaml:",inline"` }
func GetDefaultConfig ¶
func GetDefaultConfig(getLangDefaultFunc GetLanguageDefaultFunc, langs ...string) (*Config, error)
type Generation ¶
type Generation struct { BaseServerURL string `yaml:"baseServerUrl,omitempty"` Comments *Comments `yaml:"comments,omitempty"` TelemetryEnabled bool `yaml:"telemetryEnabled"` SDKClassName string `yaml:"sdkClassName"` TagNamespacingDisabled bool `yaml:"tagNamespacingDisabled,omitempty"` SDKFlattening bool `yaml:"sdkFlattening"` }
type GetLanguageDefaultFunc ¶
type GetLanguageDefaultFunc func(string) (*LanguageConfig, error)
type LanguageConfig ¶
type Management ¶
type Option ¶
type Option func(*options)
func WithFileSystemFuncs ¶
func WithFileSystemFuncs(rf ReadFileFunc, wf WriteFileFunc) Option
func WithLanguageDefaultFunc ¶
func WithLanguageDefaultFunc(f GetLanguageDefaultFunc) Option
func WithLanguages ¶ added in v0.0.4
func WithUpgradeFunc ¶ added in v0.0.2
func WithUpgradeFunc(f UpgradeFunc) Option
type ReadFileFunc ¶
type UpgradeFunc ¶
Click to show internal directories.
Click to hide internal directories.