Documentation
¶
Index ¶
- Variables
- func AddCollectionsToParams(d *Data) (err error)
- func AddJobItemsToParams(d *Data) (err error)
- func AddLinkFollowersToParams(d *Data) error
- func AddValuesToParams(d *Data, getValues func(*openapi3.T) (any, error), generationType string) (err error)
- func CopyStaticFiles(ctx context.Context, staticFileConfig *StaticFileConfig) (err error)
- func GenerateTemplateFile(ctx context.Context, d *Data) (err error)
- func ParseDeclarations(src string) ([]ast.Decl, error)
- func ParseFile(src string) (*ast.File, error)
- func ParseStatements(src string, fset *token.FileSet) ([]ast.Stmt, error)
- type APIServiceFollowFunc
- type Collection
- type CollectionOption
- type CollectionParams
- type Collections
- type Data
- type ExtensionsConfig
- type Follower
- type Followers
- type FollowersParams
- type JobItem
- type JobItems
- type JobItemsParams
- type MessageCollection
- type MessageCollections
- type NotificationFeedCollection
- type NotificationFeedCollections
- type StaticFileConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidGenerationTargets = map[string]func(*Data) error{ "collections": AddCollectionsToParams, "jobs": AddJobItemsToParams, "links": AddLinkFollowersToParams, }
Functions ¶
func AddCollectionsToParams ¶
func AddJobItemsToParams ¶
func AddValuesToParams ¶
func CopyStaticFiles ¶
func CopyStaticFiles(ctx context.Context, staticFileConfig *StaticFileConfig) (err error)
Types ¶
type APIServiceFollowFunc ¶
type Collection ¶
type CollectionOption ¶
type CollectionOption interface {
// contains filtered or unexported methods
}
func WithNoPagination ¶
func WithNoPagination(n bool) CollectionOption
type CollectionParams ¶
type CollectionParams = struct {
Collections
JobItems
MessageCollections
NotificationFeedCollections
}
func GetCollections ¶
func GetCollections(swagger *openapi3.T) (collections CollectionParams, err error)
type Collections ¶
type Collections = []Collection
type Data ¶
type Data struct {
Params any
SpecPath string
TemplatePath string
DestinationPath string
ClientPackagePath string
PackageName string
DisableLinks bool
}
func GenerateDataStruct ¶
func GenerateDataStruct(cfg ExtensionsConfig) (d *Data, err error)
type ExtensionsConfig ¶
type ExtensionsConfig struct {
Input string `mapstructure:"input"`
Output string `mapstructure:"output"`
Template string `mapstructure:"template"`
GenerateType string `mapstructure:"generate_type"`
ClientPackagePath string `mapstructure:"client_path"`
DisableLinks bool `mapstructure:"disable_links"`
}
func DefaultExtensionsConfig ¶
func DefaultExtensionsConfig() *ExtensionsConfig
func (*ExtensionsConfig) Validate ¶
func (cfg *ExtensionsConfig) Validate() error
type Follower ¶
type Follower struct {
APIService string
APIRequest string
APIFollowFunc APIServiceFollowFunc
}
type FollowersParams ¶
type FollowersParams = struct {
Followers
}
type JobItemsParams ¶
type JobItemsParams = struct {
JobItems
}
func GetJobItems ¶
func GetJobItems(swagger *openapi3.T) (jobItems JobItemsParams, err error)
type MessageCollection ¶
type MessageCollections ¶
type MessageCollections []MessageCollection
type NotificationFeedCollections ¶
type NotificationFeedCollections []NotificationFeedCollection
type StaticFileConfig ¶
func GenerateStaticFileConfigStruct ¶
func GenerateStaticFileConfigStruct(cfg ExtensionsConfig) (d *StaticFileConfig, err error)
Click to show internal directories.
Click to hide internal directories.