api

package
v0.0.196 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 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 *mux.Router) http.Handler

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

func HandlerFromMuxWithBaseURL

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

func HandlerWithOptions

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

HandlerWithOptions creates http.Handler with additional options

Types

type AppInputType added in v0.0.184

type AppInputType int

AppInputType defines model for AppInputType.

const (
	AppInputTypeFunction    AppInputType = 0
	AppInputTypeGrpcHandler AppInputType = 2
	AppInputTypeHttpHandler AppInputType = 1
)

Defines values for AppInputType.

type CallSemantics

type CallSemantics int

CallSemantics defines model for CallSemantics.

const (
	FunctionCall     CallSemantics = 1
	Inherited        CallSemantics = 0
	PriorityTaskPool CallSemantics = 3
	TaskPool         CallSemantics = 2
)

Defines values for CallSemantics.

type CommunicationProtocol

type CommunicationProtocol int

CommunicationProtocol defines model for CommunicationProtocol.

const (
	CommunicationProtocolGRPC CommunicationProtocol = 2
	CommunicationProtocolHTTP CommunicationProtocol = 1
)

Defines values for CommunicationProtocol.

type DataConnector

type DataConnector struct {
	Async               *bool                       `json:"async,omitempty"`
	Brokers             *string                     `json:"brokers,omitempty"`
	DialTimeout         *float32                    `json:"dialTimeout,omitempty"`
	Host                *string                     `json:"host,omitempty"`
	Id                  int                         `json:"id"`
	Implementation      DataConnectorImplementation `json:"implementation"`
	Name                string                      `json:"name"`
	Port                *int                        `json:"port,omitempty"`
	ProgrammingLanguage *ProgrammingLanguage        `json:"programmingLanguage,omitempty"`
	Type                DataConnectorType           `json:"type"`
	UsePartitioner      *bool                       `json:"usePartitioner,omitempty"`
	Version             *string                     `json:"version,omitempty"`
}

DataConnector defines model for DataConnector.

type DataConnectorImplementation

type DataConnectorImplementation string

DataConnectorImplementation defines model for DataConnectorImplementation.

const (
	DataConnectorImplementationAiohttp  DataConnectorImplementation = "aiohttp"
	DataConnectorImplementationFastHTTP DataConnectorImplementation = "FastHTTP"
	DataConnectorImplementationFunction DataConnectorImplementation = "function"
	DataConnectorImplementationNethttp  DataConnectorImplementation = "net/http"
	DataConnectorImplementationSarama   DataConnectorImplementation = "sarama"
)

Defines values for DataConnectorImplementation.

type DataConnectorType

type DataConnectorType int

DataConnectorType defines model for DataConnectorType.

const (
	DataConnectorTypeCustom DataConnectorType = 4
	DataConnectorTypeGRPC   DataConnectorType = 2
	DataConnectorTypeHTTP   DataConnectorType = 1
	DataConnectorTypeKafka  DataConnectorType = 3
)

Defines values for DataConnectorType.

type DataFormat

type DataFormat string

DataFormat defines model for DataFormat.

const (
	DataFormatCustom DataFormat = "custom"
	DataFormatForm   DataFormat = "form"
	DataFormatJson   DataFormat = "json"
)

Defines values for DataFormat.

type DataType

type DataType string

DataType defines model for DataType.

const (
	DataTypeArray         DataType = "array"
	DataTypeBoolean       DataType = "boolean"
	DataTypeByte          DataType = "byte"
	DataTypeChar          DataType = "char"
	DataTypeCustom        DataType = "custom"
	DataTypeDouble        DataType = "double"
	DataTypeFloat         DataType = "float"
	DataTypeInt           DataType = "int"
	DataTypeInt16         DataType = "int16"
	DataTypeInt32         DataType = "int32"
	DataTypeInt64         DataType = "int64"
	DataTypeInt8          DataType = "int8"
	DataTypeMap           DataType = "map"
	DataTypeString        DataType = "string"
	DataTypeStruct        DataType = "struct"
	DataTypeUint          DataType = "uint"
	DataTypeUint16        DataType = "uint16"
	DataTypeUint32        DataType = "uint32"
	DataTypeUint64        DataType = "uint64"
	DataTypeUint8         DataType = "uint8"
	DataTypeUnicodeChar   DataType = "unicode char"
	DataTypeUnicodeString DataType = "unicode string"
)

Defines values for DataType.

type Endpoint

