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: 0

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