openapi

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

type DescriptorsRequest struct {
	Type   string `form:"type"`
	GameId string `form:"gameId"`
}

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 NewHandler(service *Service) *Handler

func (*Handler) BatchGetSpec

func (h *Handler) BatchGetSpec(c *gin.Context)

func (*Handler) EntityFunctions

func (h *Handler) EntityFunctions(c *gin.Context)

EntityFunctions handles the request to get entity functions

func (*Handler) GetDocument

func (h *Handler) GetDocument(c *gin.Context)

GetDocument handles the request to get aggregated OpenAPI document

func (*Handler) GetSpec

func (h *Handler) GetSpec(c *gin.Context)

GetSpec handles the request to get function OpenAPI spec

func (*Handler) Import

func (h *Handler) Import(c *gin.Context)

Import handles the request to import OpenAPI spec

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

Jump to

Keyboard shortcuts

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