api

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 17 Imported by: 0

README

api

Opsmind API implementation

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerHttpAuthenticationScopes = "bearerHttpAuthentication.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

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

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

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

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func (*API) ClearHealthStatus added in v1.2.0

func (*API) GetPath

func (api *API) GetPath(ctx context.Context, request GetPathRequestObject) (GetPathResponseObject, error)

func (*API) GetVertex

func (api *API) GetVertex(ctx context.Context, request GetVertexRequestObject) (GetVertexResponseObject, error)

func (*API) GetVertexAttributes added in v1.3.0

func (*API) MarkVertexHealthy added in v1.3.0

func (*API) MarkVertexUnhealthy added in v1.2.0

func (*API) Summary

func (api *API) Summary(ctx context.Context, request SummaryRequestObject) (SummaryResponseObject, error)

type ClearHealthStatus200Response added in v1.2.0

type ClearHealthStatus200Response struct {
}

func (ClearHealthStatus200Response) VisitClearHealthStatusResponse added in v1.2.0

func (response ClearHealthStatus200Response) VisitClearHealthStatusResponse(w http.ResponseWriter) error

type ClearHealthStatus401JSONResponse added in v1.2.0

type ClearHealthStatus401JSONResponse struct{ UnauthorizedJSONResponse }

func (ClearHealthStatus401JSONResponse) VisitClearHealthStatusResponse added in v1.2.0

func (response ClearHealthStatus401JSONResponse) VisitClearHealthStatusResponse(w http.ResponseWriter) error

type ClearHealthStatus500JSONResponse added in v1.2.0

type ClearHealthStatus500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ClearHealthStatus500JSONResponse) VisitClearHealthStatusResponse added in v1.2.0

func (response ClearHealthStatus500JSONResponse) VisitClearHealthStatusResponse(w http.ResponseWriter) error

type ClearHealthStatusRequestObject added in v1.2.0

type ClearHealthStatusRequestObject struct {
}

type ClearHealthStatusResponseObject added in v1.2.0

type ClearHealthStatusResponseObject interface {
	VisitClearHealthStatusResponse(w http.ResponseWriter) error
}

type Edge

type Edge struct {
	// Class Classe ou Categoria do relacionamento
	Class string `json:"class"`

	// Key Identificador único do relacionamento
	Key string `json:"key"`

	// Label Nome do relacionamento que será exibido
	Label string `json:"label"`

	// Source Label único do recurso de origem
	Source string `json:"source"`

	// Target Label único do recurso de destino
	Target string `json:"target"`
}

Edge Um relacionamento entre recursos

type GetPath200JSONResponse

type GetPath200JSONResponse Subgraph

func (GetPath200JSONResponse) VisitGetPathResponse

func (response GetPath200JSONResponse) VisitGetPathResponse(w http.ResponseWriter) error

type GetPath401JSONResponse

type GetPath401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetPath401JSONResponse) VisitGetPathResponse

func (response GetPath401JSONResponse) VisitGetPathResponse(w http.ResponseWriter) error

type GetPath404JSONResponse

type GetPath404JSONResponse struct{ NotFoundJSONResponse }

func (GetPath404JSONResponse) VisitGetPathResponse

func (response GetPath404JSONResponse) VisitGetPathResponse(w http.ResponseWriter) error

type GetPath422JSONResponse

type GetPath422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetPath422JSONResponse) VisitGetPathResponse

func (response GetPath422JSONResponse) VisitGetPathResponse(w http.ResponseWriter) error

type GetPath500JSONResponse

type GetPath500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetPath500JSONResponse) VisitGetPathResponse

func (response GetPath500JSONResponse) VisitGetPathResponse(w http.ResponseWriter) error

type GetPathRequestObject

type GetPathRequestObject struct {
	Key    Key    `json:"key"`
	Target string `json:"target"`
}

type GetPathResponseObject

type GetPathResponseObject interface {
	VisitGetPathResponse(w http.ResponseWriter) error
}

type GetVertex200JSONResponse

type GetVertex200JSONResponse Vertex

func (GetVertex200JSONResponse) VisitGetVertexResponse

func (response GetVertex200JSONResponse) VisitGetVertexResponse(w http.ResponseWriter) error

type GetVertex401JSONResponse

type GetVertex401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVertex401JSONResponse) VisitGetVertexResponse

func (response GetVertex401JSONResponse) VisitGetVertexResponse(w http.ResponseWriter) error

