model

package
v0.0.0-...-5d8c97e Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthServiceStatusName

func HealthServiceStatusName(status HealthServiceStatus) string

Types

type CalculatorAddRequest

type CalculatorAddRequest struct {
	A int32 `form:"a" validate:"required"`
	B int32 `form:"b" validate:"required"`
}

type CalculatorDivRequest

type CalculatorDivRequest struct {
	M int32 `form:"m" validate:"required"`
	N int32 `form:"n" validate:"required,ne=0"`
}

type CalculatorFloatResponse

type CalculatorFloatResponse struct {
	Result float32 `reply:"result" json:"result"`
}

type CalculatorInt32Response

type CalculatorInt32Response struct {
	Result int32 `reply:"result" json:"result"`
}

type CalculatorMulRequest

type CalculatorMulRequest struct {
	E int32 `form:"e" validate:"required"`
	F int32 `form:"f" validate:"required"`
}

type CalculatorSubRequest

type CalculatorSubRequest struct {
	C int32 `form:"c" validate:"required"`
	D int32 `form:"d" validate:"required"`
}

type HealthCheckRequest

type HealthCheckRequest struct {
	Service string `form:"service" json:"service" validate:"required"`
}

type HealthCheckResponse

type HealthCheckResponse struct {
	Status HealthServiceStatus `json:"-" reply:"status"`
}

func (*HealthCheckResponse) MarshalJSON

func (resp *HealthCheckResponse) MarshalJSON() ([]byte, error)

func (*HealthCheckResponse) UnmarshalJSON

func (resp *HealthCheckResponse) UnmarshalJSON(data []byte) error

type HealthServiceStatus

type HealthServiceStatus int
const (
	HealthServiceStatusUnknown HealthServiceStatus = iota
	HealthServiceStatusServing
	HealthServiceStatusNotServing
	HealthServiceStatusServiceUnknown
)

func HealthServiceStatusFromName

func HealthServiceStatusFromName(name string) HealthServiceStatus

Jump to

Keyboard shortcuts

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