Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRoutes ¶
func GetRoutes(s IEchoService) []api2.Route
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Echo ¶
func (c *Client) Echo(ctx context.Context, req *EchoRequest) (res *EchoResponse, err error)
func (*Client) Hello ¶
func (c *Client) Hello(ctx context.Context, req *HelloRequest) (res *HelloResponse, err error)
type CustomType ¶
type CustomType struct {
Hell int
}
type EchoRepository ¶
type EchoRepository struct { }
func NewEchoRepository ¶
func NewEchoRepository() *EchoRepository
func (*EchoRepository) Generate ¶
func (s *EchoRepository) Generate() (*Result, error)
type EchoRequest ¶
type EchoResponse ¶
type EchoResponse struct {
Text string `json:"text"` // field comment.
}
EchoResponse.
type EchoService ¶
type EchoService struct {
// contains filtered or unexported fields
}
func NewEchoService ¶
func NewEchoService(repo *EchoRepository) *EchoService
func (*EchoService) Echo ¶
func (s *EchoService) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error)
func (*EchoService) Hello ¶
func (s *EchoService) Hello(ctx context.Context, req *HelloRequest) (*HelloResponse, error)
type HelloRequest ¶
type HelloRequest struct {
Key string `query:"key"`
}
type HelloResponse ¶
type HelloResponse struct {
Session string `header:"session"`
}
type IEchoService ¶
type IEchoService interface { Hello(ctx context.Context, req *HelloRequest) (*HelloResponse, error) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) }
Click to show internal directories.
Click to hide internal directories.