type GetVertex404JSONResponse

type GetVertex404JSONResponse struct{ NotFoundJSONResponse }

func (GetVertex404JSONResponse) VisitGetVertexResponse

func (response GetVertex404JSONResponse) VisitGetVertexResponse(w http.ResponseWriter) error

type GetVertex422JSONResponse

type GetVertex422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetVertex422JSONResponse) VisitGetVertexResponse

func (response GetVertex422JSONResponse) VisitGetVertexResponse(w http.ResponseWriter) error

type GetVertex500JSONResponse

type GetVertex500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVertex500JSONResponse) VisitGetVertexResponse

func (response GetVertex500JSONResponse) VisitGetVertexResponse(w http.ResponseWriter) error

type GetVertexAttributes200JSONResponse added in v1.3.0

type GetVertexAttributes200JSONResponse VertexAttrubutes

func (GetVertexAttributes200JSONResponse) VisitGetVertexAttributesResponse added in v1.3.0

func (response GetVertexAttributes200JSONResponse) VisitGetVertexAttributesResponse(w http.ResponseWriter) error

type GetVertexAttributes401JSONResponse added in v1.3.0

type GetVertexAttributes401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVertexAttributes401JSONResponse) VisitGetVertexAttributesResponse added in v1.3.0

func (response GetVertexAttributes401JSONResponse) VisitGetVertexAttributesResponse(w http.ResponseWriter) error

type GetVertexAttributes404JSONResponse added in v1.3.0

type GetVertexAttributes404JSONResponse struct{ NotFoundJSONResponse }

func (GetVertexAttributes404JSONResponse) VisitGetVertexAttributesResponse added in v1.3.0

func (response GetVertexAttributes404JSONResponse) VisitGetVertexAttributesResponse(w http.ResponseWriter) error

type GetVertexAttributes422JSONResponse added in v1.3.0

type GetVertexAttributes422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetVertexAttributes422JSONResponse) VisitGetVertexAttributesResponse added in v1.3.0

func (response GetVertexAttributes422JSONResponse) VisitGetVertexAttributesResponse(w http.ResponseWriter) error

type GetVertexAttributes500JSONResponse added in v1.3.0

type GetVertexAttributes500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVertexAttributes500JSONResponse) VisitGetVertexAttributesResponse added in v1.3.0

func (response GetVertexAttributes500JSONResponse) VisitGetVertexAttributesResponse(w http.ResponseWriter) error

type GetVertexAttributesRequestObject added in v1.3.0

type GetVertexAttributesRequestObject struct {
	Key Key `json:"key"`
}

type GetVertexAttributesResponseObject added in v1.3.0

type GetVertexAttributesResponseObject interface {
	VisitGetVertexAttributesResponse(w http.ResponseWriter) error
}

type GetVertexDependencies200JSONResponse

type GetVertexDependencies200JSONResponse Subgraph

func (GetVertexDependencies200JSONResponse) VisitGetVertexDependenciesResponse

func (response GetVertexDependencies200JSONResponse) VisitGetVertexDependenciesResponse(w http.ResponseWriter) error

type GetVertexDependencies401JSONResponse

type GetVertexDependencies401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVertexDependencies401JSONResponse) VisitGetVertexDependenciesResponse

func (response GetVertexDependencies401JSONResponse) VisitGetVertexDependenciesResponse(w http.ResponseWriter) error

type GetVertexDependencies404JSONResponse

type GetVertexDependencies404JSONResponse struct{ NotFoundJSONResponse }

func (GetVertexDependencies404JSONResponse) VisitGetVertexDependenciesResponse

func (response GetVertexDependencies404JSONResponse) VisitGetVertexDependenciesResponse(w http.ResponseWriter) error

type GetVertexDependencies422JSONResponse

type GetVertexDependencies422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetVertexDependencies422JSONResponse) VisitGetVertexDependenciesResponse

func (response GetVertexDependencies422JSONResponse) VisitGetVertexDependenciesResponse(w http.ResponseWriter) error

type GetVertexDependencies500JSONResponse

type GetVertexDependencies500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVertexDependencies500JSONResponse) VisitGetVertexDependenciesResponse

func (response GetVertexDependencies500JSONResponse) VisitGetVertexDependenciesResponse(w http.ResponseWriter) error

type GetVertexDependenciesParams

type GetVertexDependenciesParams struct {
	// All Se verdadeiro, retorna todas as dependências do recurso, mesmo que não estejam conectadas diretamente.
	All *bool `form:"all,omitempty" json:"all,omitempty"`
}

GetVertexDependenciesParams defines parameters for GetVertexDependencies.

type GetVertexDependenciesRequestObject

type GetVertexDependenciesRequestObject struct {
	Key    Key `json:"key"`
	Params GetVertexDependenciesParams
}

type GetVertexDependenciesResponseObject

type GetVertexDependenciesResponseObject interface {
	VisitGetVertexDependenciesResponse(w http.ResponseWriter) error
}

type GetVertexDependents200JSONResponse

type GetVertexDependents200JSONResponse Subgraph

func (GetVertexDependents200JSONResponse) VisitGetVertexDependentsResponse

func (response GetVertexDependents200JSONResponse) VisitGetVertexDependentsResponse(w http.ResponseWriter) error

type GetVertexDependents401JSONResponse

type GetVertexDependents401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVertexDependents401JSONResponse) VisitGetVertexDependentsResponse

func (response GetVertexDependents401JSONResponse) VisitGetVertexDependentsResponse(w http.ResponseWriter) error

type GetVertexDependents404JSONResponse

type GetVertexDependents404JSONResponse struct{ NotFoundJSONResponse }

func (GetVertexDependents404JSONResponse) VisitGetVertexDependentsResponse

func (response GetVertexDependents404JSONResponse) VisitGetVertexDependentsResponse(w http.ResponseWriter) error

type GetVertexDependents422JSONResponse

type GetVertexDependents422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetVertexDependents422JSONResponse) VisitGetVertexDependentsResponse

func (response GetVertexDependents422JSONResponse) VisitGetVertexDependentsResponse(w http.ResponseWriter) error

type GetVertexDependents500JSONResponse

type GetVertexDependents500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVertexDependents500JSONResponse) VisitGetVertexDependentsResponse

func (response GetVertexDependents500JSONResponse) VisitGetVertexDependentsResponse(w http.ResponseWriter) error

type GetVertexDependentsParams

type GetVertexDependentsParams struct {
	// All Se verdadeiro, retorna todos os dependentes do recurso, mesmo que não estejam conectados diretamente.
	All *bool `form:"all,omitempty" json:"all,omitempty"`
}

GetVertexDependentsParams defines parameters for GetVertexDependents.

type GetVertexDependentsRequestObject

type GetVertexDependentsRequestObject struct {
	Key    Key `json:"key"`
	Params GetVertexDependentsParams
}

type GetVertexDependentsResponseObject

type GetVertexDependentsResponseObject interface {
	VisitGetVertexDependentsResponse(w http.ResponseWriter) error
}

type GetVertexNeighbors200JSONResponse

type GetVertexNeighbors200JSONResponse Subgraph

func (GetVertexNeighbors200JSONResponse) VisitGetVertexNeighborsResponse

func (response GetVertexNeighbors200JSONResponse) VisitGetVertexNeighborsResponse(w http.ResponseWriter) error

type GetVertexNeighbors401JSONResponse

type GetVertexNeighbors401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVertexNeighbors401JSONResponse) VisitGetVertexNeighborsResponse

func (response GetVertexNeighbors401JSONResponse) VisitGetVertexNeighborsResponse(w http.ResponseWriter) error

type GetVertexNeighbors404JSONResponse

type GetVertexNeighbors404JSONResponse struct{ NotFoundJSONResponse }

func (GetVertexNeighbors404JSONResponse) VisitGetVertexNeighborsResponse

func (response GetVertexNeighbors404JSONResponse) VisitGetVertexNeighborsResponse(w http.ResponseWriter) error

type GetVertexNeighbors422JSONResponse

type GetVertexNeighbors422JSONResponse struct{ InvalidRequestJSONResponse }

func (GetVertexNeighbors422JSONResponse) VisitGetVertexNeighborsResponse

func (response GetVertexNeighbors422JSONResponse) VisitGetVertexNeighborsResponse(w http.ResponseWriter) error

type GetVertexNeighbors500JSONResponse

type GetVertexNeighbors500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVertexNeighbors500JSONResponse) VisitGetVertexNeighborsResponse

func (response GetVertexNeighbors500JSONResponse) VisitGetVertexNeighborsResponse(w http.ResponseWriter) error

