entities

package
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	Tag           string      `json:"tag"`
	Method        string      `json:"method"`
	Path          string      `json:"path"`
	DelayInMillis int64       `json:"delayInMillis"`
	Status        int         `json:"status"`
	Body          interface{} `json:"body"`
}

Mock is the mock entity

func (*Mock) Decode

func (m *Mock) Decode(b []byte) error

Decode is used to decode the bytes to this mock instance

func (*Mock) Encode

func (m *Mock) Encode() ([]byte, error)

Encode is used to get the encoded bytes for this mock instance

func (*Mock) Key

func (m *Mock) Key() ([]byte, error)

Key is the key of the mock entity

func (*Mock) Name

func (m *Mock) Name() []byte

Name is the mock entity name

type MockKey

type MockKey struct {
	Tag    string `json:"tag"`
	Method string `json:"method"`
	Path   string `json:"path"`
}

MockKey is the primary key for mock entity

Source Files

Jump to

Keyboard shortcuts

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