v1

package
v0.0.0-...-8597337 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

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

Package v1 provides primitives to interact with the openapi HTTP API.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewHandler

func NewHandler(
	app *app.Application,
	log service.Logger,
	middlewares ...rest.Middleware,
) http.Handler

Types

type AddProgramsJSONRequestBody

type AddProgramsJSONRequestBody = CreateProgramRequest

AddProgramsJSONRequestBody defines body for AddPrograms for application/json ContentType.

type AddSpecialtiesJSONRequestBody

type AddSpecialtiesJSONRequestBody = CreateSpecialtyRequest

AddSpecialtiesJSONRequestBody defines body for AddSpecialties for application/json ContentType.

type AddUgsnJSONRequestBody

type AddUgsnJSONRequestBody = CreateUgsnRequest

AddUgsnJSONRequestBody defines body for AddUgsn for application/json ContentType.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CompetencyResponse

type CompetencyResponse struct {
	Category    string              `json:"category"`
	Code        string              `json:"code"`
	Id          openapi_types.UUID  `json:"id"`
	LevelId     *openapi_types.UUID `json:"levelId,omitempty"`
	ProgramId   *openapi_types.UUID `json:"programId,omitempty"`
	SpecialtyId *openapi_types.UUID `json:"specialtyId,omitempty"`
	Title       string              `json:"title"`
	Type        CompetencyType      `json:"type"`
	UgsnId      *openapi_types.UUID `json:"ugsnId,omitempty"`
}

CompetencyResponse defines model for CompetencyResponse.

type CompetencyType

type CompetencyType string

CompetencyType defines model for CompetencyType.

const (
	GENERAL      CompetencyType = "GENERAL"
	PROFESSIONAL CompetencyType = "PROFESSIONAL"
	UNIVERSAL    CompetencyType = "UNIVERSAL"
)

Defines values for CompetencyType.

type CreateCompetencyJSONRequestBody

type CreateCompetencyJSONRequestBody = CreateCompetencyRequest

CreateCompetencyJSONRequestBody defines body for CreateCompetency for application/json ContentType.

type CreateCompetencyRequest

type CreateCompetencyRequest struct {
	Category    string              `json:"category"`
	Code        string              `json:"code"`
	LevelId     *openapi_types.UUID `json:"levelId,omitempty"`
	ProgramId   *openapi_types.UUID `json:"programId,omitempty"`
	SpecialtyId *openapi_types.UUID `json:"specialtyId,omitempty"`
	Title       string              `json:"title"`
	Type        CompetencyType      `json:"type"`
	UgsnId      *openapi_types.UUID `json:"ugsnId,omitempty"`
}

CreateCompetencyRequest defines model for CreateCompetencyRequest.

type CreateIndicatorJSONRequestBody

type CreateIndicatorJSONRequestBody = CreateIndicatorRequest

CreateIndicatorJSONRequestBody defines body for CreateIndicator for application/json ContentType.

type CreateIndicatorRequest

type CreateIndicatorRequest struct {
	Code  string `json:"code"`
	Title string `json:"title"`
}

CreateIndicatorRequest defines model for CreateIndicatorRequest.

type CreateLevelJSONRequestBody

type CreateLevelJSONRequestBody = CreateLevelRequest

CreateLevelJSONRequestBody defines body for CreateLevel for application/json ContentType.

type CreateLevelRequest

type CreateLevelRequest struct {
	Title string `json:"title"`
}

CreateLevelRequest defines model for CreateLevelRequest.

type CreateProgramRequest

type CreateProgramRequest struct {
	Code  string `json:"code"`
	Title string `json:"title"`
}

CreateProgramRequest defines model for CreateProgramRequest.

type CreateSpecialtyRequest

type CreateSpecialtyRequest struct {
	Code  string `json:"code"`
	Title string `json:"title"`
}

CreateSpecialtyRequest defines model for CreateSpecialtyRequest.

type CreateUgsnRequest

type CreateUgsnRequest struct {
	Code  string `json:"code"`
	Title string `json:"title"`
}

CreateUgsnRequest defines model for CreateUgsnRequest.

type Error

type Error struct {
	Details string    `json:"details"`
	Slug    ErrorSlug `json:"slug"`
}

Error defines model for Error.

type ErrorSlug

type ErrorSlug string

ErrorSlug defines model for ErrorSlug.

