rest

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

func (ErrorResponse) StatusCode

func (e ErrorResponse) StatusCode() int

type TestRequest

type TestRequest struct {
	Name    string  `header:"Name-Var" description:"a name" required:"true"`
	Cost    float32 `query:"cost" required:"true"`
	NewPath string  `path:"path"`
	MayOmit string  `query:"mustHave" required:"false"`
	MayErr  bool    `query:"mayErr"`
	Cookie  string  `cookie:"testCookie"`
}

func (TestRequest) Info

type TestResponse

type TestResponse struct {
	Name      string  `json:"message"`
	Cost      float32 `json:"cost"`
	Path      string  `json:"path"`
	CookieVal string  `json:"cookieVal"`
	response.BasicResponse
	response.ExpandedLogging
}

type TestService

type TestService struct {
	gkBoot.BasicService
}

func (TestService) Execute

func (t TestService) Execute(ctx context.Context, request interface{}) (response interface{}, err error)

func (TestService) ExpectedResponses

func (t TestService) ExpectedResponses() service.MappedResponses

type UnregisteredResponse

type UnregisteredResponse struct {
	ImInvalid string `json:"invalid"`
}

Jump to

Keyboard shortcuts

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