data

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data interface{}

type ErrGenerationFailed

type ErrGenerationFailed struct {
	GeneratorID string
	Message     string
	Path        string
	Previous    error
}

func (*ErrGenerationFailed) Error

func (err *ErrGenerationFailed) Error() string

func (*ErrGenerationFailed) Unwrap

func (err *ErrGenerationFailed) Unwrap() error

type MediaGenerator

type MediaGenerator interface {
	GenerateData(ctx context.Context, mediaType *openapi3.MediaType) (Data, error)
}

func New

func New(options Options) MediaGenerator

type Options

type Options struct {
	UseExamples     UseExamplesEnum
	NullProbability float64
	DefaultMinInt   int64
	DefaultMaxInt   int64
	DefaultMinFloat float64
	DefaultMaxFloat float64
	SuppressErrors  bool
}

type UseExamplesEnum

type UseExamplesEnum int
const (
	No UseExamplesEnum = iota
	IfPresent
	Exclusively
)

func (UseExamplesEnum) String

func (enum UseExamplesEnum) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL