Documentation
¶
Index ¶
- type AddressSpace
- type AddressSpaceExpansionConfig
- type Addressable
- type AuthDTO
- type BodyMap
- type Column
- type ColumnDescriptor
- type CountPushdown
- type ExpectedRequest
- type ExpectedResponse
- type FilterPushdown
- type GraphQL
- type GraphQLElement
- type HTTPArmoury
- type HTTPArmouryParameters
- type HTTPPreparator
- type HTTPPreparatorConfig
- type HttpParameters
- type ITable
- type Methods
- type OpenAPIService
- type OperationInverse
- type OperationSelector
- type OperationStore
- type OperationTokens
- type OrderByPushdown
- type Pagination
- type ParameterBinding
- type ProcessedOperationResponse
- type Provider
- type ProviderService
- type QueryParamPushdown
- type Relation
- type Resource
- type ResourceRegister
- type SQLExternalColumn
- type SQLExternalTable
- type Schema
- type Schemas
- type SelectPushdown
- type Service
- type StackQLConfig
- type StandardOperationStore
- type Tabulation
- type TokenSemantic
- type TokenSemanticArgs
- type TokenTransformer
- type TopPushdown
- type Transform
- type TransformerLocator
- type Variations
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressSpace ¶
type AddressSpace interface {
GetGlobalSelectSchemas() map[string]Schema
DereferenceAddress(address string) (any, bool)
WriteToAddress(address string, val any) error
ReadFromAddress(address string) (any, bool)
ResolveSignature(map[string]any) (bool, map[string]any)
Invoke(...any) error
ToMap(AddressSpaceExpansionConfig) (map[string]any, error)
ToRelation(AddressSpaceExpansionConfig) (Relation, error)
}
type Addressable ¶
type AuthDTO ¶
type AuthDTO interface {
JSONLookup(token string) (interface{}, error)
GetInlineBasicCredentials() string
GetType() string
GetKeyID() string
GetKeyIDEnvVar() string
GetKeyFilePath() string
GetKeyFilePathEnvVar() string
GetKeyEnvVar() string
GetScopes() []string
GetValuePrefix() string
GetEnvVarUsername() string
GetEnvVarPassword() string
GetEnvVarAPIKeyStr() string
GetEnvVarAPISecretStr() string
GetSuccessor() (AuthDTO, bool)
GetLocation() string
GetSubject() string
GetName() string
GetClientID() string
GetClientIDEnvVar() string
GetClientSecret() string
GetClientSecretEnvVar() string
GetTokenURL() string
GetGrantType() string
GetValues() url.Values
GetAuthStyle() int
GetAccountID() string
GetAccountIDEnvVar() string
}
type ColumnDescriptor ¶
type CountPushdown ¶
type CountPushdown interface {
GetDialect() string
GetParamName() string
GetParamValue() string
GetResponseKey() string
}
CountPushdown represents configuration for SELECT COUNT(*) pushdown
type ExpectedRequest ¶
type ExpectedResponse ¶
type FilterPushdown ¶
type FilterPushdown interface {
GetDialect() string
GetParamName() string
GetSyntax() string
GetSupportedOperators() []string
GetSupportedColumns() []string
IsOperatorSupported(operator string) bool
IsColumnSupported(column string) bool
}
FilterPushdown represents configuration for WHERE clause filter pushdown
type GraphQLElement ¶
type GraphQLElement map[string]interface{}
type HTTPArmoury ¶
type HTTPArmoury interface {
AddRequestParams(HTTPArmouryParameters)
GetRequestParams() []HTTPArmouryParameters
GetRequestSchema() Schema
GetResponseSchema() Schema
SetRequestParams([]HTTPArmouryParameters)
SetRequestSchema(Schema)
SetResponseSchema(Schema)
}
type HTTPArmouryParameters ¶
type HTTPArmouryParameters interface {
Encode() string
GetBodyBytes() []byte
GetHeader() http.Header
GetParameters() HttpParameters
GetQuery() url.Values
GetRequest() *http.Request
GetArgList() client.AnySdkArgList
SetBodyBytes(b []byte)
SetHeaderKV(k string, v []string)
SetNextPage(ops OperationStore, token string, tokenKey internaldto.HTTPElement) (*http.Request, error)
SetParameters(HttpParameters)
SetRawQuery(string)
SetRequest(*http.Request)
SetRequestBodyMap(BodyMap)
ToFlatMap() (map[string]interface{}, error)
}
type HTTPPreparator ¶
type HTTPPreparator interface {
BuildHTTPRequestCtx(HTTPPreparatorConfig) (HTTPArmoury, error)
}
type HTTPPreparatorConfig ¶
type HTTPPreparatorConfig interface {
IsFromAnnotation() bool
}
type HttpParameters ¶
type HttpParameters interface {
Encode() string
IngestMap(map[string]interface{}) error
StoreParameter(Addressable, interface{})
ToFlatMap() (map[string]interface{}, error)
GetParameter(paramName, paramIn string) (ParameterBinding, bool)
GetRemainingQueryParamsFlatMap(keysRemaining map[string]interface{}) (map[string]interface{}, error)
GetServerParameterFlatMap() (map[string]interface{}, error)
GetContextParameterFlatMap() (map[string]interface{}, error)
SetResponseBodyParam(key string, val interface{})
SetServerParam(key string, svc OpenAPIService, val interface{})
SetRequestBodyParam(key string, val interface{})
SetRequestBody(map[string]interface{})
GetRequestBody() map[string]interface{}
GetInlineParameterFlatMap() (map[string]interface{}, error)
}
type Methods ¶
type Methods interface {
FindFromSelector(sel OperationSelector) (StandardOperationStore, error)
OrderMethods() ([]StandardOperationStore, error)
FindMethod(key string) (StandardOperationStore, error)
}
type OpenAPIService ¶
type OpenAPIService interface {
Service
}
type OperationInverse ¶
type OperationInverse interface {
JSONLookup(token string) (interface{}, error)
GetOperationStore() (StandardOperationStore, bool)
GetTokens() (OperationTokens, bool)
GetParamMap(response.Response) (map[string]interface{}, error)
}
type OperationSelector ¶
type OperationStore ¶
type OperationStore interface {
ITable
GetMethodKey() string
GetSQLVerb() string
GetGraphQL() GraphQL
GetInverse() (OperationInverse, bool)
GetStackQLConfig() StackQLConfig
GetQueryParamPushdown() (QueryParamPushdown, bool)
GetParameters() map[string]Addressable
GetAPIMethod() string
GetInline() []string
GetRequest() (ExpectedRequest, bool)
GetResponse() (ExpectedResponse, bool)
GetServers() (openapi3.Servers, bool)
GetParameterizedPath() string
GetProviderService() ProviderService
GetProvider() Provider
GetService() OpenAPIService
SetAddressSpace(AddressSpace)
GetAddressSpace() (AddressSpace, bool)
GetResource() Resource
GetProjections() map[string]string
GetOperationParameter(key string) (Addressable, bool)
GetSelectSchemaAndObjectPath() (Schema, string, error)
GetFinalSelectSchemaAndObjectPath() (Schema, string, error)
ProcessResponse(*http.Response) (ProcessedOperationResponse, error) // to be removed
GetSelectItemsKey() string
GetResponseBodySchemaAndMediaType() (Schema, string, error)
GetFinalResponseBodySchemaAndMediaType() (Schema, string, error)
GetRequiredParameters() map[string]Addressable
GetOptionalParameters() map[string]Addressable
GetParameter(paramKey string) (Addressable, bool)
GetUnionRequiredParameters() (map[string]Addressable, error)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
MarshalBody(body interface{}, expectedRequest ExpectedRequest) dto.MarshalledBody
GetRequestBodySchema() (Schema, error)
GetNonBodyParameters() map[string]Addressable
GetRequestBodyAttributesNoRename() (map[string]Addressable, error)
IsAwaitable() bool
DeprecatedProcessResponse(response *http.Response) (map[string]interface{}, error)
GetRequestTranslateAlgorithm() string
IsRequiredRequestBodyProperty(key string) bool
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
IsNullary() bool
ToPresentationMap(extended bool) map[string]interface{}
GetColumnOrder(extended bool) []string
RenameRequestBodyAttribute(string) (string, error)
RevertRequestBodyAttributeRename(string) (string, error)
IsRequestBodyAttributeRenamed(string) bool
GetRequiredNonBodyParameters() map[string]Addressable
ShouldBeSelectable() bool
GetServiceNameForProvider() string
}
type OperationTokens ¶
type OperationTokens interface {
JSONLookup(token string) (interface{}, error)
GetTokenSemantic(key string) (TokenSemantic, bool)
}
type OrderByPushdown ¶
type OrderByPushdown interface {
GetDialect() string
GetParamName() string
GetSyntax() string
GetSupportedColumns() []string
IsColumnSupported(column string) bool
}
OrderByPushdown represents configuration for ORDER BY clause pushdown
type Pagination ¶
type Pagination interface {
JSONLookup(token string) (interface{}, error)
GetRequestToken() TokenSemantic
GetResponseToken() TokenSemantic
}
type ParameterBinding ¶
type ParameterBinding interface {
GetParam() Addressable
GetVal() interface{}
}
type ProcessedOperationResponse ¶
type ProcessedOperationResponse interface {
GetResponse() (response.Response, bool)
GetReversal() (HTTPPreparator, bool)
}
type Provider ¶
type Provider interface {
GetMinStackQLVersion() string
GetProtocolType() (client.ClientProtocolType, error)
GetProtocolTypeString() string
Debug() string
GetAuth() (AuthDTO, bool)
GetDeleteItemsKey() string
GetName() string
GetProviderServices() map[string]ProviderService
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
GetQueryParamPushdown() (QueryParamPushdown, bool)
GetProviderService(key string) (ProviderService, error)
GetRequestTranslateAlgorithm() string
GetResourcesShallow(serviceKey string) (ResourceRegister, error)
GetStackQLConfig() (StackQLConfig, bool)
JSONLookup(token string) (interface{}, error)
MarshalJSON() ([]byte, error)
UnmarshalJSON(data []byte) error
}
type ProviderService ¶
type ProviderService interface {
ITable
GetProvider() (Provider, bool)
GetProtocolType() (client.ClientProtocolType, error)
GetService() (Service, error)
GetRequestTranslateAlgorithm() string
GetResourcesShallow() (ResourceRegister, error)
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetQueryParamPushdown() (QueryParamPushdown, bool)
ConditionIsValid(lhs string, rhs interface{}) bool
GetID() string
GetServiceFragment(resourceKey string) (Service, error)
GetResourcesRefRef() string
PeekServiceFragment(resourceKey string) (Service, bool)
SetServiceRefVal(Service) bool
IsPreferred() bool
GetTitle() string
GetVersion() string
GetDescription() string
GetServiceRefRef() string
}
type QueryParamPushdown ¶
type QueryParamPushdown interface {
JSONLookup(token string) (interface{}, error)
GetSelect() (SelectPushdown, bool)
GetFilter() (FilterPushdown, bool)
GetOrderBy() (OrderByPushdown, bool)
GetTop() (TopPushdown, bool)
GetCount() (CountPushdown, bool)
}
type Relation ¶
type Relation interface {
GetColumns() []Column
GetColumnDescriptors() []ColumnDescriptor
}
type Resource ¶
type Resource interface {
ITable
GetID() string
GetTitle() string
GetDescription() string
GetSelectorAlgorithm() string
GetMethods() Methods
GetRequestTranslateAlgorithm() string
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
GetQueryParamPushdown() (QueryParamPushdown, bool)
FindMethod(key string) (StandardOperationStore, error)
GetFirstMethodFromSQLVerb(sqlVerb string) (StandardOperationStore, string, bool)
GetFirstNamespaceMethodMatchFromSQLVerb(sqlVerb string, parameters map[string]interface{}) (StandardOperationStore, map[string]interface{}, bool)
GetService() (OpenAPIService, bool)
GetProvider() (Provider, bool)
GetViewsForSqlDialect(sqlDialect string) ([]View, bool)
GetMethodsMatched() Methods
ToMap(extended bool) map[string]interface{}
}
type ResourceRegister ¶
type SQLExternalColumn ¶
type SQLExternalTable ¶
type SQLExternalTable interface {
GetCatalogName() string
GetSchemaName() string
GetName() string
GetColumns() []SQLExternalColumn
}
type Schema ¶
type Schema interface {
SetDefaultColName(string)
ConditionIsValid(lhs string, rhs interface{}) bool
DeprecatedProcessHttpResponse(response *http.Response, path string) (map[string]interface{}, error)
FindByPath(path string, visited map[string]bool) Schema
GetAdditionalProperties() (Schema, bool)
GetAllColumns(string) []string
GetItemProperty(k string) (Schema, bool)
GetItems() (Schema, error)
GetItemsSchema() (Schema, error)
GetName() string
GetDescription() string
GetPath() string
GetProperties() (Schemas, error)
GetProperty(propertyKey string) (Schema, bool)
GetSelectionName() string
GetSelectListItems(key string) (Schema, string)
GetTitle() string
GetType() string
GetPropertySchema(key string) (Schema, error)
GetRequired() []string
GetAlias() string
GetSelectSchema(itemsKey, mediaType string) (Schema, string, error)
IsArrayRef() bool
IsBoolean() bool
IsFloat() bool
IsIntegral() bool
IsReadOnly() bool
IsRequired(key string) bool
ProcessHttpResponseTesting(r *http.Response, path string, defaultMediaType string, overrideMediaType string) (response.Response, error)
SetProperties(openapi3.Schemas)
SetType(string)
SetKey(string)
Tabulate(bool, string) Tabulation
ToDescriptionMap(extended bool) map[string]interface{}
GetSchemaAtPath(key string, mediaType string) (Schema, error)
}
type SelectPushdown ¶
type StackQLConfig ¶
type StackQLConfig interface {
GetAuth() (AuthDTO, bool)
GetViewsForSqlDialect(sqlDialect string, viewName string) ([]View, bool)
GetQueryTranspose() (Transform, bool)
GetRequestTranslate() (Transform, bool)
GetRequestBodyTranslate() (Transform, bool)
GetPagination() (Pagination, bool)
GetVariations() (Variations, bool)
GetViews() map[string]View
GetExternalTables() map[string]SQLExternalTable
GetQueryParamPushdown() (QueryParamPushdown, bool)
GetMinStackQLVersion() string
}
type StandardOperationStore ¶
type StandardOperationStore interface {
OperationStore
// Assist analysis
GetSchemaAtPath(key string) (Schema, error)
GetSelectItemsKeySimple() string
LookupSelectItemsKey() string
//
GetRequestBodyMediaType() string
GetRequestBodyMediaTypeNormalised() string
GetXMLDeclaration() string
GetXMLRootAnnotation() string
GetXMLTransform() string
}
type Tabulation ¶
type Tabulation interface {
GetColumns() []ColumnDescriptor
GetSchema() Schema
PushBackColumn(col ColumnDescriptor)
GetName() string
RenameColumnsToXml() Tabulation
}
type TokenSemantic ¶
type TokenSemanticArgs ¶
type TokenSemanticArgs map[string]interface{}
type TokenTransformer ¶
type TokenTransformer func(interface{}) (interface{}, error)
type TopPushdown ¶
TopPushdown represents configuration for LIMIT clause pushdown
type TransformerLocator ¶
type TransformerLocator interface {
GetTransformer(tokenSemantic TokenSemantic) (TokenTransformer, error)
}
type Variations ¶
Click to show internal directories.
Click to hide internal directories.