Documentation ¶
Index ¶
- func BytesBytesRoutes(srv BytesBytes, opts ...gors.Option) []gors.Route
- func BytesReaderRoutes(srv BytesReader, opts ...gors.Option) []gors.Route
- func BytesStringRoutes(srv BytesString, opts ...gors.Option) []gors.Route
- func CustomBinderRenderRoutes(srv CustomBinderRender, opts ...gors.Option) []gors.Route
- func NotDefineRoutes(srv NotDefine, opts ...gors.Option) []gors.Route
- func ObjObjRoutes(srv ObjObj, opts ...gors.Option) []gors.Route
- func ReaderBytesRoutes(srv ReaderBytes, opts ...gors.Option) []gors.Route
- func ReaderReaderRoutes(srv ReaderReader, opts ...gors.Option) []gors.Route
- func ReaderStringRoutes(srv ReaderString, opts ...gors.Option) []gors.Route
- func ServiceRoutes(srv Service, opts ...gors.Option) []gors.Route
- func StringBytesRoutes(srv StringBytes, opts ...gors.Option) []gors.Route
- func StringReaderRoutes(srv StringReader, opts ...gors.Option) []gors.Route
- func StringStringRoutes(srv StringString, opts ...gors.Option) []gors.Route
- type AllRequestReq
- type AllRequestResp
- type AsciiJSONRenderResp
- type BytesBytes
- type BytesReader
- type BytesString
- type CustomBinderRender
- type CustomReq
- type CustomResp
- type FormBindingReq
- type FormBindingResp
- type FormMultipartBindingReq
- type FormPostBindingReq
- type HeaderBindingReq
- type IndentedJSONRenderResp
- type JSONBindingReq
- type JSONRenderResp
- type JsonpJSONRenderResp
- type MethodReq
- type MethodResp
- type MsgPackBindingReq
- type MsgPackRenderResp
- type NotDefine
- type NotDefineReq
- type NotDefineResp
- type ObjObj
- type Page
- type PureJSONRenderResp
- type QueryBindingReq
- type ReaderBytes
- type ReaderReader
- type ReaderString
- type SecureJSONRenderResp
- type Service
- type StringBytes
- type StringReader
- type StringString
- type TOMLBindingReq
- type TOMLRenderResp
- type TimeRage
- type UriBindingReq
- type XMLBindingReq
- type XMLRenderResp
- type YAMLBindingReq
- type YAMLRenderResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesBytesRoutes ¶
func BytesBytesRoutes(srv BytesBytes, opts ...gors.Option) []gors.Route
func BytesReaderRoutes ¶
func BytesReaderRoutes(srv BytesReader, opts ...gors.Option) []gors.Route
func BytesStringRoutes ¶
func BytesStringRoutes(srv BytesString, opts ...gors.Option) []gors.Route
func CustomBinderRenderRoutes ¶ added in v1.2.0
func CustomBinderRenderRoutes(srv CustomBinderRender, opts ...gors.Option) []gors.Route
func NotDefineRoutes ¶ added in v1.3.2
func ReaderBytesRoutes ¶
func ReaderBytesRoutes(srv ReaderBytes, opts ...gors.Option) []gors.Route
func ReaderReaderRoutes ¶
func ReaderReaderRoutes(srv ReaderReader, opts ...gors.Option) []gors.Route
func ReaderStringRoutes ¶
func ReaderStringRoutes(srv ReaderString, opts ...gors.Option) []gors.Route
func StringBytesRoutes ¶
func StringBytesRoutes(srv StringBytes, opts ...gors.Option) []gors.Route
func StringReaderRoutes ¶
func StringReaderRoutes(srv StringReader, opts ...gors.Option) []gors.Route
func StringStringRoutes ¶
func StringStringRoutes(srv StringString, opts ...gors.Option) []gors.Route
Types ¶
type AllRequestReq ¶ added in v1.5.0
type AllRequestReq struct { // I comment 1 // comment 2 I int `uri:"i"` // comment 3 // comment 2 I8 int8 `form:"i8"` // comment 3 I16 int16 `header:"i16"` I32 int32 I64 int64 U uint U8 uint8 U16 uint16 U32 uint32 U64 uint64 F32 float32 F64 float64 B bool S string Bs []byte `json:"bs"` A [10]int T time.Time UriBindingReq UriBindingReq UriBindingReqPtr *UriBindingReq ProtoBufReq pb.ProtoBufReq ProtoBufReqPtr *pb.ProtoBufReq UriBindingReqs []UriBindingReq UriBindingReqPtrs []*UriBindingReq ProtoBufReqs []pb.ProtoBufReq ProtoBufReqPtrs []*pb.ProtoBufReq Page *TimeRage sql.NullByte *sql.NullInt32 Avatar *multipart.FileHeader `form:"avatar"` // contains filtered or unexported fields }
type AllRequestResp ¶ added in v1.5.0
type AllRequestResp struct { }
type AsciiJSONRenderResp ¶
type BytesBytes ¶
type BytesBytes interface { // GetBytesBytes get http method, receive bytes request and send bytes response // @GORS @GET @Path(/Get) @BytesRender(ttt.sss) GetBytesBytes(context.Context, []byte) ([]byte, error) // PostBytesBytes post http method, receive bytes request and send bytes response // @GORS @POST @Path(/Post) @BytesBinding @BytesRender(text/go) PostBytesBytes(context.Context, []byte) ([]byte, error) }
BytesBytes this is bytes binding and bytes render demo this is a interface @GORS @Path(/api/BytesBytes)
type BytesReader ¶
type BytesReader interface { // GetBytesReader // @GORS @GET @Path(/Get) @ReaderRender(video/mpeg4) GetBytesReader(context.Context, []byte) (tmpio.Reader, error) // PatchBytesReader // @GORS @PATCH @Path(/Patch) @BytesBinding @ReaderRender(video/mpeg4) PatchBytesReader(context.Context, []byte) (tmpio.Reader, error) }
BytesReader @GORS @Path(/api/BytesReader)
type BytesString ¶
type BytesString interface { // GetBytesString // @GORS @GET @Path(/Get) @BytesBinding @HTMLRender GetBytesString(context.Context, []byte) (string, error) // PutBytesString // @GORS @PUT @Path(/Put) @RedirectRender PutBytesString(context.Context, []byte) (string, error) }
BytesString @GORS @Path(/api/BytesString)
type CustomBinderRender ¶ added in v1.2.0
type CustomBinderRender interface { // Custom // @GORS @POST @Path(/Custom) @CustomBinding(application/custom) @CustomRender(application/custom) Custom(ctx context.Context, req *CustomReq) (*CustomResp, error) }
CustomBinderRender @GORS @Path(/api/CustomBinderRender)
type CustomResp ¶ added in v1.2.0
type CustomResp struct { }
func (*CustomResp) Render ¶ added in v1.2.0
func (resp *CustomResp) Render(c *gin.Context)
type FormBindingReq ¶
type FormBindingResp ¶
type FormBindingResp struct {
V int64
}
type FormMultipartBindingReq ¶
type FormPostBindingReq ¶
type HeaderBindingReq ¶
type IndentedJSONRenderResp ¶
type JSONBindingReq ¶
type JSONRenderResp ¶
type JsonpJSONRenderResp ¶
type MethodResp ¶
type MethodResp struct {
V int `json:"v,omitempty"`
}
type MsgPackBindingReq ¶
type MsgPackRenderResp ¶
type NotDefineReq ¶ added in v1.3.2
type NotDefineReq struct {
ID int `uri:"id"`
}
type NotDefineResp ¶ added in v1.3.2
type NotDefineResp struct {
V int `json:"v,omitempty"`
}
type ObjObj ¶ added in v1.3.0
type ObjObj interface { // AllRequest is http api // @GORS @GET @Path(/all/:id/user/:user) @UriBinding @UriBinding @QueryBinding @HeaderBinding @JSONBinding @JSONRender AllRequest(context.Context, *AllRequestReq) (*AllRequestResp, error) // UriBindingIndentedJSONRender // @GORS @GET @Path(/UriBindingIndentedJSONRender/:id) @UriBinding @IndentedJSONRender UriBindingIndentedJSONRender(context.Context, *UriBindingReq) (*IndentedJSONRenderResp, error) // QueryBindingSecureJSONRender // @GORS @GET @Path(/QueryBindingSecureJSONRender/:id) @UriBinding @QueryBinding @SecureJSONRender QueryBindingSecureJSONRender(context.Context, *QueryBindingReq) (*SecureJSONRenderResp, error) // HeaderBindingJsonpJSONRender // @GORS @GET @Path(/HeaderBindingJsonpJSONRender/:id) @UriBinding @QueryBinding @HeaderBinding @JSONPJSONRender HeaderBindingJsonpJSONRender(context.Context, *HeaderBindingReq) (*JsonpJSONRenderResp, error) // JSONBindingJSONRender // @GORS @POST @Path(/JSONBindingJSONRender/:id) @UriBinding @QueryBinding @HeaderBinding @JSONBinding @JSONRender JSONBindingJSONRender(context.Context, *JSONBindingReq) (*JSONRenderResp, error) // XMLBindingXMLRender // @GORS @PATCH @Path(/XMLBindingXMLRender/:id) @UriBinding @QueryBinding @HeaderBinding @XMLBinding @XMLRender XMLBindingXMLRender(context.Context, *XMLBindingReq) (*XMLRenderResp, error) // FormBindingJSONRender // @GORS @POST @Path(/FormBindingJSONRender/:id) @UriBinding @HeaderBinding @FormBinding @JSONRender FormBindingJSONRender(context.Context, *FormBindingReq) (*JSONRenderResp, error) // FormPostBindingPureJSONRender // @GORS @POST @Path(/FormPostBindingPureJSONRender/:id) @UriBinding @QueryBinding @HeaderBinding @FormPostBinding @PureJSONRender FormPostBindingPureJSONRender(context.Context, *FormPostBindingReq) (*PureJSONRenderResp, error) // FormMultipartBindingAsciiJSONRender // @GORS @POST @Path(/FormMultipartBindingAsciiJSONRender/:id) @FormMultipartBinding @UriBinding @QueryBinding @HeaderBinding @AsciiJSONRender FormMultipartBindingAsciiJSONRender(context.Context, *FormMultipartBindingReq) (*AsciiJSONRenderResp, error) // ProtoBufBindingProtoBufRender // @GORS @PUT @Path(/ProtoBufBindingProtoBufRender) @ProtoBufBinding @ProtoBufRender ProtoBufBindingProtoBufRender(context.Context, *pb.ProtoBufReq) (*pb.ProtoBufResp, error) // MsgPackBindingMsgPackRender // @GORS @DELETE @Path(/MsgPackBindingMsgPackRender) @MsgPackBinding @MsgPackRender MsgPackBindingMsgPackRender(context.Context, *MsgPackBindingReq) (*MsgPackRenderResp, error) // YAMLBindingYAMLRender // @GORS @DELETE @Path(/YAMLBindingYAMLRender/:id) @UriBinding @QueryBinding @HeaderBinding @YAMLBinding @YAMLRender YAMLBindingYAMLRender(context.Context, *YAMLBindingReq) (*YAMLRenderResp, error) // TOMLBindingTOMLRender // @GORS @PUT @Path(/TOMLBindingTOMLRender/:id) @UriBinding @QueryBinding @HeaderBinding @TOMLBinding @TOMLRender TOMLBindingTOMLRender(context.Context, *TOMLBindingReq) (*TOMLRenderResp, error) // ProtoJSONBindingProtoJSONRender // @GORS @PUT @Path(/ProtoJSONBindingProtoJSONRender) @ProtoJSONBinding @ProtoJSONRender ProtoJSONBindingProtoJSONRender(context.Context, *pb.ProtoBufReq) (*pb.ProtoBufResp, error) }
ObjObj @GORS @Path(/api/ObjObj)
type PureJSONRenderResp ¶
type QueryBindingReq ¶
type ReaderBytes ¶
type ReaderBytes interface { // GetReaderBytes // @GORS @GET @Path(/Get) @ReaderBinding @BytesRender GetReaderBytes(context.Context, tmpio.Reader) ([]byte, error) // PostReaderBytes // @GORS @POST @Path(/Post) @BytesRender(text/go) PostReaderBytes(context.Context, tmpio.Reader) ([]byte, error) }
ReaderBytes @GORS @Path(/api/ReaderBytes)
type ReaderReader ¶
type ReaderReader interface { // GetReaderReader // @GORS @GET @Path(/Get) @ReaderRender GetReaderReader(context.Context, io.Reader) (io.Reader, error) // HeadReaderReader // @GORS @HEAD @Path(/head) @ReaderBinding @ReaderRender(video/mp4) HeadReaderReader(context.Context, io.Reader) (io.Reader, error) // GetJSONReader // @GORS @Get @Path(/get/json) @JSONBinding @ReaderRender(video/mp4) GetJSONReader(context.Context, *gors.Empty) (io.Reader, error) }
ReaderReader @GORS @Path(/api/ReaderReader)
type ReaderString ¶
type ReaderString interface { // GetReaderString // @GORS @GET @Path(/Get) @TextRender GetReaderString(context.Context, io.Reader) (string, error) // PostReaderString // @GORS @POST @Path(/Post) @StringRender(text/go) PostReaderString(context.Context, io.Reader) (string, error) }
ReaderString @GORS @Path(/api/ReaderString)
type SecureJSONRenderResp ¶
type Service ¶
type Service interface { // Method // @GORS @GET @Path(/method/:id) @UriBinding @JSONRender Method(context.Context, *MethodReq) (*MethodResp, error) }
Service @GORS @Path(/api) @Path(/v1)
type StringBytes ¶
type StringBytes interface { // GetStringBytes // @GORS @GET @Path(/Get) @BytesRender GetStringBytes(context.Context, string) ([]byte, error) // OptionsStringBytes // @GORS @OPTIONS @Path(/Options) @BytesRender OptionsStringBytes(context.Context, string) ([]byte, error) }
StringBytes @GORS @Path(/api/StringBytes)
type StringReader ¶
type StringReader interface { // GetStringRender // @GORS @GET @Path(/Get) @ReaderRender(video/mpeg4) GetStringRender(context.Context, string) (tmpio.Reader, error) // OptionsStringReader // @GORS @OPTIONS @Path(/Options) @ReaderRender(video/mpeg4) OptionsStringReader(context.Context, string) (tmpio.Reader, error) }
StringReader @GORS @Path(/api/StringReader)
type StringString ¶
type StringString interface { // GetStringString // @GORS @GET @Path(/Get) @StringRender(text/go) GetStringString(context.Context, string) (string, error) // PatchStringString // @GORS @PATCH @Path(/Patch) @StringRender(application/java) @StringRender(application/go) PatchStringString(context.Context, string) (string, error) }
StringString @GORS @Path(/api/StringString)
type TOMLBindingReq ¶
type TOMLRenderResp ¶
type UriBindingReq ¶
type UriBindingReq struct {
ID int64 `uri:"id"`
}
type XMLBindingReq ¶
type XMLRenderResp ¶
type YAMLBindingReq ¶
Source Files ¶
- ObjObj.go
- bytesbytes.go
- bytesbytes_gors.go
- bytesreader.go
- bytesreader_gors.go
- bytesstring.go
- bytesstring_gors.go
- custom.go
- custombinderrender_gors.go
- not_define.go
- notdefine_gors.go
- objobj_gors.go
- readerbytes.go
- readerbytes_gors.go
- readerreader.go
- readerreader_gors.go
- readerstring.go
- readerstring_gors.go
- service.go
- service_gors.go
- stringbytes.go
- stringbytes_gors.go
- stringreader.go
- stringreader_gors.go
- stringstring.go
- stringstring_gors.go
Click to show internal directories.
Click to hide internal directories.