type Endpoint struct {
	ConsumerGroup       *string     `json:"consumerGroup,omitempty"`
	CreateTopic         *bool       `json:"createTopic,omitempty"`
	Delay               *int        `json:"delay,omitempty"`
	Format              *DataFormat `json:"format,omitempty"`
	FunctionDescription *string     `json:"functionDescription,omitempty"`
	FunctionName        *string     `json:"functionName,omitempty"`
	FunctionPackage     *string     `json:"functionPackage,omitempty"`
	Id                  int         `json:"id"`
	IdDataConnector     int         `json:"idDataConnector"`
	Method              *string     `json:"method,omitempty"`
	Name                string      `json:"name"`
	Partitions          *int        `json:"partitions,omitempty"`
	Path                *string     `json:"path,omitempty"`
	PublicFunction      *bool       `json:"publicFunction,omitempty"`
	ReplicationFactor   *int        `json:"replicationFactor,omitempty"`
	Topic               *string     `json:"topic,omitempty"`
	UseHandler          *bool       `json:"useHandler,omitempty"`
}

Endpoint defines model for Endpoint.

type GorillaServerOptions

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

type GrpcMethodType added in v0.0.184

type GrpcMethodType int

GrpcMethodType defines model for GrpcMethodType.

const (
	BidirectionalStreaming GrpcMethodType = 4
	ClientStreaming        GrpcMethodType = 1
	NoStreaming            GrpcMethodType = 0
	ServerStreaming        GrpcMethodType = 2
)

Defines values for GrpcMethodType.

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 JoinStorageType

type JoinStorageType int

JoinStorageType defines model for JoinStorageType.

const (
	Aerospike JoinStorageType = 3
	HashMap   JoinStorageType = 1
	RocksDB   JoinStorageType = 2
)

Defines values for JoinStorageType.

type JoinType

type JoinType int

JoinType defines model for JoinType.

const (
	Inner JoinType = 1
	Left  JoinType = 2
	Outer JoinType = 4
	Right JoinType = 3
)

Defines values for JoinType.

type Link struct {
	CallSemantics                CallSemantics          `json:"callSemantics"`
	CommunicationProtocol        *CommunicationProtocol `json:"communicationProtocol,omitempty"`
	From                         int                    `json:"from"`
	IncomeCallSemantics          *CallSemantics         `json:"incomeCallSemantics,omitempty"`
	IncomeInheritedCallSemantics *bool                  `json:"incomeInheritedCallSemantics,omitempty"`
	IncomePoolName               *string                `json:"incomePoolName,omitempty"`
	IncomePriority               *int                   `json:"incomePriority,omitempty"`
	InheritedCallSemantics       bool                   `json:"inheritedCallSemantics"`
	MethodName                   *string                `json:"methodName,omitempty"`
	PoolName                     *string                `json:"poolName,omitempty"`
	Priority                     *int                   `json:"priority,omitempty"`
	Timeout                      *int                   `json:"timeout,omitempty"`
	To                           int                    `json:"to"`
}

Link defines model for Link.

type LogLevel added in v0.0.161

type LogLevel string

LogLevel defines model for LogLevel.

const (
	CRITICAL LogLevel = "CRITICAL"
	DEBUG    LogLevel = "DEBUG"
	ERROR    LogLevel = "ERROR"
	FATAL    LogLevel = "FATAL"
	INFO     LogLevel = "INFO"
	WARNING  LogLevel = "WARNING"
)

Defines values for LogLevel.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Pool added in v0.0.125

type Pool struct {
	ExecutorsCount int    `json:"executorsCount"`
	Name           string `json:"name"`
}

Pool defines model for Pool.

type PostGenerateCodeJSONRequestBody

type PostGenerateCodeJSONRequestBody = StreamApp

PostGenerateCodeJSONRequestBody defines body for PostGenerateCode for application/json ContentType.

type ProgrammingLanguage

type ProgrammingLanguage int

ProgrammingLanguage defines model for ProgrammingLanguage.

const (
	Cpp    ProgrammingLanguage = 2
	GoLang ProgrammingLanguage = 1
	Python ProgrammingLanguage = 3
)

Defines values for ProgrammingLanguage.

type ProjectSettings

type ProjectSettings struct {
	GolangVersion string `json:"golangVersion"`
	ModulePath    string `json:"modulePath"`
	Name          string `json:"name"`
}

ProjectSettings defines model for ProjectSettings.

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 {
	// Generate project code.
	// (POST /generateCode)
	PostGenerateCode(w http.ResponseWriter, r *http.Request)
}

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) PostGenerateCode

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

PostGenerateCode operation middleware

type Service

