mockservice

package
v0.0.191 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(dir string, run func() int) int

Types

type MockService

type MockService struct {
	runtime.ServiceApp

	RequestData *RequestData
	// contains filtered or unexported fields
}

func GetMockService

func GetMockService() *MockService

func (*MockService) GetSerde

func (s *MockService) GetSerde(valueType reflect.Type) (serde.Serializer, error)

func (*MockService) SetConfig

func (s *MockService) SetConfig(config config.Config)

func (*MockService) StartService

func (s *MockService) StartService(ctx context.Context) error

func (*MockService) StopService

func (s *MockService) StopService(ctx context.Context)

func (*MockService) StreamsInit

func (s *MockService) StreamsInit(ctx context.Context)

type MockServiceConfig

type MockServiceConfig struct {
	config.ServiceAppConfig `mapstructure:",squash"`
}

type RequestData

type RequestData struct {
	Text string `json:"text,omitempty"`
}

type RequestDataSerde

type RequestDataSerde struct{}

func (*RequestDataSerde) Deserialize

func (s *RequestDataSerde) Deserialize(data []byte) (*RequestData, error)

func (*RequestDataSerde) DeserializeObj

func (s *RequestDataSerde) DeserializeObj(data []byte) (interface{}, error)

func (*RequestDataSerde) IsStub

func (s *RequestDataSerde) IsStub() bool

func (*RequestDataSerde) Serialize

func (s *RequestDataSerde) Serialize(value *RequestData, b []byte) ([]byte, error)

func (*RequestDataSerde) SerializeObj

func (s *RequestDataSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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