type GetVertexNeighborsRequestObject

type GetVertexNeighborsRequestObject struct {
	Key Key `json:"key"`
}

type GetVertexNeighborsResponseObject

type GetVertexNeighborsResponseObject interface {
	VisitGetVertexNeighborsResponse(w http.ResponseWriter) error
}

type GetVertexRequestObject

type GetVertexRequestObject struct {
	Key Key `json:"key"`
}

type GetVertexResponseObject

type GetVertexResponseObject interface {
	VisitGetVertexResponse(w http.ResponseWriter) error
}

type InternalServerError

type InternalServerError struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

InternalServerError defines model for InternalServerError.

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

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 InvalidRequest

type InvalidRequest struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

InvalidRequest defines model for InvalidRequest.

type InvalidRequestJSONResponse

type InvalidRequestJSONResponse struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

type Key added in v1.3.0

type Key = string

Key defines model for key.

type MarkVertexHealthy200Response added in v1.3.0

type MarkVertexHealthy200Response struct {
}

func (MarkVertexHealthy200Response) VisitMarkVertexHealthyResponse added in v1.3.0

func (response MarkVertexHealthy200Response) VisitMarkVertexHealthyResponse(w http.ResponseWriter) error

type MarkVertexHealthy401JSONResponse added in v1.3.0

type MarkVertexHealthy401JSONResponse struct{ UnauthorizedJSONResponse }

func (MarkVertexHealthy401JSONResponse) VisitMarkVertexHealthyResponse added in v1.3.0

func (response MarkVertexHealthy401JSONResponse) VisitMarkVertexHealthyResponse(w http.ResponseWriter) error

type MarkVertexHealthy404JSONResponse added in v1.3.0

type MarkVertexHealthy404JSONResponse struct{ NotFoundJSONResponse }

func (MarkVertexHealthy404JSONResponse) VisitMarkVertexHealthyResponse added in v1.3.0

func (response MarkVertexHealthy404JSONResponse) VisitMarkVertexHealthyResponse(w http.ResponseWriter) error

type MarkVertexHealthy422JSONResponse added in v1.3.0

type MarkVertexHealthy422JSONResponse struct{ InvalidRequestJSONResponse }

func (MarkVertexHealthy422JSONResponse) VisitMarkVertexHealthyResponse added in v1.3.0

func (response MarkVertexHealthy422JSONResponse) VisitMarkVertexHealthyResponse(w http.ResponseWriter) error

type MarkVertexHealthy500JSONResponse added in v1.3.0

type MarkVertexHealthy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (MarkVertexHealthy500JSONResponse) VisitMarkVertexHealthyResponse added in v1.3.0

func (response MarkVertexHealthy500JSONResponse) VisitMarkVertexHealthyResponse(w http.ResponseWriter) error

type MarkVertexHealthyRequestObject added in v1.3.0

type MarkVertexHealthyRequestObject struct {
	Key Key `json:"key"`
}

type MarkVertexHealthyResponseObject added in v1.3.0

type MarkVertexHealthyResponseObject interface {
	VisitMarkVertexHealthyResponse(w http.ResponseWriter) error
}

type MarkVertexUnhealthy200Response added in v1.2.0

type MarkVertexUnhealthy200Response struct {
}

func (MarkVertexUnhealthy200Response) VisitMarkVertexUnhealthyResponse added in v1.2.0

func (response MarkVertexUnhealthy200Response) VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error

type MarkVertexUnhealthy401JSONResponse added in v1.2.0

type MarkVertexUnhealthy401JSONResponse struct{ UnauthorizedJSONResponse }

func (MarkVertexUnhealthy401JSONResponse) VisitMarkVertexUnhealthyResponse added in v1.2.0

func (response MarkVertexUnhealthy401JSONResponse) VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error

type MarkVertexUnhealthy404JSONResponse added in v1.2.0

type MarkVertexUnhealthy404JSONResponse struct{ NotFoundJSONResponse }

func (MarkVertexUnhealthy404JSONResponse) VisitMarkVertexUnhealthyResponse added in v1.2.0

func (response MarkVertexUnhealthy404JSONResponse) VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error

type MarkVertexUnhealthy422JSONResponse added in v1.2.0

type MarkVertexUnhealthy422JSONResponse struct{ InvalidRequestJSONResponse }

func (MarkVertexUnhealthy422JSONResponse) VisitMarkVertexUnhealthyResponse added in v1.2.0

