Documentation ¶
Index ¶
- Constants
- Variables
- func Save(dir string, cfg *Config, opts ...Option) error
- type Config
- type Force
- type GenerateOn
- type GenerateWorkflow
- type Generation
- type GetLanguageDefaultFunc
- type Inputs
- type Job
- type Jobs
- type LanguageConfig
- type Management
- type Option
- type Permissions
- type PublishOn
- type PublishWorkflow
- type Push
- type ReadFileFunc
- type Schedule
- type SdkGenConfig
- type SdkGenConfigField
- type UpgradeFunc
- type WorkflowDispatch
- type WriteFileFunc
Constants ¶
View Source
const ( Version = "1.0.0" GithubWritePermission = "write" BaseServerURL = "baseServerUrl" SDKClassName = "sdkClassName" SingleTagPerOp = "singleTagPerOp" TagNamespacingDisabled = "tagNamespacingDisabled" Languages = "languages" Mode = "mode" GithubAccessToken = "github_access_token" SpeakeasyApiKey = "speakeasy_api_key" OpenAPIDocAuthHeader = "openapi_doc_auth_header" OpenAPIDocAuthToken = "openapi_doc_auth_token" OpenAPIDocs = "openapi_docs" OmitDescriptionIfSummaryPresent = "omitDescriptionIfSummaryPresent" DisableComments = "disableComments" )
Variables ¶
View Source
var CommentFields = []string{DisableComments, OmitDescriptionIfSummaryPresent}
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 GenerateOn ¶ added in v0.4.2
type GenerateOn struct { WorkflowDispatch WorkflowDispatch `yaml:"workflow_dispatch"` Schedule []Schedule `yaml:"schedule,omitempty"` }
type GenerateWorkflow ¶ added in v0.4.2
type GenerateWorkflow struct { Name string `yaml:"name"` Env map[string]string `yaml:"env,omitempty"` Permissions Permissions `yaml:"permissions"` On GenerateOn `yaml:"on"` Jobs Jobs `yaml:"jobs"` }
type Generation ¶
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 Permissions ¶ added in v0.4.2
type PublishWorkflow ¶ added in v0.4.2
type ReadFileFunc ¶
type SdkGenConfig ¶ added in v0.3.1
type SdkGenConfig struct { SdkGenLanguageConfig map[string][]SdkGenConfigField `json:"language_configs"` SdkGenCommonConfig []SdkGenConfigField `json:"common_config"` }
type SdkGenConfigField ¶ added in v0.3.2
type SdkGenConfigField struct { Name string `yaml:"name" json:"name"` Required bool `yaml:"required" json:"required"` RequiredForPublishing *bool `yaml:"requiredForPublishing,omitempty" json:"required_for_publishing,omitempty"` DefaultValue *any `yaml:"defaultValue,omitempty" json:"default_value,omitempty"` Description *string `yaml:"description,omitempty" json:"description,omitempty"` Language *string `yaml:"language,omitempty" json:"language,omitempty"` SecretName *string `yaml:"secretName,omitempty" json:"secret_name,omitempty"` ValidationRegex *string `yaml:"validationRegex,omitempty" json:"validation_regex,omitempty"` ValidationMessage *string `yaml:"validationMessage,omitempty" json:"validation_message,omitempty"` }
type UpgradeFunc ¶
type WorkflowDispatch ¶ added in v0.4.2
type WorkflowDispatch struct {
Inputs Inputs `yaml:"inputs"`
}
Click to show internal directories.
Click to hide internal directories.