api

package
v0.0.0-...-b934907 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Code generated by openapi-generator-go DO NOT EDIT.

Source:

Title: Awesome GO API
Version: 1.0.0

Code generated by openapi-generator-go DO NOT EDIT.

Source:

Title: Awesome GO API
Version: 1.0.0

Code generated by openapi-generator-go DO NOT EDIT.

Source:

Title: Awesome GO API
Version: 1.0.0

Code generated by openapi-generator-go DO NOT EDIT.

Source:

Title: Awesome GO API
Version: 1.0.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(
	defaultHandlerHandler DefaultHandlerHandler,
) http.Handler

NewRouter creates a new router for the spec and the given handlers. Awesome GO API

Actual example use cases for a curated list of golang api generator libraries

1.0.0

Types

type DefaultHandlerHandler

type DefaultHandlerHandler interface {
	// GetError Responds with an error
	GetError(w http.ResponseWriter, r *http.Request)
	// Greeting Responds with a greeting
	Greeting(w http.ResponseWriter, r *http.Request)
	// PostReview Post a review to be saved
	PostReview(w http.ResponseWriter, r *http.Request)
}

DefaultHandlerHandler handles the operations of the 'DefaultHandler' handler group.

type Error

type Error struct {
	// Details: A human-readable explanation specific to this occurrence of the problem.
	Details string `json:"details,omitempty" mapstructure:"details,omitempty"`
	// Properties: Optional map of properties
	Properties map[string]interface{} `json:"properties,omitempty" mapstructure:"properties,omitempty"`
	// Title: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
	Title string `json:"title" mapstructure:"title"`
}

Error is an object. An API error

func (Error) GetDetails

func (m Error) GetDetails() string

GetDetails returns the Details property

func (Error) GetProperties

func (m Error) GetProperties() map[string]interface{}

GetProperties returns the Properties property

func (Error) GetTitle

func (m Error) GetTitle() string

GetTitle returns the Title property

func (*Error) SetDetails

func (m *Error) SetDetails(val string)

SetDetails sets the Details property

func (*Error) SetProperties

func (m *Error) SetProperties(val map[string]interface{})

SetProperties sets the Properties property

func (*Error) SetTitle

func (m *Error) SetTitle(val string)

SetTitle sets the Title property

func (Error) Validate

func (m Error) Validate() error

Validate implements basic validation for this model

type GetGreetingOutputBody

type GetGreetingOutputBody struct {
	// Message: Greeting message
	Message string `json:"message" mapstructure:"message"`
}

GetGreetingOutputBody is an object.

func (GetGreetingOutputBody) GetMessage

func (m GetGreetingOutputBody) GetMessage() string

GetMessage returns the Message property

func (*GetGreetingOutputBody) SetMessage

func (m *GetGreetingOutputBody) SetMessage(val string)

SetMessage sets the Message property

func (GetGreetingOutputBody) Validate

func (m GetGreetingOutputBody) Validate() error

Validate implements basic validation for this model

type GreetingQueryParameters

type GreetingQueryParameters struct {
	// Name: Name to greet
	Name string `json:"name" mapstructure:"name"`
}

GreetingQueryParameters is an object.

func (GreetingQueryParameters) GetName

func (m GreetingQueryParameters) GetName() string

GetName returns the Name property

func (*GreetingQueryParameters) SetName

func (m *GreetingQueryParameters) SetName(val string)

SetName sets the Name property

func (GreetingQueryParameters) Validate

func (m GreetingQueryParameters) Validate() error

Validate implements basic validation for this model

type PostReviewInputBody

type PostReviewInputBody struct {
	// Author: Author of the review
	Author string `json:"author" mapstructure:"author"`
	// Message: Review message
	Message string `json:"message,omitempty" mapstructure:"message,omitempty"`
	// Rating: Rating from 1 to 5
	Rating int64 `json:"rating" mapstructure:"rating"`
}

PostReviewInputBody is an object.

func (PostReviewInputBody) GetAuthor

func (m PostReviewInputBody) GetAuthor() string

GetAuthor returns the Author property

func (PostReviewInputBody) GetMessage

func (m PostReviewInputBody) GetMessage() string

GetMessage returns the Message property

func (PostReviewInputBody) GetRating

func (m PostReviewInputBody) GetRating() int64

GetRating returns the Rating property

func (*PostReviewInputBody) SetAuthor

func (m *PostReviewInputBody) SetAuthor(val string)

SetAuthor sets the Author property

func (*PostReviewInputBody) SetMessage

func (m *PostReviewInputBody) SetMessage(val string)

SetMessage sets the Message property

func (*PostReviewInputBody) SetRating

func (m *PostReviewInputBody) SetRating(val int64)

SetRating sets the Rating property

func (PostReviewInputBody) Validate

func (m PostReviewInputBody) Validate() error

Validate implements basic validation for this model

Jump to

Keyboard shortcuts

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