swagger

package
v3.0.49+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

Go API Server for swagger

This is a sample Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger.

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
Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Overview

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Swagger Petstore * * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). * * API version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPet

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

func CreateUser

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

func CreateUsersWithArrayInput

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

func CreateUsersWithListInput

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

func DeleteOrder

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

func DeletePet

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

func DeleteUser

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

func DoCategoryStuff

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

func FindPetsByStatus

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

func FindPetsByTags

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

func GetAllPets

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

func GetInventory

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

func GetOrderById

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

func GetPetById

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

func GetRandomPet

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

func GetUserByName

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

func Index

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

func Logger

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

func LoginUser

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

func LogoutUser

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

func NewRouter

func NewRouter() *mux.Router

func PlaceOrder

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

func TestMethod

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

func UpdatePet

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

func UpdatePetWithForm

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

func UploadFile

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

func UserUsernamePut

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

Types

type AllOfSubCategoryCategory

type AllOfSubCategoryCategory struct {
	Id int64 `json:"id,omitempty"`

	Name string `json:"name,omitempty"`

	Foo bool `json:"foo,omitempty"`

	Bar int32 `json:"bar,omitempty"`

	Beer string `json:"beer,omitempty"`

	Drunk *User `json:"drunk,omitempty"`
}

type AllOfSubCategoryPetsItems

type AllOfSubCategoryPetsItems struct {
	Id int64 `json:"id,omitempty"`

	Category *Category `json:"category,omitempty"`

	Name string `json:"name"`

	PhotoUrls []string `json:"photoUrls"`

	Tags []Tag `json:"tags,omitempty"`
	// pet status in the store
	Status string `json:"status,omitempty"`
}

type ApiResponse

type ApiResponse struct {
	Code int32 `json:"code,omitempty"`

	Type_ string `json:"type,omitempty"`

	Message string `json:"message,omitempty"`
}

type Body

type Body struct {
	// Updated name of the pet
	Name string `json:"name,omitempty"`
	// Updated status of the pet
	Status string `json:"status,omitempty"`
}

type Cat

type Cat struct {
	Id int64 `json:"id,omitempty"`

	Category *Category `json:"category,omitempty"`

	Name string `json:"name"`

	PhotoUrls []string `json:"photoUrls"`

	Tags []Tag `json:"tags,omitempty"`
	// pet status in the store
	Status string `json:"status,omitempty"`

	Hunts bool `json:"hunts,omitempty"`

	Age int32 `json:"age,omitempty"`
}

type Category

type Category struct {
	Id int64 `json:"id,omitempty"`

	Name string `json:"name,omitempty"`
}

type Dog

type Dog struct {
	Id int64 `json:"id,omitempty"`

	Category *Category `json:"category,omitempty"`

	Name string `json:"name"`

	PhotoUrls []string `json:"photoUrls"`

	Tags []Tag `json:"tags,omitempty"`
	// pet status in the store
	Status string `json:"status,omitempty"`

	Bark bool `json:"bark,omitempty"`

	Breed string `json:"breed,omitempty"`
}

type NullableEnumModel

type NullableEnumModel struct {
	EnumProp string `json:"enumProp,omitempty"`
}

type OneOfAllPetsResponseItems

type OneOfAllPetsResponseItems struct {
	Dog
	Cat
}

type OneOfSinglePetResponsePet

type OneOfSinglePetResponsePet struct {
	Dog
	Cat
}

type Order

type Order struct {
	Id int64 `json:"id,omitempty"`

	PetId int64 `json:"petId,omitempty"`

	Quantity int32 `json:"quantity,omitempty"`

	ShipDate time.Time `json:"shipDate,omitempty"`
	// Order Status
	Status string `json:"status,omitempty"`

	Complete bool `json:"complete,omitempty"`
}

type Pet

type Pet struct {
	Id int64 `json:"id,omitempty"`

	Category *Category `json:"category,omitempty"`

	Name string `json:"name"`

	PhotoUrls []string `json:"photoUrls"`

	Tags []Tag `json:"tags,omitempty"`
	// pet status in the store
	Status string `json:"status,omitempty"`
}

type Route

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

type Routes

type Routes []Route

type SinglePetResponse

type SinglePetResponse struct {
	Pet *OneOfSinglePetResponsePet `json:"pet,omitempty"`
}

type SubCategory

type SubCategory struct {
	Category *AllOfSubCategoryCategory `json:"category,omitempty"`

	Category2 *Category `json:"category2,omitempty"`

	Pets []AllOfSubCategoryPetsItems `json:"pets,omitempty"`
}

type Tag

type Tag struct {
	Id int64 `json:"id,omitempty"`

	Name string `json:"name,omitempty"`
}

type User

type User struct {
	Id int64 `json:"id,omitempty"`

	Username string `json:"username,omitempty"`

	FirstName string `json:"firstName,omitempty"`

	LastName string `json:"lastName,omitempty"`

	Email string `json:"email,omitempty"`

	Password string `json:"password,omitempty"`

	Phone string `json:"phone,omitempty"`
	// User Status
	UserStatus int32 `json:"userStatus,omitempty"`
}

Jump to

Keyboard shortcuts

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