type Service struct {
	Color                string              `json:"color"`
	DefaultCallSemantics CallSemantics       `json:"defaultCallSemantics"`
	DefaultGrpcTimeout   int                 `json:"defaultGrpcTimeout"`
	DelayExecutors       int                 `json:"delayExecutors"`
	Environment          string              `json:"environment"`
	GrpcHost             string              `json:"grpcHost"`
	GrpcPort             int                 `json:"grpcPort"`
	HttpHost             string              `json:"httpHost"`
	HttpPort             int                 `json:"httpPort"`
	Id                   int                 `json:"id"`
	LogLevel             *LogLevel           `json:"logLevel,omitempty"`
	MetricsHandler       string              `json:"metricsHandler"`
	Name                 string              `json:"name"`
	ProgrammingLanguage  ProgrammingLanguage `json:"programmingLanguage"`
	ShutdownTimeout      int                 `json:"shutdownTimeout"`
	StatusHandler        string              `json:"statusHandler"`
}

Service defines model for Service.

type Stream

type Stream struct {
	AppInputType        *AppInputType      `json:"appInputType,omitempty"`
	Duration            *int               `json:"duration,omitempty"`
	FunctionDescription *string            `json:"functionDescription,omitempty"`
	FunctionName        *string            `json:"functionName,omitempty"`
	FunctionPackage     *string            `json:"functionPackage,omitempty"`
	GrpcMethodType      *GrpcMethodType    `json:"grpcMethodType,omitempty"`
	Id                  int                `json:"id"`
	IdEndpoint          *int               `json:"idEndpoint,omitempty"`
	IdService           int                `json:"idService"`
	IdSource            int                `json:"idSource"`
	IdSources           []int              `json:"idSources"`
	JoinStorage         *JoinStorageType   `json:"joinStorage,omitempty"`
	JoinType            *JoinType          `json:"joinType,omitempty"`
	KeyType             *string            `json:"keyType,omitempty"`
	Name                string             `json:"name"`
	Path                *string            `json:"path,omitempty"`
	PublicFunction      *bool              `json:"publicFunction,omitempty"`
	RenewTTL            *bool              `json:"renewTTL,omitempty"`
	Ttl                 *int               `json:"ttl,omitempty"`
	Type                TransformationType `json:"type"`
	ValueType           *string            `json:"valueType,omitempty"`
	XPos                int                `json:"xPos"`
	YPos                int                `json:"yPos"`
}

Stream defines model for Stream.

type StreamApp

type StreamApp struct {
	DataConnectors []DataConnector `json:"dataConnectors"`
	Endpoints      []Endpoint      `json:"endpoints"`
	Links          []Link          `json:"links"`
	Pools          []Pool          `json:"pools"`
	Services       []Service       `json:"services"`
	Settings       ProjectSettings `json:"settings"`
	Streams        []Stream        `json:"streams"`
	Types          []Type          `json:"types"`
}

StreamApp defines model for StreamApp.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type TransformationType

type TransformationType int

TransformationType defines model for TransformationType.

const (
	AppInput        TransformationType = 17
	AppSink         TransformationType = 14
	CycleLink       TransformationType = 15
	Delay           TransformationType = 16
	Filter          TransformationType = 3
	FlatMap         TransformationType = 7
	FlatMapIterable TransformationType = 8
	ForEach         TransformationType = 6
	Input           TransformationType = 1
	Join            TransformationType = 4
	KeyBy           TransformationType = 9
	Map             TransformationType = 2
	Merge           TransformationType = 10
	MultiJoin       TransformationType = 5
	Parallels       TransformationType = 12
	Sink            TransformationType = 13
	Split           TransformationType = 11
)

Defines values for TransformationType.

type Type

type Type struct {
	DefinitionFormat    *TypeDefinitionFormat `json:"definitionFormat,omitempty"`
	KeyType             *string               `json:"keyType,omitempty"`
	Name                string                `json:"name"`
	Package             *string               `json:"package,omitempty"`
	PublicType          *bool                 `json:"publicType,omitempty"`
	TransferByValue     *bool                 `json:"transferByValue,omitempty"`
	Type                DataType              `json:"type"`
	TypeDefinitionLang1 *string               `json:"typeDefinitionLang1,omitempty"`
	TypeDefinitionLang2 *string               `json:"typeDefinitionLang2,omitempty"`
	TypeImportLang1     *string               `json:"typeImportLang1,omitempty"`
	TypeImportLang2     *string               `json:"typeImportLang2,omitempty"`
	UseAlias            *bool                 `json:"useAlias,omitempty"`
	ValueType           *string               `json:"valueType,omitempty"`
}

Type defines model for Type.

type TypeDefinitionFormat

type TypeDefinitionFormat int

TypeDefinitionFormat defines model for TypeDefinitionFormat.

const (
	CapNProto   TypeDefinitionFormat = 4
	FlatBuffers TypeDefinitionFormat = 3
	Native      TypeDefinitionFormat = 1
	Protobuf    TypeDefinitionFormat = 2
)

Defines values for TypeDefinitionFormat.

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

Jump to

Keyboard shortcuts

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