typmock

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultMockAnnot = "@mock"
)

Functions

This section is empty.

Types

type GoMock

type GoMock struct {
	Layout typgen.Layouts
	Walker typgen.Walker
}

func (*GoMock) AnnotationName

func (g *GoMock) AnnotationName() string

func (*GoMock) Execute

func (g *GoMock) Execute(c *typgo.Context) error

func (*GoMock) IsAllowed

func (g *GoMock) IsAllowed(d *typgen.Annotation) bool

func (*GoMock) ProcessAnnot

func (g *GoMock) ProcessAnnot(c *typgen.Context, annot *typgen.Annotation) error

func (*GoMock) Task

func (d *GoMock) Task() *typgo.Task

Task to mock

type Mock

type Mock struct {
	Package            string
	Source             string
	Destination        string
	DestinationPackage string
}

Mock annotation data

func CreateMock

func CreateMock(d *typgen.Annotation) *Mock

CreateMock to create mock

func (*Mock) Generate

func (m *Mock) Generate(c *typgo.Context) error

MockGen execute mockgen bash

Jump to

Keyboard shortcuts

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