handler

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

@Summary delete test @Description delete test @Accept json @Produce json @Param header-1 header string true "header-1 description" default(value-1) @Param id path string true "id" default(id_1) @Success 204 @Failure default {object} ResponseFailure @Router /v1/test/{id} [delete] @tags test

func Get

func Get(w http.ResponseWriter, r *http.Request)

@Summary get test @Description get test @Accept json @Produce json @Param header-1 header string true "header-1 description" default(value-1) @Param param_1 query string true "param-1 description" Enums(1, 2, 3) @Param param_2 query string true "param-2 description" Enums(A, B, C, D) default(A) @Param param_3 query string true "param-3 description" default(AAA) @Param id path string true "id" default(id_1) @Success 200 {object} Test @Failure default {object} ResponseFailure @Router /v1/test/{id} [get] @tags test

func Post

func Post(w http.ResponseWriter, r *http.Request)

@Summary post test @Description post test @Accept json @Produce json @Param request body Test true "country selection" @Success 200 {object} ResponseSuccess @Failure default {object} ResponseFailure @Router /v1/test [post] @tags test

Types

type ResponseFailure

type ResponseFailure struct {
	Cause string `json:"cause"`
}

type ResponseSuccess

type ResponseSuccess struct {
	Field1 string `json:"field-1"`
}

type Test

type Test struct {
	ID     string `json:"id" example:"id-1"`
	Field1 int    `json:"field-1" example:"1"`
	Field2 string `json:"field-2" example:"value-2"`
}

Jump to

Keyboard shortcuts

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