func (response MarkVertexUnhealthy422JSONResponse) VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error

type MarkVertexUnhealthy500JSONResponse added in v1.2.0

type MarkVertexUnhealthy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (MarkVertexUnhealthy500JSONResponse) VisitMarkVertexUnhealthyResponse added in v1.2.0

func (response MarkVertexUnhealthy500JSONResponse) VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error

type MarkVertexUnhealthyRequestObject added in v1.2.0

type MarkVertexUnhealthyRequestObject struct {
	Key Key `json:"key"`
}

type MarkVertexUnhealthyResponseObject added in v1.2.0

type MarkVertexUnhealthyResponseObject interface {
	VisitMarkVertexUnhealthyResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

NotFound defines model for NotFound.

type NotFoundJSONResponse

type NotFoundJSONResponse struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

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 ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {
	// Resumo da infraestrutura
	// (GET /summary)
	Summary(w http.ResponseWriter, r *http.Request)
	// Limpar status de saúde
	// (POST /vertices/clear-health-status)
	ClearHealthStatus(w http.ResponseWriter, r *http.Request)
	// Detalhes de um recurso
	// (GET /vertices/{key})
	GetVertex(w http.ResponseWriter, r *http.Request, key Key)
	// Atributos de um recurso
	// (GET /vertices/{key}/attributes)
	GetVertexAttributes(w http.ResponseWriter, r *http.Request, key Key)
	// Dependencias de um recurso
	// (GET /vertices/{key}/dependencies)
	GetVertexDependencies(w http.ResponseWriter, r *http.Request, key Key, params GetVertexDependenciesParams)
	// Recursos dependentes
	// (GET /vertices/{key}/dependents)
	GetVertexDependents(w http.ResponseWriter, r *http.Request, key Key, params GetVertexDependentsParams)
	// Marcar recurso como não saudável
	// (DELETE /vertices/{key}/healthy)
	MarkVertexUnhealthy(w http.ResponseWriter, r *http.Request, key Key)
	// Marcar recurso como saudável
	// (POST /vertices/{key}/healthy)
	MarkVertexHealthy(w http.ResponseWriter, r *http.Request, key Key)
	// Vizinhos
	// (GET /vertices/{key}/neighbors)
	GetVertexNeighbors(w http.ResponseWriter, r *http.Request, key Key)
	// Caminho entre dois recursos
	// (GET /vertices/{key}/path/{target})
	GetPath(w http.ResponseWriter, r *http.Request, key Key, target string)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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) ClearHealthStatus added in v1.2.0

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

ClearHealthStatus operation middleware

func (*ServerInterfaceWrapper) GetPath

GetPath operation middleware

func (*ServerInterfaceWrapper) GetVertex

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

GetVertex operation middleware

func (*ServerInterfaceWrapper) GetVertexAttributes added in v1.3.0

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

GetVertexAttributes operation middleware

func (*ServerInterfaceWrapper) GetVertexDependencies

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

GetVertexDependencies operation middleware

func (*ServerInterfaceWrapper) GetVertexDependents

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

GetVertexDependents operation middleware

func (*ServerInterfaceWrapper) GetVertexNeighbors

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

GetVertexNeighbors operation middleware

func (*ServerInterfaceWrapper) MarkVertexHealthy added in v1.3.0

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

MarkVertexHealthy operation middleware

func (*ServerInterfaceWrapper) MarkVertexUnhealthy added in v1.2.0

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

MarkVertexUnhealthy operation middleware

func (*ServerInterfaceWrapper) Summary

Summary operation middleware

type StdHTTPServerOptions

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

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Resumo da infraestrutura
	// (GET /summary)
	Summary(ctx context.Context, request SummaryRequestObject) (SummaryResponseObject, error)
	// Limpar status de saúde
	// (POST /vertices/clear-health-status)
	ClearHealthStatus(ctx context.Context, request ClearHealthStatusRequestObject) (ClearHealthStatusResponseObject, error)
	// Detalhes de um recurso
	// (GET /vertices/{key})
	GetVertex(ctx context.Context, request GetVertexRequestObject) (GetVertexResponseObject, error)
	// Atributos de um recurso
	// (GET /vertices/{key}/attributes)
	GetVertexAttributes(ctx context.Context, request GetVertexAttributesRequestObject) (GetVertexAttributesResponseObject, error)
	// Dependencias de um recurso
	// (GET /vertices/{key}/dependencies)
	GetVertexDependencies(ctx context.Context, request GetVertexDependenciesRequestObject) (GetVertexDependenciesResponseObject, error)
	// Recursos dependentes
	// (GET /vertices/{key}/dependents)
	GetVertexDependents(ctx context.Context, request GetVertexDependentsRequestObject) (GetVertexDependentsResponseObject, error)
	// Marcar recurso como não saudável
	// (DELETE /vertices/{key}/healthy)
	MarkVertexUnhealthy(ctx context.Context, request MarkVertexUnhealthyRequestObject) (MarkVertexUnhealthyResponseObject, error)
	// Marcar recurso como saudável
	// (POST /vertices/{key}/healthy)
	MarkVertexHealthy(ctx context.Context, request MarkVertexHealthyRequestObject) (MarkVertexHealthyResponseObject, error)
	// Vizinhos
	// (GET /vertices/{key}/neighbors)
	GetVertexNeighbors(ctx context.Context, request GetVertexNeighborsRequestObject) (GetVertexNeighborsResponseObject, error)
	// Caminho entre dois recursos
	// (GET /vertices/{key}/path/{target})
	GetPath(ctx context.Context, request GetPathRequestObject) (GetPathResponseObject, error)
}

