Documentation
¶
Index ¶
- type BatchGetSpecRequest
- type BatchGetSpecResponse
- type Descriptor
- type DescriptorsRequest
- type DescriptorsResponse
- type EntityFunction
- type EntityFunctionsRequest
- type EntityFunctionsResponse
- type GetDocumentRequest
- type GetDocumentResponse
- type GetSpecRequest
- type GetSpecResponse
- type Handler
- type ImportRequest
- type ImportResponse
- type OpenAPIDocumentRequest
- type OpenAPIDocumentResponse
- type OpenAPIImportRequest
- type OpenAPIImportResponse
- type OpenAPISpecRequest
- type OpenAPISpecResponse
- type Service
- func (s *Service) BatchGetSpec(ctx context.Context, req *BatchGetSpecRequest) (BatchGetSpecResponse, error)
- func (s *Service) EntityFunctions(ctx context.Context, req *EntityFunctionsRequest) (*EntityFunctionsResponse, error)
- func (s *Service) GetDocument(ctx context.Context, req *GetDocumentRequest) (*GetDocumentResponse, error)
- func (s *Service) GetSpec(ctx context.Context, req *GetSpecRequest) (*GetSpecResponse, error)
- func (s *Service) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchGetSpecRequest ¶
type BatchGetSpecRequest struct {
FunctionIDs []string `json:"function_ids" binding:"required"`
}
type BatchGetSpecResponse ¶
type BatchGetSpecResponse map[string]interface{}
type Descriptor ¶
type Descriptor struct {
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
Schema interface{} `json:"schema"`
}
Descriptor represents a function descriptor
type DescriptorsRequest ¶
DescriptorsRequest is the request to get descriptors
type DescriptorsResponse ¶
type DescriptorsResponse struct {
Items []Descriptor `json:"items"`
}
DescriptorsResponse is the response with descriptors
type EntityFunction ¶
type EntityFunction struct {
ID string `json:"id"`
Operation string `json:"operation"`
Name string `json:"name"`
}
EntityFunction represents a function associated with an entity
type EntityFunctionsRequest ¶
type EntityFunctionsRequest struct {
ID string `uri:"id" binding:"required"`
}
EntityFunctionsRequest is the request to get entity functions
type EntityFunctionsResponse ¶
type EntityFunctionsResponse struct {
Items []EntityFunction `json:"items"`
}
EntityFunctionsResponse is the response with entity functions
type GetDocumentRequest ¶
type GetDocumentRequest = OpenAPIDocumentRequest
GetDocumentRequest is the request to get aggregated OpenAPI document Deprecated: Use OpenAPIDocumentRequest instead
type GetDocumentResponse ¶
type GetDocumentResponse = OpenAPIDocumentResponse
GetDocumentResponse is the response with aggregated OpenAPI document Deprecated: Use OpenAPIDocumentResponse instead
type GetSpecRequest ¶
type GetSpecRequest = OpenAPISpecRequest
GetSpecRequest is the request to get function OpenAPI spec Deprecated: Use OpenAPISpecRequest instead
type GetSpecResponse ¶
type GetSpecResponse = OpenAPISpecResponse
GetSpecResponse is the response with function OpenAPI spec Deprecated: Use OpenAPISpecResponse instead
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) BatchGetSpec ¶
func (*Handler) EntityFunctions ¶
EntityFunctions handles the request to get entity functions
func (*Handler) GetDocument ¶
GetDocument handles the request to get aggregated OpenAPI document
type ImportRequest ¶
type ImportRequest = OpenAPIImportRequest
ImportRequest is the request to import OpenAPI spec Deprecated: Use OpenAPIImportRequest instead
type ImportResponse ¶
type ImportResponse = OpenAPIImportResponse
ImportResponse is the response from OpenAPI import Deprecated: Use OpenAPIImportResponse instead
type OpenAPIDocumentRequest ¶
type OpenAPIDocumentRequest struct{}
OpenAPIDocumentRequest is the request to get aggregated OpenAPI document
type OpenAPIDocumentResponse ¶
type OpenAPIDocumentResponse struct {
Spec interface{} `json:"spec"` // OpenAPI 3.0.3 Document
}
OpenAPIDocumentResponse is the response with aggregated OpenAPI document
type OpenAPIImportRequest ¶
type OpenAPIImportRequest struct {
Spec interface{} `json:"spec" binding:"required"` // OpenAPI 3.0.3 Document
}
OpenAPIImportRequest is the request to import OpenAPI spec
type OpenAPIImportResponse ¶
type OpenAPIImportResponse struct {
Imported int `json:"imported"`
Failed []string `json:"failed"`
}
OpenAPIImportResponse is the response from OpenAPI import
type OpenAPISpecRequest ¶
type OpenAPISpecRequest struct {
ID string `uri:"id" binding:"required"`
}
OpenAPISpecRequest is the request to get function OpenAPI spec
type OpenAPISpecResponse ¶
type OpenAPISpecResponse struct {
Spec interface{} `json:"spec"` // OpenAPI 3.0.3 Operation Object
}
OpenAPISpecResponse is the response with function OpenAPI spec
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) BatchGetSpec ¶
func (s *Service) BatchGetSpec(ctx context.Context, req *BatchGetSpecRequest) (BatchGetSpecResponse, error)
func (*Service) EntityFunctions ¶
func (s *Service) EntityFunctions(ctx context.Context, req *EntityFunctionsRequest) (*EntityFunctionsResponse, error)
EntityFunctions returns functions associated with an entity
func (*Service) GetDocument ¶
func (s *Service) GetDocument(ctx context.Context, req *GetDocumentRequest) (*GetDocumentResponse, error)
GetDocument returns aggregated OpenAPI document
func (*Service) GetSpec ¶
func (s *Service) GetSpec(ctx context.Context, req *GetSpecRequest) (*GetSpecResponse, error)
GetSpec returns the OpenAPI spec for a function
func (*Service) Import ¶
func (s *Service) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error)
Import imports OpenAPI spec and creates functions