mock

package
v0.0.0-...-ccd8cf7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Namespace string `yaml:"namespace"`
	Alias     string `yaml:"alias"`
	Name      string `yaml:"name"`
	Path      string `yaml:"path"`
	Method    string `yaml:"method"`
	Response  string `yaml:"response"`
}

type Config

type Config struct {
	Mock []Client `yaml:"mock"`
}

type Generator

type Generator struct {
	*bytes.Buffer

	Config Config
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(opts ...Option) *Generator

func (*Generator) GenMockClient

func (g *Generator) GenMockClient() error

func (*Generator) P

func (g *Generator) P(str ...string)

func (*Generator) Parse

func (g *Generator) Parse(file string) error

type Option

type Option func(*Generator)

func WithWorkDir

func WithWorkDir(dir string) Option

Jump to

Keyboard shortcuts

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