StrictServerInterface represents all server handlers.

type Subgraph

type Subgraph struct {
	// All Se verdadeiro, retorna todos os itens do grafo, mesmo que não estejam conectados diretamente.
	All bool `json:"all"`

	// Edges Lista de relacionamentos que devem ser exibidos no grafo
	Edges []Edge `json:"edges"`

	// Highlights Elementos que devem ser destacados no grafo
	Highlights []Vertex `json:"highlights"`

	// Principal Um ativo de TI
	Principal Vertex `json:"principal"`

	// Title Nome que será exibido para a sessão do grafo
	Title string `json:"title"`

	// Vertices Lista de recursos que devem ser exibidos no grafo
	Vertices []Vertex `json:"vertices"`
}

Subgraph Recursos e seus relacionamentos apresentados de forma útil para consumo e visualização.

type Summary

type Summary struct {
	// TotalEdges O número total de relacionamentos presentes na base
	TotalEdges int `json:"total_edges"`

	// TotalVertices O número total de recursos presentes na base
	TotalVertices int `json:"total_vertices"`

	// UnhealthyVertices Lista de recursos não saudáveis
	UnhealthyVertices []Vertex `json:"unhealthy_vertices"`
}

Summary Um sumário sobre o estado da infraestrutura

type Summary200JSONResponse

type Summary200JSONResponse Summary

func (Summary200JSONResponse) VisitSummaryResponse

func (response Summary200JSONResponse) VisitSummaryResponse(w http.ResponseWriter) error

type Summary401JSONResponse

type Summary401JSONResponse struct{ UnauthorizedJSONResponse }

func (Summary401JSONResponse) VisitSummaryResponse

func (response Summary401JSONResponse) VisitSummaryResponse(w http.ResponseWriter) error

type Summary500JSONResponse

type Summary500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (Summary500JSONResponse) VisitSummaryResponse

func (response Summary500JSONResponse) VisitSummaryResponse(w http.ResponseWriter) error

type SummaryRequestObject

type SummaryRequestObject struct {
}

type SummaryResponseObject

type SummaryResponseObject interface {
	VisitSummaryResponse(w http.ResponseWriter) error
}

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

Unauthorized defines model for Unauthorized.

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse struct {
	// Code Código do erro
	Code int `json:"code"`

	// Error Mensagem de erro
	Error string `json:"error"`
}

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 UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type Vertex

type Vertex struct {
	// Class Classe do ativo
	Class string `json:"class"`

	// Healthy Saúde do recurso. Um recurso pode não estar saudável por causa de um de suas dependências.
	Healthy bool `json:"healthy"`

	// Key identificador único do recurso
	Key string `json:"key"`

	// Label Nome que será exibido
	Label string `json:"label"`

	// LastCheck O timestamp da última verificação
	LastCheck string `json:"last_check"`
}

Vertex Um ativo de TI

type VertexAttrubutes added in v1.3.0

type VertexAttrubutes = []struct {
	// Description Descrição do atributo
	Description string `json:"description"`

	// Type Tipo do atributo
	Type string `json:"type"`

	// Value Valor do atributo, que pode ser string, número ou booleano
	Value VertexAttrubutes_Value `json:"value"`
}

