swagger

package
v0.0.0-...-5045ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

Go API Server for swagger

No description

Overview

This server was generated by the [swagger-codegen] (https://github.com/swagger-api/swagger-codegen) project.
By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

  • API version: 1.0.0
  • Build date: 2019-04-06T12:16:20.765Z
Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSmallUser

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

func HeadersDelete

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

func HeadersGet

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

func Index

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

func LargeSizedGet

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

func LargeSizedLargeIdGet

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

func LargeSizedPost

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

func Logger

func Logger(inner http.Handler, name string) http.Handler

func MediumSizedGet

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

func MediumSizedMediumIdDelete

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

func MediumSizedPost

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

func Middleware

func Middleware(inner http.Handler, name string, roles []string) http.Handler

func NewRouter

func NewRouter() *mux.Router

func ResponseCodeCheckGet

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

func SlowGet

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

func SlowPost

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

func SmallGet

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

func SmallUserIDDelete

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

func SmallUserIDPost

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

func TimeoutGet

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

Types

type CustomClaims

type CustomClaims struct {
	Roles []string `json:"roles,omitempty"`
}

type LargeSizeGroup

type LargeSizeGroup struct {

	// for all the big things
	ManyLargeSizeItems []LargeSized `json:"manyLargeSizeItems,omitempty"`

	// there won't be one
	Reason string `json:"reason,omitempty"`
}

func CreateLargeSizeGroup

func CreateLargeSizeGroup() LargeSizeGroup

type LargeSized

type LargeSized struct {
	One float32 `json:"one,omitempty"`

	Two int32 `json:"two,omitempty"`

	Three bool `json:"three,omitempty"`

	Four *User `json:"four,omitempty"`

	Five string `json:"five,omitempty"`

	Six []User `json:"six,omitempty"`

	Seven *MediumSized `json:"seven,omitempty"`

	BiggerThan100 string `json:"biggerThan100,omitempty"`

	Nine string `json:"nine,omitempty"`

	Ten string `json:"ten,omitempty"`

	Eleven string `json:"eleven,omitempty"`

	Twelve string `json:"twelve,omitempty"`

	Thirteen string `json:"thirteen,omitempty"`

	Fourteen string `json:"fourteen,omitempty"`

	Fifteen string `json:"fifteen,omitempty"`

	Sixteen string `json:"sixteen,omitempty"`

	Seventeen string `json:"seventeen,omitempty"`

	Eighteen string `json:"eighteen,omitempty"`

	Nineteen string `json:"nineteen,omitempty"`

	Twenty string `json:"twenty,omitempty"`

	TwentyOne string `json:"twenty-one,omitempty"`

	TwentyTwo string `json:"twenty-two,omitempty"`

	TwentyThree string `json:"twenty-three,omitempty"`

	TwentyFour string `json:"twenty-four,omitempty"`

	TwentyFive string `json:"twenty-five,omitempty"`
}

for bigger items

func CreateLargeSize

func CreateLargeSize() LargeSized

type MediumSized

type MediumSized struct {
	Name string `json:"name"`

	Surname string `json:"surname"`

	Address string `json:"address,omitempty"`

	Location string `json:"location"`

	Country string `json:"country,omitempty"`

	Age float32 `json:"age,omitempty"`

	BirthDate time.Time `json:"birthDate,omitempty"`

	StartDate time.Time `json:"startDate,omitempty"`

	Type_ string `json:"Type,omitempty"`
}

An object designed to be medium sized

func CreateMedium

func CreateMedium() MediumSized

type Route

type Route struct {
	Name          string
	Method        string
	Pattern       string
	HandlerFunc   http.HandlerFunc
	RequiredRoles []string
}

type Routes

type Routes []Route

type User

type User struct {
	Name string `json:"name"`

	Surname string `json:"surname"`
}

func CreateUser

func CreateUser() User

func CreateUsers

func CreateUsers() []User

type Users

type Users struct {
	Users []User
}

Just a list of users

Jump to

Keyboard shortcuts

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