const (
	BadRequest                    ErrorSlug = "bad-request"
	CompetenciesNotFound          ErrorSlug = "competencies-not-found"
	EmptyBearerToken              ErrorSlug = "empty-bearer-token"
	IndicatorNotFound             ErrorSlug = "indicator-not-found"
	InvalidCompetenciesParameters ErrorSlug = "invalid-competencies-parameters"
	InvalidIndicatorParameters    ErrorSlug = "invalid-indicator-parameters"
	InvalidJson                   ErrorSlug = "invalid-json"
	InvalidLevelParameters        ErrorSlug = "invalid-level-parameters"
	InvalidProgramParameters      ErrorSlug = "invalid-program-parameters"
	InvalidSpecialtiesParameters  ErrorSlug = "invalid-specialties-parameters"
	InvalidUgsnParameters         ErrorSlug = "invalid-ugsn-parameters"
	LevelNotFound                 ErrorSlug = "level-not-found"
	NotFoundEntity                ErrorSlug = "not-found-entity"
	ProgramNotFound               ErrorSlug = "program-not-found"
	SpecialtyNotFound             ErrorSlug = "specialty-not-found"
	UgsnNotFound                  ErrorSlug = "ugsn-not-found"
	UnableToVerifyJwt             ErrorSlug = "unable-to-verify-jwt"
	UnauthorizedUser              ErrorSlug = "unauthorized-user"
	UnexpectedError               ErrorSlug = "unexpected-error"
)

Defines values for ErrorSlug.

type FilterCompetencyParams

type FilterCompetencyParams struct {
	// LevelId select level id
	LevelId *openapi_types.UUID `form:"levelId,omitempty" json:"levelId,omitempty"`

	// UgsnId select ugsn id
	UgsnId *openapi_types.UUID `form:"ugsnId,omitempty" json:"ugsnId,omitempty"`

	// SpecialtyId select specialty id
	SpecialtyId *openapi_types.UUID `form:"specialtyId,omitempty" json:"specialtyId,omitempty"`

	// ProgramId select program id
	ProgramId *openapi_types.UUID `form:"programId,omitempty" json:"programId,omitempty"`
}

FilterCompetencyParams defines parameters for FilterCompetency.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type LevelResponse

type LevelResponse struct {
	Id    openapi_types.UUID `json:"id"`
	Title string             `json:"title"`
}

LevelResponse defines model for LevelResponse.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type ProgramResponse

type ProgramResponse struct {
	Code        string             `json:"code"`
	Id          openapi_types.UUID `json:"id"`
	SpecialtyId openapi_types.UUID `json:"specialtyId"`
	Title       string             `json:"title"`
}