VertexAttrubutes Lista de atributos do recurso

type VertexAttrubutesValue0 added in v1.3.0

type VertexAttrubutesValue0 = string

VertexAttrubutesValue0 defines model for .

type VertexAttrubutesValue1 added in v1.3.0

type VertexAttrubutesValue1 = int

VertexAttrubutesValue1 defines model for .

type VertexAttrubutesValue2 added in v1.3.0

type VertexAttrubutesValue2 = bool

VertexAttrubutesValue2 defines model for .

type VertexAttrubutes_Value added in v1.3.0

type VertexAttrubutes_Value struct {
	// contains filtered or unexported fields
}

VertexAttrubutes_Value Valor do atributo, que pode ser string, número ou booleano

func (VertexAttrubutes_Value) AsVertexAttrubutesValue0 added in v1.3.0

func (t VertexAttrubutes_Value) AsVertexAttrubutesValue0() (VertexAttrubutesValue0, error)

AsVertexAttrubutesValue0 returns the union data inside the VertexAttrubutes_Value as a VertexAttrubutesValue0

func (VertexAttrubutes_Value) AsVertexAttrubutesValue1 added in v1.3.0

func (t VertexAttrubutes_Value) AsVertexAttrubutesValue1() (VertexAttrubutesValue1, error)

AsVertexAttrubutesValue1 returns the union data inside the VertexAttrubutes_Value as a VertexAttrubutesValue1

func (VertexAttrubutes_Value) AsVertexAttrubutesValue2 added in v1.3.0

func (t VertexAttrubutes_Value) AsVertexAttrubutesValue2() (VertexAttrubutesValue2, error)

AsVertexAttrubutesValue2 returns the union data inside the VertexAttrubutes_Value as a VertexAttrubutesValue2

func (*VertexAttrubutes_Value) FromVertexAttrubutesValue0 added in v1.3.0

func (t *VertexAttrubutes_Value) FromVertexAttrubutesValue0(v VertexAttrubutesValue0) error

FromVertexAttrubutesValue0 overwrites any union data inside the VertexAttrubutes_Value as the provided VertexAttrubutesValue0

func (*VertexAttrubutes_Value) FromVertexAttrubutesValue1 added in v1.3.0

func (t *VertexAttrubutes_Value) FromVertexAttrubutesValue1(v VertexAttrubutesValue1) error

FromVertexAttrubutesValue1 overwrites any union data inside the VertexAttrubutes_Value as the provided VertexAttrubutesValue1

func (*VertexAttrubutes_Value) FromVertexAttrubutesValue2 added in v1.3.0

func (t *VertexAttrubutes_Value) FromVertexAttrubutesValue2(v VertexAttrubutesValue2) error

FromVertexAttrubutesValue2 overwrites any union data inside the VertexAttrubutes_Value as the provided VertexAttrubutesValue2

func (VertexAttrubutes_Value) MarshalJSON added in v1.3.0

func (t VertexAttrubutes_Value) MarshalJSON() ([]byte, error)

func (*VertexAttrubutes_Value) MergeVertexAttrubutesValue0 added in v1.3.0

func (t *VertexAttrubutes_Value) MergeVertexAttrubutesValue0(v VertexAttrubutesValue0) error

MergeVertexAttrubutesValue0 performs a merge with any union data inside the VertexAttrubutes_Value, using the provided VertexAttrubutesValue0

func (*VertexAttrubutes_Value) MergeVertexAttrubutesValue1 added in v1.3.0

func (t *VertexAttrubutes_Value) MergeVertexAttrubutesValue1(v VertexAttrubutesValue1) error

MergeVertexAttrubutesValue1 performs a merge with any union data inside the VertexAttrubutes_Value, using the provided VertexAttrubutesValue1

func (*VertexAttrubutes_Value) MergeVertexAttrubutesValue2 added in v1.3.0

func (t *VertexAttrubutes_Value) MergeVertexAttrubutesValue2(v VertexAttrubutesValue2) error

MergeVertexAttrubutesValue2 performs a merge with any union data inside the VertexAttrubutes_Value, using the provided VertexAttrubutesValue2

func (*VertexAttrubutes_Value) UnmarshalJSON added in v1.3.0

func (t *VertexAttrubutes_Value) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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