Versions in this module Expand all Collapse all v0 v0.1.0 Sep 27, 2022 Changes in this version + var DefaultNewResourceFuncs = map[model.Type]NewResourceFunc + var DefaultRandSourceFunc = func(typ model.Type) (rand.Source, error) + var ErrRequiredFieldMissing = errors.New("field does not exist for type") + type ModifyHTTPRequestFunc func(model.Type, *http.Request) error + type NewResourceFunc func(Seeder, proto.Message, int) error + type NewSeederOpts struct + ConcurrencyLimit int + HTTPClient *http.Client + NewResourceFuncs map[model.Type]NewResourceFunc + ProtoRegistry *protoregistry.Files + RandSourceFunc func(typ model.Type) (rand.Source, error) + URL string + type Options struct + type OptionsBuilder struct + func NewOptionsBuilder() *OptionsBuilder + func (b *OptionsBuilder) Build() (*Options, error) + func (b *OptionsBuilder) WithIgnoredErrors(errs ...error) *OptionsBuilder + func (b *OptionsBuilder) WithIncrementalTags(count int) *OptionsBuilder + func (b *OptionsBuilder) WithModifyHTTPRequestFuncs(modifyRequestFuncs ...ModifyHTTPRequestFunc) *OptionsBuilder + func (b *OptionsBuilder) WithNewResourceFunc(typ model.Type, inheritDefault bool, f NewResourceFunc) *OptionsBuilder + func (b *OptionsBuilder) WithRandomTagCount(count int, allowEmpty bool) *OptionsBuilder + func (b *OptionsBuilder) WithResourceCount(count int) *OptionsBuilder + func (b *OptionsBuilder) WithStaticTags(tags []string) *OptionsBuilder + type ResourceInfo struct + JSONSchemaConfig *extension.Config + Name model.Type + Schema *jsonschema.Schema + func (ri *ResourceInfo) HasField(fieldName string) bool + type Result struct + ID string + Resource proto.Message + Tags []string + func (r *Result) ToMap() (map[string]interface{}, error) + type Results struct + func (r *Results) Add(typ model.Type, results *Results) + func (r *Results) All() []*Result + func (r *Results) AllByType() map[model.Type]*Results + func (r *Results) ByType(typ model.Type) *Results + func (r *Results) GetByID(id string) *Result + func (r *Results) IDs() []string + type Seeder interface + AllResourceInfo func() []*ResourceInfo + ResourceInfoByType func(typ model.Type) *ResourceInfo + Results func() *Results + Seed func(context.Context, *Options, ...model.Type) (*Results, error) + SeedAllTypes func(context.Context, *Options) (*Results, error) + func New(opts NewSeederOpts) (Seeder, error)