spec

package
v2.0.0-alpha56 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

Spec Package Documentation

This package contains Go structs for all the different types of API input-output messages. Designed as an independent module, its primary use is within the platform/yaml package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericSpec

type GenericSpec struct {
	Metadata         map[string]string       `json:"metadata" yaml:"metadata"`
	GenericRequests  []models.GenericPayload `json:"RequestBin,omitempty"`
	GenericResponses []models.GenericPayload `json:"ResponseBin,omitempty"`
	ReqTimestampMock time.Time               `json:"reqTimestampMock,omitempty"`
	ResTimestampMock time.Time               `json:"resTimestampMock,omitempty"`
}

type GrpcSpec

type GrpcSpec struct {
	GrpcReq          models.GrpcReq  `json:"grpcReq" yaml:"grpcReq"`
	GrpcResp         models.GrpcResp `json:"grpcResp" yaml:"grpcResp"`
	ReqTimestampMock time.Time       `json:"reqTimestampMock" yaml:"reqTimestampMock,omitempty"`
	ResTimestampMock time.Time       `json:"resTimestampMock" yaml:"resTimestampMock,omitempty"`
}

type HttpSpec

type HttpSpec struct {
	Metadata         map[string]string      `json:"metadata" yaml:"metadata"`
	Request          models.HttpReq         `json:"req" yaml:"req"`
	Response         models.HttpResp        `json:"resp" yaml:"resp"`
	Objects          []*models.OutputBinary `json:"objects" yaml:"objects"`
	Assertions       map[string]interface{} `json:"assertions" yaml:"assertions,omitempty"`
	Created          int64                  `json:"created" yaml:"created,omitempty"`
	ReqTimestampMock time.Time              `json:"reqTimestampMock" yaml:"reqTimestampMock,omitempty"`
	ResTimestampMock time.Time              `json:"resTimestampMock" yaml:"resTimestampMock,omitempty"`
}

type MongoSpec

type MongoSpec struct {
	Metadata         map[string]string `json:"metadata" yaml:"metadata"`
	Requests         []RequestYaml     `json:"requests" yaml:"requests"`
	Response         []ResponseYaml    `json:"responses" yaml:"responses"`
	CreatedAt        int64             `json:"created" yaml:"created,omitempty"`
	ReqTimestampMock time.Time         `json:"reqTimestampMock" yaml:"reqTimestampMock,omitempty"`
	ResTimestampMock time.Time         `json:"resTimestampMock" yaml:"resTimestampMock,omitempty"`
}

type MySQLSpec

type MySQLSpec struct {
	Metadata  map[string]string   `json:"metadata" yaml:"metadata"`
	Requests  []MysqlRequestYaml  `json:"requests" yaml:"requests"`
	Response  []MysqlResponseYaml `json:"responses" yaml:"responses"`
	CreatedAt int64               `json:"created" yaml:"created,omitempty"`
}

type MysqlRequestYaml

type MysqlRequestYaml struct {
	Header    *models.MySQLPacketHeader `json:"header,omitempty" yaml:"header"`
	Message   yaml.Node                 `json:"message,omitempty" yaml:"message"`
	ReadDelay int64                     `json:"read_delay,omitempty" yaml:"read_delay,omitempty"`
}

type MysqlResponseYaml

type MysqlResponseYaml struct {
	Header    *models.MySQLPacketHeader `json:"header,omitempty" yaml:"header"`
	Message   yaml.Node                 `json:"message,omitempty" yaml:"message"`
	ReadDelay int64                     `json:"read_delay,omitempty" yaml:"read_delay,omitempty"`
}

type PostgresSpec

type PostgresSpec struct {
	Metadata map[string]string `json:"metadata" yaml:"metadata"`

	// Objects  []*models.OutputBinary          `json:"objects" yaml:"objects"`
	PostgresRequests  []models.Backend  `json:"RequestBin,omitempty"`
	PostgresResponses []models.Frontend `json:"ResponseBin,omitempty"`

	ReqTimestampMock time.Time `json:"ReqTimestampMock,omitempty"`
	ResTimestampMock time.Time `json:"ResTimestampMock,omitempty"`
}

type RequestYaml

type RequestYaml struct {
	Header    *models.MongoHeader `json:"header,omitempty" yaml:"header"`
	Message   yaml.Node           `json:"message,omitempty" yaml:"message"`
	ReadDelay int64               `json:"read_delay,omitempty" yaml:"read_delay,omitempty"`
}

type ResponseYaml

type ResponseYaml struct {
	Header    *models.MongoHeader `json:"header,omitempty" yaml:"header"`
	Message   yaml.Node           `json:"message,omitempty" yaml:"message"`
	ReadDelay int64               `json:"read_delay,omitempty" yaml:"read_delay,omitempty"`
}

Jump to

Keyboard shortcuts

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