Openapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package Openapi provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(router interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

Types

type CreateUserJSONBody

type CreateUserJSONBody User

CreateUserJSONBody defines parameters for CreateUser.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody CreateUserJSONBody

CreateUserRequestBody defines body for CreateUser for application/json ContentType.

type Error

type Error struct {
	Field  *string `json:"field,omitempty"`
	Reason *string `json:"reason,omitempty"`
}

Error defines model for Error.

type ErrorResponse

type ErrorResponse Errors

ErrorResponse defines model for ErrorResponse.

type Errors

type Errors struct {
	Errors *[]Error `json:"errors,omitempty"`
}

Errors defines model for Errors.

type GetUsersParams

type GetUsersParams struct {

	// The numbers of items to return.
	Limit *Limit `json:"limit,omitempty"`

	// The number of items to skip before starting to collect the result set.
	Offset *Offset `json:"offset,omitempty"`
}

GetUsersParams defines parameters for GetUsers.

type Healthcheck

type Healthcheck struct {
	Version string `json:"version"`
}

Healthcheck defines model for Healthcheck.

type Healthcheck200

type Healthcheck200 Healthcheck

Healthcheck200 defines model for Healthcheck200.

type Id

type Id string

Id defines model for id.

type Limit

type Limit int

Limit defines model for limit.

type Offset

type Offset int

Offset defines model for offset.

type PostAuthEmailChangeConfirmJSONBody

type PostAuthEmailChangeConfirmJSONBody struct {
	Email string `json:"email"`
	Key   string `json:"key"`
}

PostAuthEmailChangeConfirmJSONBody defines parameters for PostAuthEmailChangeConfirm.

type PostAuthEmailChangeConfirmJSONRequestBody

type PostAuthEmailChangeConfirmJSONRequestBody PostAuthEmailChangeConfirmJSONBody

PostAuthEmailChangeConfirmRequestBody defines body for PostAuthEmailChangeConfirm for application/json ContentType.

type PostAuthEmailChangeConfirmParams

type PostAuthEmailChangeConfirmParams struct {
	ContentType   string `json:"Content-Type"`
	Authorization string `json:"Authorization"`
}

PostAuthEmailChangeConfirmParams defines parameters for PostAuthEmailChangeConfirm.

type PostAuthEmailChangeParams

type PostAuthEmailChangeParams struct {
	ContentType   string `json:"Content-Type"`
	Authorization string `json:"Authorization"`
}

PostAuthEmailChangeParams defines parameters for PostAuthEmailChange.

type PostAuthLoginJSONBody

type PostAuthLoginJSONBody struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

PostAuthLoginJSONBody defines parameters for PostAuthLogin.

type PostAuthLoginJSONRequestBody

type PostAuthLoginJSONRequestBody PostAuthLoginJSONBody

PostAuthLoginRequestBody defines body for PostAuthLogin for application/json ContentType.

type PostAuthLoginParams

type PostAuthLoginParams struct {
	ContentType string `json:"Content-Type"`
}

PostAuthLoginParams defines parameters for PostAuthLogin.

type PostAuthPasswordResetConfirmJSONBody

type PostAuthPasswordResetConfirmJSONBody struct {
	Key      string `json:"key"`
	Password string `json:"password"`
}

PostAuthPasswordResetConfirmJSONBody defines parameters for PostAuthPasswordResetConfirm.

type PostAuthPasswordResetConfirmJSONRequestBody

type PostAuthPasswordResetConfirmJSONRequestBody PostAuthPasswordResetConfirmJSONBody

PostAuthPasswordResetConfirmRequestBody defines body for PostAuthPasswordResetConfirm for application/json ContentType.

type PostAuthPasswordResetConfirmParams

type PostAuthPasswordResetConfirmParams struct {
	ContentType   string `json:"Content-Type"`
	Authorization string `json:"Authorization"`
}

PostAuthPasswordResetConfirmParams defines parameters for PostAuthPasswordResetConfirm.

type PostAuthPasswordResetJSONBody

type PostAuthPasswordResetJSONBody struct {
	Email string `json:"email"`
}

PostAuthPasswordResetJSONBody defines parameters for PostAuthPasswordReset.

type PostAuthPasswordResetJSONRequestBody

type PostAuthPasswordResetJSONRequestBody PostAuthPasswordResetJSONBody

PostAuthPasswordResetRequestBody defines body for PostAuthPasswordReset for application/json ContentType.

type PostAuthPasswordResetParams

type PostAuthPasswordResetParams struct {
	ContentType   string `json:"Content-Type"`
	Authorization string `json:"Authorization"`
}

PostAuthPasswordResetParams defines parameters for PostAuthPasswordReset.

type PostAuthRegisterJSONBody

type PostAuthRegisterJSONBody User

PostAuthRegisterJSONBody defines parameters for PostAuthRegister.

type PostAuthRegisterJSONRequestBody

type PostAuthRegisterJSONRequestBody PostAuthRegisterJSONBody

PostAuthRegisterRequestBody defines body for PostAuthRegister for application/json ContentType.

type PostAuthResendVerificationEmailParams

type PostAuthResendVerificationEmailParams struct {
	ContentType   string `json:"Content-Type"`
	Authorization string `json:"Authorization"`
}

PostAuthResendVerificationEmailParams defines parameters for PostAuthResendVerificationEmail.

type PostAuthUserConfirmJSONBody

type PostAuthUserConfirmJSONBody struct {
	Key string `json:"key"`
}

PostAuthUserConfirmJSONBody defines parameters for PostAuthUserConfirm.

type PostAuthUserConfirmJSONRequestBody

type PostAuthUserConfirmJSONRequestBody PostAuthUserConfirmJSONBody

PostAuthUserConfirmRequestBody defines body for PostAuthUserConfirm for application/json ContentType.

type PostAuthUserConfirmParams

type PostAuthUserConfirmParams struct {
	ContentType string `json:"Content-Type"`
}

PostAuthUserConfirmParams defines parameters for PostAuthUserConfirm.

type ServerInterface

type ServerInterface interface {
	// Initiate user email address change.// (POST /auth/email-change)
	PostAuthEmailChange(ctx echo.Context, params PostAuthEmailChangeParams) error
	// Confirm user email address change.// (POST /auth/email-change-confirm)
	PostAuthEmailChangeConfirm(ctx echo.Context, params PostAuthEmailChangeConfirmParams) error
	// Login and retrieve an user token.// (POST /auth/login)
	PostAuthLogin(ctx echo.Context, params PostAuthLoginParams) error
	// Initiate user password reset.// (POST /auth/password-reset)
	PostAuthPasswordReset(ctx echo.Context, params PostAuthPasswordResetParams) error
	// Confirm user password reset.// (POST /auth/password-reset-confirm)
	PostAuthPasswordResetConfirm(ctx echo.Context, params PostAuthPasswordResetConfirmParams) error
	// Creates a new user account.// (POST /auth/register)
	PostAuthRegister(ctx echo.Context) error
	// Resend verification email to currently logged in user.// (POST /auth/resend-verification-email)
	PostAuthResendVerificationEmail(ctx echo.Context, params PostAuthResendVerificationEmailParams) error
	// Activate user account.// (POST /auth/user-confirm)
	PostAuthUserConfirm(ctx echo.Context, params PostAuthUserConfirmParams) error
	// Health Check// (GET /healthcheck)
	HealthCheck(ctx echo.Context) error
	// Get users// (GET /users)
	GetUsers(ctx echo.Context, params GetUsersParams) error
	// Adds a new User// (POST /users)
	CreateUser(ctx echo.Context) error
	// Single user// (GET /users/{id})
	GetUser(ctx echo.Context, id Id) error
	// Update a user information// (PUT /users/{id})
	UpdateUser(ctx echo.Context, id Id) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateUser

func (w *ServerInterfaceWrapper) CreateUser(ctx echo.Context) error

CreateUser converts echo context to params.

func (*ServerInterfaceWrapper) GetUser

func (w *ServerInterfaceWrapper) GetUser(ctx echo.Context) error

GetUser converts echo context to params.

func (*ServerInterfaceWrapper) GetUsers

func (w *ServerInterfaceWrapper) GetUsers(ctx echo.Context) error

GetUsers converts echo context to params.

func (*ServerInterfaceWrapper) HealthCheck

func (w *ServerInterfaceWrapper) HealthCheck(ctx echo.Context) error

HealthCheck converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthEmailChange

func (w *ServerInterfaceWrapper) PostAuthEmailChange(ctx echo.Context) error

PostAuthEmailChange converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthEmailChangeConfirm

func (w *ServerInterfaceWrapper) PostAuthEmailChangeConfirm(ctx echo.Context) error

PostAuthEmailChangeConfirm converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthLogin

func (w *ServerInterfaceWrapper) PostAuthLogin(ctx echo.Context) error

PostAuthLogin converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthPasswordReset

func (w *ServerInterfaceWrapper) PostAuthPasswordReset(ctx echo.Context) error

PostAuthPasswordReset converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthPasswordResetConfirm

func (w *ServerInterfaceWrapper) PostAuthPasswordResetConfirm(ctx echo.Context) error

PostAuthPasswordResetConfirm converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthRegister

func (w *ServerInterfaceWrapper) PostAuthRegister(ctx echo.Context) error

PostAuthRegister converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthResendVerificationEmail

func (w *ServerInterfaceWrapper) PostAuthResendVerificationEmail(ctx echo.Context) error

PostAuthResendVerificationEmail converts echo context to params.

func (*ServerInterfaceWrapper) PostAuthUserConfirm

func (w *ServerInterfaceWrapper) PostAuthUserConfirm(ctx echo.Context) error

PostAuthUserConfirm converts echo context to params.

func (*ServerInterfaceWrapper) UpdateUser

func (w *ServerInterfaceWrapper) UpdateUser(ctx echo.Context) error

UpdateUser converts echo context to params.

type Slice

type Slice struct {
	Count  int  `json:"count"`
	Offset *int `json:"offset,omitempty"`
}

Slice defines model for Slice.

type UnauthorizedError

type UnauthorizedError Errors

UnauthorizedError defines model for UnauthorizedError.

type UpdateUserJSONBody

type UpdateUserJSONBody User

UpdateUserJSONBody defines parameters for UpdateUser.

type UpdateUserJSONRequestBody

type UpdateUserJSONRequestBody UpdateUserJSONBody

UpdateUserRequestBody defines body for UpdateUser for application/json ContentType.

type User

type User struct {
	Birthday  *openapi_types.Date `json:"birthday,omitempty"`
	Email     string              `json:"email"`
	FirstName string              `json:"firstName"`
	Id        *string             `json:"id,omitempty"`
	LastName  *string             `json:"lastName,omitempty"`
}

User defines model for User.

type User200

type User200 User

User200 defines model for User200.

type Users200

type Users200 struct {
	// Embedded struct due to allOf(#/components/schemas/Slice)
	Slice
	// Embedded fields due to inline allOf schema
	Data *[]User `json:"data,omitempty"`
}

Users200 defines model for Users200.

Jump to

Keyboard shortcuts

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