ProgramResponse defines model for ProgramResponse.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// filter competencies
	// (GET /competencies)
	FilterCompetency(w http.ResponseWriter, r *http.Request, params FilterCompetencyParams)
	// create competencies
	// (POST /competencies)
	CreateCompetency(w http.ResponseWriter, r *http.Request)
	// get indicators by competencyId
	// (GET /competency/{competencyId}/inicators)
	GetIndicators(w http.ResponseWriter, r *http.Request, competencyId openapi_types.UUID)
	// create indicator
	// (POST /competency/{competencyId}/inicators)
	CreateIndicator(w http.ResponseWriter, r *http.Request, competencyId openapi_types.UUID)
	// Returns level of the educational program.
	// (GET /levels)
	GetLevels(w http.ResponseWriter, r *http.Request)
	// Create the level of the educational program
	// (POST /levels)
	CreateLevel(w http.ResponseWriter, r *http.Request)
	// Returns level with such ID.
	// (GET /levels/{levelId})
	GetSpecificLevel(w http.ResponseWriter, r *http.Request, levelId openapi_types.UUID)
	// return ugsn by level id
	// (GET /levels/{levelId}/ugsn)
	GetUgsn(w http.ResponseWriter, r *http.Request, levelId openapi_types.UUID)
	// addedUgsn by level id
	// (POST /levels/{levelId}/ugsn)
	AddUgsn(w http.ResponseWriter, r *http.Request, levelId openapi_types.UUID)
	// delete program by id
	// (DELETE /programs/{id})
	DeleteProgram(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// delete specialty by code ugsn and level id
	// (DELETE /specialty/{id})
	DeleteSpecialty(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// return specific ugsn by level id
	// (GET /specialty/{id})
	GetSpecificSpecialty(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// return programs
	// (GET /specialty/{id}/programs)
	GetPrograms(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// create programs
	// (POST /specialty/{id}/programs)
	AddPrograms(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// delete ugsn by id
	// (DELETE /ugsn/{id})
	DeleteUgsn(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// return specific ugsn by level id
	// (GET /ugsn/{id})
	GetSpecificUgsn(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// return specialties by ugsn id
	// (GET /ugsn/{id}/specialties)
	GetSpecialties(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// add specialties by level id and ugsn code
	// (POST /ugsn/{id}/specialties)
	AddSpecialties(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) AddPrograms

func (siw *ServerInterfaceWrapper) AddPrograms(w http.ResponseWriter, r *http.Request)

AddPrograms operation middleware

func (*ServerInterfaceWrapper) AddSpecialties

func (siw *ServerInterfaceWrapper) AddSpecialties(w http.ResponseWriter, r *http.Request)

AddSpecialties operation middleware

func (*ServerInterfaceWrapper) AddUgsn

AddUgsn operation middleware

func (*ServerInterfaceWrapper) CreateCompetency

func (siw *ServerInterfaceWrapper) CreateCompetency(w http.ResponseWriter, r *http.Request)

CreateCompetency operation middleware

func (*ServerInterfaceWrapper) CreateIndicator

func (siw *ServerInterfaceWrapper) CreateIndicator(w http.ResponseWriter, r *http.Request)

CreateIndicator operation middleware

func (*ServerInterfaceWrapper) CreateLevel

func (siw *ServerInterfaceWrapper) CreateLevel(w http.ResponseWriter, r *http.Request)

CreateLevel operation middleware

func (*ServerInterfaceWrapper) DeleteProgram

func (siw *ServerInterfaceWrapper) DeleteProgram(w http.ResponseWriter, r *http.Request)

DeleteProgram operation middleware

func (*ServerInterfaceWrapper) DeleteSpecialty

func (siw *ServerInterfaceWrapper) DeleteSpecialty(w http.ResponseWriter, r *http.Request)

DeleteSpecialty operation middleware

func (*ServerInterfaceWrapper) DeleteUgsn

func (siw *ServerInterfaceWrapper) DeleteUgsn(w http.ResponseWriter, r *http.Request)

DeleteUgsn operation middleware

func (*ServerInterfaceWrapper) FilterCompetency

func (siw *ServerInterfaceWrapper) FilterCompetency(w http.ResponseWriter, r *http.Request)

FilterCompetency operation middleware

func (*ServerInterfaceWrapper) GetIndicators

func (siw *ServerInterfaceWrapper) GetIndicators(w http.ResponseWriter, r *http.Request)

GetIndicators operation middleware

func (*ServerInterfaceWrapper) GetLevels

func (siw *ServerInterfaceWrapper) GetLevels(w http.ResponseWriter, r *http.Request)

GetLevels operation middleware

func (*ServerInterfaceWrapper) GetPrograms

func (siw *ServerInterfaceWrapper) GetPrograms(w http.ResponseWriter, r *http.Request)

GetPrograms operation middleware

func (*ServerInterfaceWrapper) GetSpecialties

func (siw *ServerInterfaceWrapper) GetSpecialties(w http.ResponseWriter, r *http.Request)

GetSpecialties operation middleware

func (*ServerInterfaceWrapper) GetSpecificLevel

func (siw *ServerInterfaceWrapper) GetSpecificLevel(w http.ResponseWriter, r *http.Request)

GetSpecificLevel operation middleware

func (*ServerInterfaceWrapper) GetSpecificSpecialty

func (siw *ServerInterfaceWrapper) GetSpecificSpecialty(w http.ResponseWriter, r *http.Request)

GetSpecificSpecialty operation middleware

func (*ServerInterfaceWrapper) GetSpecificUgsn

func (siw *ServerInterfaceWrapper) GetSpecificUgsn(w http.ResponseWriter, r *http.Request)

GetSpecificUgsn operation middleware

func (*ServerInterfaceWrapper) GetUgsn

GetUgsn operation middleware

type SpecialtyResponse

type SpecialtyResponse struct {
	Code   string             `json:"code"`
	Id     openapi_types.UUID `json:"id"`
	Title  string             `json:"title"`
	UgsnId openapi_types.UUID `json:"ugsnId"`
}

SpecialtyResponse defines model for SpecialtyResponse.

type SpecificLevelResponse

type SpecificLevelResponse struct {
	Id    openapi_types.UUID     `json:"id"`
	Title string                 `json:"title"`
	Ugsn  []SpecificUgsnResponse `json:"ugsn"`
}

SpecificLevelResponse defines model for SpecificLevelResponse.

type SpecificSpecialtyResponse

type SpecificSpecialtyResponse struct {
	Code    string             `json:"code"`
	Id      openapi_types.UUID `json:"id"`
	Program []ProgramResponse  `json:"program"`
	Title   string             `json:"title"`
}

SpecificSpecialtyResponse defines model for SpecificSpecialtyResponse.

type SpecificUgsnResponse

type SpecificUgsnResponse struct {
	Code      string                      `json:"code"`
	Id        openapi_types.UUID          `json:"id"`
	Specialty []SpecificSpecialtyResponse `json:"specialty"`
	Title     string                      `json:"title"`
}

SpecificUgsnResponse defines model for SpecificUgsnResponse.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UgsnResponse

type UgsnResponse struct {
	Code    string             `json:"code"`
	Id      openapi_types.UUID `json:"id"`
	LevelId openapi_types.UUID `json:"levelId"`
	Title   string             `json:"title"`
}

UgsnResponse defines model for UgsnResponse.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshallingParamError

type UnmarshallingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshallingParamError) Error

func (e *UnmarshallingParamError) Error() string

func (*UnmarshallingParamError) Unwrap

func (e *UnmarshallingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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