Documentation
¶
Index ¶
- Constants
- Variables
- func CallFromSignature(cc client.AnySdkClientConfigurator, runtimeCtx dto.RuntimeCtx, ...) (client.AnySdkResponse, error)
- func DefaultLinkHeaderTransformer(input interface{}) (interface{}, error)
- func GetDescribeHeader(extended bool) []string
- func GetMonitorRequest(urlStr string) (client.AnySdkArgList, error)
- func GetProviderDocBytes(prov string, fileRoot string) ([]byte, error)
- func GetResourcesHeader(extended bool) []string
- func GetResourcesRegisterDocBytes(url string, fileRoot string) ([]byte, error)
- func GetServiceDocBytes(url string, fileRoot string) ([]byte, error)
- func GetServicesHeader(extended bool) []string
- func GetTestingQueryParamPushdown() standardQueryParamPushdown
- func GetTestingView() standardViewContainer
- func InterfaceToSQLType(val interface{}) (sqltypes.Value, error)
- func NewAnySdkArgList(argList any) (client.AnySdkArgList, error)
- func NewAnySdkClientConfigurator(rtCtx dto.RuntimeCtx, provName string, defaultClient *http.Client) client.AnySdkClientConfigurator
- func NewAnySdkOpStoreDesignation(method OperationStore) client.AnySdkDesignation
- func NewHttpClientConfiguratorInput(authCtx *dto.AuthCtx, authType string, enforceRevokeFirst bool) client.ClientConfiguratorInput
- func NewwHTTPAnySdkArgList(req *http.Request) client.AnySdkArgList
- func ObtainServerURLsFromServers(svs []*openapi3.Server, vars map[string]string) ([]string, error)
- func ProviderTypeConditionIsValid(providerType string, lhs string, rhs interface{}) bool
- func ResourceConditionIsValid(lhs string, rhs interface{}) bool
- func ResourceKeyExists(key string) bool
- func ServiceConditionIsValid(lhs string, rhs interface{}) bool
- func ServiceKeyExists(key string) bool
- type AddressSpace
- type AddressSpaceExpansionConfig
- type Addressable
- type AuthDTO
- type AuthMetadata
- type BodyMap
- type BodyParamPair
- type Column
- type ColumnDescriptor
- type CountPushdown
- type DiscoveryDoc
- type EncodableString
- type ExecContext
- type ExpectedRequest
- type ExpectedResponse
- type FilterPushdown
- type GraphQL
- type GraphQLElement
- type HTTPArmoury
- type HTTPArmouryParameters
- type HTTPPreparator
- type HTTPPreparatorConfig
- type HttpParameters
- type HttpPreparatorStream
- type ITable
- type LocalSchemaRef
- type MetadataStore
- type MethodAnalysisInput
- type MethodAnalysisOutput
- type MethodAnalyzer
- type MethodSet
- func (ms MethodSet) GetFirst() (StandardOperationStore, string, bool)
- func (ms MethodSet) GetFirstMatch(params map[string]interface{}) (StandardOperationStore, map[string]interface{}, bool)
- func (ms MethodSet) GetFirstNamespaceMatch(params map[string]any) (StandardOperationStore, map[string]any, bool)
- type Methods
- type ObjectWithLineage
- type ObjectWithLineageCollection
- type ObjectWithLineageCollectionConfig
- type ObjectWithoutLineage
- type OpenAPIOperationStoreRef
- type OpenAPIService
- type OperationInverse
- type OperationRef
- func (opr OperationRef) ExtractMethodItem() string
- func (opr OperationRef) ExtractPathItem() string
- func (opr OperationRef) ExtractServiceDocPath() string
- func (opr OperationRef) GetInline() []string
- func (value OperationRef) JSONLookup(token string) (interface{}, error)
- func (value *OperationRef) MarshalJSON() ([]byte, error)
- func (value *OperationRef) UnmarshalJSON(data []byte) error
- func (value *OperationRef) Validate(ctx context.Context) error
- type OperationSelector
- type OperationStore
- type OperationTokens
- type OrderByPushdown
- type Pagination
- type ParamInputStrem
- type ParamMap
- type ParamPair
- type ParameterBinding
- type ParameterSuffixMap
- type Params
- type PathItemRef
- type ProcessedOperationResponse
- type Provider
- type ProviderDescription
- type ProviderInfo
- type ProviderService
- type ProvidersList
- type QueryParamPushdown
- type Registry
- func (r *Registry) ClearProviderCache(providerId string) error
- func (r *Registry) GetDocBytes(docPath string) ([]byte, error)
- func (r *Registry) GetLatestAvailableVersion(providerName string) (string, error)
- func (r *Registry) GetLatestPublishedVersion(providerName string) (string, error)
- func (r *Registry) GetLocalDocRoot() string
- func (r *Registry) GetLocalDocTrunk() string
- func (r *Registry) GetLocalProviderDocPath(prov string, version string) string
- func (r *Registry) GetResourcesRegisterDocBytes(url string) ([]byte, error)
- func (r *Registry) GetResourcesShallowFromProvider(pr Provider, serviceKey string) (ResourceRegister, error)
- func (r *Registry) GetResourcesShallowFromProviderService(pr ProviderService) (ResourceRegister, error)
- func (r *Registry) GetResourcesShallowFromURL(ps ProviderService) (ResourceRegister, error)
- func (r *Registry) GetService(ps ProviderService) (Service, error)
- func (r *Registry) GetServiceDocBytes(url string) ([]byte, error)
- func (r *Registry) GetServiceFragment(ps ProviderService, resourceKey string) (Service, error)
- func (r *Registry) GetServiceFromProviderService(ps ProviderService) (Service, error)
- func (r *Registry) ListAllAvailableProviders() (map[string]ProviderDescription, error)
- func (r *Registry) ListAllProviderVersions(prov string) (map[string]ProviderDescription, error)
- func (r *Registry) ListLocallyAvailableProviders() map[string]ProviderDescription
- func (r *Registry) LoadProviderByName(prov string, version string) (Provider, error)
- func (r *Registry) PullAndPersistProviderArchive(prov string, version string) error
- func (r *Registry) PullProviderArchive(prov string, version string) (io.ReadCloser, error)
- func (r *Registry) RemoveProviderVersion(providerId string, version string) error
- type RegistryAPI
- type RegistryConfig
- type Relation
- type Resource
- type ResourceRegister
- type ResourcesRef
- type ResponseKeys
- type SQLExternalColumn
- type SQLExternalConnection
- type SQLExternalTable
- type Schema
- type Schemas
- type SelectPushdown
- type Service
- func LoadProviderAndServiceFromPaths(provFilePath string, svcFilePath string) (Service, error)
- func LoadServiceDocFromBytes(ps ProviderService, bytes []byte) (Service, error)
- func LoadServiceDocFromFile(ps ProviderService, fileName string) (Service, error)
- func ReadService(b []byte) (Service, error)
- type ServiceRef
- type SimpleMockRegistryRoundTripper
- type StackQLConfig
- type StandardOperationStore
- type StandardTransformerLocator
- type Tabulation
- type TokenSemantic
- type TokenSemanticArgs
- type TokenTransformer
- type TopPushdown
- type Transform
- type TransformerLocator
- type Variations
- type View
- type ViewContainer
Constants ¶
View Source
const ( MethodDescription string = "description" MethodName string = "MethodName" RequiredParams string = "RequiredParams" SQLVerb string = "SQLVerb" )
View Source
const ( LocationRequestBody string = "requestBody" LocationPath string = "path" LocationQuery string = "query" LocationHeader string = "header" LocationCookie string = "cookie" LocationServer string = "server" LocationContext string = "context" )
View Source
const ( ExtensionKeyAlwaysRequired string = "x-alwaysRequired" ExtensionKeyGraphQL string = "x-stackQL-graphQL" ExtensionKeyConfig string = "x-stackQL-config" ExtensionKeyProvider string = "x-stackql-provider" ExtensionKeyResources string = "x-stackQL-resources" ExtensionKeyStringOnly string = "x-stackQL-stringOnly" ExtensionKeyAlias string = "x-stackQL-alias" )
View Source
const ( ODataDialect = "odata" CustomDialect = "custom" DefaultSelectParamName = "$select" DefaultSelectDelimiter = "," DefaultFilterParamName = "$filter" DefaultFilterSyntax = "odata" DefaultOrderByParamName = "$orderby" DefaultOrderBySyntax = "odata" DefaultTopParamName = "$top" DefaultCountParamName = "$count" DefaultCountParamValue = "true" DefaultCountResponseKey = "@odata.count" )
OData default values
View Source
const (
ConfigFilesMode fs.FileMode = 0664
)
View Source
const (
ParamEncodeDelimiter string = "%"
)
View Source
const (
ViewKeyResourceLevelSelect string = "select"
)
Variables ¶
View Source
var ( IgnoreEmbedded bool OpenapiFileRoot string )
View Source
var (
AnonymousColumnName string = defaultAnonymousColumnName
)
Functions ¶
func CallFromSignature ¶
func CallFromSignature( cc client.AnySdkClientConfigurator, runtimeCtx dto.RuntimeCtx, authCtx *dto.AuthCtx, authTypeRequested string, enforceRevokeFirst bool, outErrFile io.Writer, prov Provider, designation client.AnySdkDesignation, argList client.AnySdkArgList, ) (client.AnySdkResponse, error)
func DefaultLinkHeaderTransformer ¶
func DefaultLinkHeaderTransformer(input interface{}) (interface{}, error)
func GetDescribeHeader ¶
func GetMonitorRequest ¶
func GetMonitorRequest(urlStr string) (client.AnySdkArgList, error)
func GetResourcesHeader ¶
func GetServicesHeader ¶
func GetTestingQueryParamPushdown ¶
func GetTestingQueryParamPushdown() standardQueryParamPushdown
GetTestingQueryParamPushdown returns a zero-value struct for testing
func GetTestingView ¶
func GetTestingView() standardViewContainer
func InterfaceToSQLType ¶
func NewAnySdkArgList ¶
func NewAnySdkArgList(argList any) (client.AnySdkArgList, error)
func NewAnySdkClientConfigurator ¶
func NewAnySdkClientConfigurator( rtCtx dto.RuntimeCtx, provName string, defaultClient *http.Client, ) client.AnySdkClientConfigurator
func NewAnySdkOpStoreDesignation ¶
func NewAnySdkOpStoreDesignation(method OperationStore) client.AnySdkDesignation
func NewwHTTPAnySdkArgList ¶
func NewwHTTPAnySdkArgList(req *http.Request) client.AnySdkArgList
func ResourceKeyExists ¶
func ServiceConditionIsValid ¶
func ServiceKeyExists ¶
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 Addressable interface {
ConditionIsValid(lhs string, rhs interface{}) bool
GetLocation() string
GetName() string
GetAlias() string
GetSchema() (Schema, bool)
GetType() string
IsRequired() bool
}
func NewOptionalAddressableRequestBodyProperty ¶
func NewOptionalAddressableRequestBodyProperty(name string, s Schema) Addressable
func NewParameter ¶
func NewParameter(param *openapi3.Parameter, svc OpenAPIService) Addressable
func NewRequiredAddressableRequestBodyProperty ¶
func NewRequiredAddressableRequestBodyProperty(name string, s Schema) 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 AuthMetadata ¶
type AuthMetadata struct {
Principal string `json:"principal"`
Type string `json:"type"`
Source string `json:"source"`
}
func (*AuthMetadata) GetHeaders ¶
func (am *AuthMetadata) GetHeaders() []string
func (*AuthMetadata) ToMap ¶
func (am *AuthMetadata) ToMap() map[string]interface{}
type BodyParamPair ¶
type BodyParamPair interface {
GetKey() string
GetVal() interface{}
}
type ColumnDescriptor ¶
type CountPushdown ¶
type CountPushdown interface {
GetDialect() string
GetParamName() string
GetParamValue() string
GetResponseKey() string
}
CountPushdown represents configuration for SELECT COUNT(*) pushdown
type DiscoveryDoc ¶
type DiscoveryDoc interface {
// contains filtered or unexported methods
}
type EncodableString ¶
type EncodableString string
type ExecContext ¶
type ExecContext interface {
GetExecPayload() internaldto.ExecPayload
GetResource() Resource
}
func NewExecContext ¶
func NewExecContext(payload internaldto.ExecPayload, rsc Resource) ExecContext
type ExpectedRequest ¶
type ExpectedResponse ¶
type ExpectedResponse interface {
GetBodyMediaType() string
GetOverrrideBodyMediaType() string
GetOpenAPIDocKey() string
GetObjectKey() string
GetSchema() Schema
GetProjectionMap() map[string]string
GetProjection(string) (string, bool)
GetTransform() (Transform, bool)
// contains filtered or unexported methods
}
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)
}
func NewHTTPArmoury ¶
func NewHTTPArmoury() HTTPArmoury
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)
}
func NewHTTPArmouryParameters ¶
func NewHTTPArmouryParameters() HTTPArmouryParameters
type HTTPPreparator ¶
type HTTPPreparator interface {
BuildHTTPRequestCtx(HTTPPreparatorConfig) (HTTPArmoury, error)
}
func NewHTTPPreparator ¶
func NewHTTPPreparator( prov Provider, svc Service, m OperationStore, paramMap map[int]map[string]interface{}, parameters streaming.MapStream, execContext ExecContext, logger *logrus.Logger, ) HTTPPreparator
type HTTPPreparatorConfig ¶
type HTTPPreparatorConfig interface {
IsFromAnnotation() bool
}
func NewHTTPPreparatorConfig ¶
func NewHTTPPreparatorConfig(isFromAnnotation bool) HTTPPreparatorConfig
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)
}
func NewHttpParameters ¶
func NewHttpParameters(method StandardOperationStore) HttpParameters
type HttpPreparatorStream ¶
type HttpPreparatorStream interface {
Write(HTTPPreparator) error
Next() (HTTPPreparator, bool)
}
func NewHttpPreparatorStream ¶
func NewHttpPreparatorStream() HttpPreparatorStream
type LocalSchemaRef ¶
type LocalSchemaRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *standardSchema
}
type MetadataStore ¶
type MetadataStore struct {
Store map[string]OpenAPIService
}
func (*MetadataStore) GetResource ¶
func (ms *MetadataStore) GetResource(serviceName string, resourceName string) (Resource, error)
func (*MetadataStore) GetResources ¶
func (ms *MetadataStore) GetResources(serviceName string) (map[string]Resource, error)
func (*MetadataStore) GetServices ¶
func (ms *MetadataStore) GetServices() ([]OpenAPIService, error)
type MethodAnalysisInput ¶
type MethodAnalysisInput interface {
GetService() Service
GetMethod() OperationStore
IsAwait() bool
IsNilResponseAllowed() bool
GetColumns() []ColumnDescriptor
}
func NewMethodAnalysisInput ¶
func NewMethodAnalysisInput( method OperationStore, service Service, isNilResponseAllowed bool, columns []ColumnDescriptor, isAwait bool, ) MethodAnalysisInput
type MethodAnalysisOutput ¶
type MethodAnalysisOutput interface {
GetMethod() OperationStore
GetSelectItemsKey() string
GetInsertTabulation() Tabulation
GetSelectTabulation() Tabulation
GetColumns() []ColumnDescriptor
GetStarColumns() (Schemas, error)
GetOrderedStarColumnsNames() ([]string, error)
GetItemSchema() (Schema, bool)
GetResponseSchema() (Schema, bool)
IsNilResponseAllowed() bool
IsAwait() bool
}
type MethodAnalyzer ¶
type MethodAnalyzer interface {
AnalyzeUnaryAction(MethodAnalysisInput) (MethodAnalysisOutput, error)
}
func NewMethodAnalyzer ¶
func NewMethodAnalyzer() MethodAnalyzer
type MethodSet ¶
type MethodSet []StandardOperationStore
func (MethodSet) GetFirstMatch ¶
func (ms MethodSet) GetFirstMatch(params map[string]interface{}) (StandardOperationStore, map[string]interface{}, bool)
func (MethodSet) GetFirstNamespaceMatch ¶
type Methods ¶
type Methods map[string]standardOpenAPIOperationStore
func (Methods) FindFromSelector ¶
func (ms Methods) FindFromSelector(sel OperationSelector) (StandardOperationStore, error)
func (Methods) FindMethod ¶
func (ms Methods) FindMethod(key string) (StandardOperationStore, error)
func (Methods) OrderMethods ¶
func (ms Methods) OrderMethods() ([]StandardOperationStore, error)
type ObjectWithLineage ¶
type ObjectWithLineage interface {
ObjectWithoutLineage
GetParentKey() string
}
type ObjectWithLineageCollection ¶
type ObjectWithLineageCollection interface {
Merge() error
GetFlatObjects() []ObjectWithoutLineage
PushBack(ObjectWithLineage)
}
type ObjectWithoutLineage ¶
type ObjectWithoutLineage interface {
GetKey() string
GetValue() interface{}
}
type OpenAPIOperationStoreRef ¶
type OpenAPIOperationStoreRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *standardOpenAPIOperationStore
}
func (OpenAPIOperationStoreRef) JSONLookup ¶
func (value OpenAPIOperationStoreRef) JSONLookup(token string) (interface{}, error)
func (*OpenAPIOperationStoreRef) MarshalJSON ¶
func (value *OpenAPIOperationStoreRef) MarshalJSON() ([]byte, error)
func (*OpenAPIOperationStoreRef) UnmarshalJSON ¶
func (value *OpenAPIOperationStoreRef) UnmarshalJSON(data []byte) error
type OpenAPIService ¶
type OpenAPIService interface {
Service
GetT() *openapi3.T
// contains filtered or unexported methods
}
func LoadServiceSubsetDocFromBytes ¶
func LoadServiceSubsetDocFromBytes(rr ResourceRegister, resourceKey string, bytes []byte) (OpenAPIService, error)
func NewService ¶
func NewService(t *openapi3.T) OpenAPIService
type OperationInverse ¶
type OperationInverse interface {
JSONLookup(token string) (interface{}, error)
GetOperationStore() (StandardOperationStore, bool)
GetTokens() (OperationTokens, bool)
GetParamMap(response.Response) (map[string]interface{}, error)
}
type OperationRef ¶
type OperationRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *openapi3.Operation
Inline []string `json:"inline" yaml:"inline"`
}
func (OperationRef) ExtractMethodItem ¶
func (opr OperationRef) ExtractMethodItem() string
func (OperationRef) ExtractPathItem ¶
func (opr OperationRef) ExtractPathItem() string
func (OperationRef) ExtractServiceDocPath ¶
func (opr OperationRef) ExtractServiceDocPath() string
func (OperationRef) GetInline ¶
func (opr OperationRef) GetInline() []string
func (OperationRef) JSONLookup ¶
func (value OperationRef) JSONLookup(token string) (interface{}, error)
func (*OperationRef) MarshalJSON ¶
func (value *OperationRef) MarshalJSON() ([]byte, error)
func (*OperationRef) UnmarshalJSON ¶
func (value *OperationRef) UnmarshalJSON(data []byte) error
type OperationSelector ¶
func NewOperationSelector ¶
func NewOperationSelector(slqVerb string, params map[string]interface{}) 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
GetPathItem() *openapi3.PathItem
GetAPIMethod() string
GetInline() []string
GetOperationRef() *OperationRef
GetPathRef() *PathItemRef
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
// contains filtered or unexported methods
}
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 ParamInputStrem ¶
type ParamInputStrem interface {
Read() ([]HttpParameters, error)
}
func NewStandardParamInputStrem ¶
func NewStandardParamInputStrem() ParamInputStrem
type ParamMap ¶
type ParamMap map[string]ParameterBinding
type ParamPair ¶
type ParamPair interface {
GetKey() string
GetParamBinding() ParameterBinding
}
type ParameterBinding ¶
type ParameterBinding interface {
GetParam() Addressable
GetVal() interface{}
}
func NewParameterBinding ¶
func NewParameterBinding(param Addressable, val interface{}) ParameterBinding
type ParameterSuffixMap ¶
type ParameterSuffixMap struct {
// contains filtered or unexported fields
}
func MakeSuffixMapFromParameterMap ¶
func MakeSuffixMapFromParameterMap(m map[string]Addressable) *ParameterSuffixMap
func NewParameterSuffixMap ¶
func NewParameterSuffixMap() *ParameterSuffixMap
func (*ParameterSuffixMap) Delete ¶
func (psm *ParameterSuffixMap) Delete(k string) bool
func (*ParameterSuffixMap) Get ¶
func (psm *ParameterSuffixMap) Get(k string) (Addressable, bool)
func (*ParameterSuffixMap) GetAll ¶
func (psm *ParameterSuffixMap) GetAll() map[string]Addressable
func (*ParameterSuffixMap) Put ¶
func (psm *ParameterSuffixMap) Put(k string, v Addressable)
func (*ParameterSuffixMap) Size ¶
func (psm *ParameterSuffixMap) Size() int
type Params ¶
type Params interface {
GetParameter(key string) (Addressable, bool)
}
func NewParameters ¶
func NewParameters(params openapi3.Parameters, svc OpenAPIService) Params
type PathItemRef ¶
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
// contains filtered or unexported methods
}
func LoadProviderByName ¶
func LoadProviderDocFromFile ¶
func NewProvider ¶
type ProviderDescription ¶
type ProviderDescription struct {
Versions []string `json:"versions" yaml: "versions"`
// contains filtered or unexported fields
}
func (ProviderDescription) GetLatestVersion ¶
func (pd ProviderDescription) GetLatestVersion() (string, error)
type ProviderInfo ¶
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
// contains filtered or unexported methods
}
func NewEmptyProviderService ¶
func NewEmptyProviderService() ProviderService
type ProvidersList ¶
type ProvidersList struct {
Providers map[string]ProviderDescription `json:"providers" yaml: "providers"`
// contains filtered or unexported fields
}
func NewProvidersList ¶
func NewProvidersList() ProvidersList
func (ProvidersList) GetLatestList ¶
func (pl ProvidersList) GetLatestList() (ProvidersList, error)
func (ProvidersList) GetSingleProviderList ¶
func (pl ProvidersList) GetSingleProviderList(prov string) ProvidersList
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)
}
QueryParamPushdown represents the top-level configuration for query parameter pushdown
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) ClearProviderCache ¶
ClearProviderCache clears the cache for a specific provider e.g) ClearProviderCache("aws")
func (*Registry) GetLatestAvailableVersion ¶
func (*Registry) GetLatestPublishedVersion ¶
func (*Registry) GetLocalDocRoot ¶
func (*Registry) GetLocalDocTrunk ¶
func (*Registry) GetLocalProviderDocPath ¶
func (*Registry) GetResourcesRegisterDocBytes ¶
func (*Registry) GetResourcesShallowFromProvider ¶
func (r *Registry) GetResourcesShallowFromProvider(pr Provider, serviceKey string) (ResourceRegister, error)
func (*Registry) GetResourcesShallowFromProviderService ¶
func (r *Registry) GetResourcesShallowFromProviderService(pr ProviderService) (ResourceRegister, error)
func (*Registry) GetResourcesShallowFromURL ¶
func (r *Registry) GetResourcesShallowFromURL(ps ProviderService) (ResourceRegister, error)
func (*Registry) GetService ¶
func (r *Registry) GetService(ps ProviderService) (Service, error)
func (*Registry) GetServiceDocBytes ¶
func (*Registry) GetServiceFragment ¶
func (r *Registry) GetServiceFragment(ps ProviderService, resourceKey string) (Service, error)
func (*Registry) GetServiceFromProviderService ¶
func (r *Registry) GetServiceFromProviderService(ps ProviderService) (Service, error)
func (*Registry) ListAllAvailableProviders ¶
func (r *Registry) ListAllAvailableProviders() (map[string]ProviderDescription, error)
func (*Registry) ListAllProviderVersions ¶
func (r *Registry) ListAllProviderVersions(prov string) (map[string]ProviderDescription, error)
func (*Registry) ListLocallyAvailableProviders ¶
func (r *Registry) ListLocallyAvailableProviders() map[string]ProviderDescription
func (*Registry) LoadProviderByName ¶
func (*Registry) PullAndPersistProviderArchive ¶
func (*Registry) PullProviderArchive ¶
type RegistryAPI ¶
type RegistryAPI interface {
PullAndPersistProviderArchive(string, string) error
PullProviderArchive(string, string) (io.ReadCloser, error)
ListAllAvailableProviders() (map[string]ProviderDescription, error)
ListAllProviderVersions(string) (map[string]ProviderDescription, error)
ListLocallyAvailableProviders() map[string]ProviderDescription
GetDocBytes(string) ([]byte, error)
GetLatestAvailableVersion(string) (string, error)
GetLatestPublishedVersion(string) (string, error)
GetResourcesShallowFromProvider(Provider, string) (ResourceRegister, error)
GetResourcesShallowFromProviderService(ProviderService) (ResourceRegister, error)
GetResourcesShallowFromURL(ps ProviderService) (ResourceRegister, error)
GetService(ps ProviderService) (Service, error)
GetServiceFragment(ProviderService, string) (Service, error)
GetServiceFromProviderService(ProviderService) (Service, error)
GetServiceDocBytes(string) ([]byte, error)
GetResourcesRegisterDocBytes(string) ([]byte, error)
LoadProviderByName(string, string) (Provider, error)
RemoveProviderVersion(string, string) error
ClearProviderCache(string) error
GetLocalDocRoot() string
GetLocalDocTrunk() string
GetLocalProviderDocPath(prov string, version string) string
}
func GetMockLocalRegistry ¶
func GetMockLocalRegistry(vc RegistryConfig) (RegistryAPI, error)
func GetMockRegistry ¶
func GetMockRegistry(vc RegistryConfig) (RegistryAPI, error)
func NewRegistry ¶
func NewRegistry(registryCfg RegistryConfig, transport http.RoundTripper) (RegistryAPI, error)
type RegistryConfig ¶
type RegistryConfig struct {
RegistryURL string `json:"url" yaml:"url"`
SrcPrefix *string `json:"srcPrefix" yaml:"srcPrefix"`
DistPrefix *string `json:"distPrefix" yaml:"distPrefix"`
AllowSrcDownload bool `json:"allowSrcDownload" yaml:"allowSrcDownload"`
LocalDocRoot string `json:"localDocRoot" yaml:"localDocRoot"`
VerifyConfig *edcrypto.VerifierConfig `json:"verifyConfig" yaml:"verifyConfig"`
}
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
GetServiceDocPath() *ServiceRef
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{}
SetProvider(p Provider)
SetService(s OpenAPIService)
SetProviderService(ps ProviderService)
// contains filtered or unexported methods
}
func NewEmptyResource ¶
func NewEmptyResource() Resource
type ResourceRegister ¶
type ResourceRegister interface {
//
GetServiceDocPath() *ServiceRef
ObtainServiceDocUrl(resourceKey string) string
SetProviderService(ps ProviderService)
SetProvider(p Provider)
GetResources() map[string]Resource
GetResource(string) (Resource, bool)
// contains filtered or unexported methods
}
func LoadResourcesShallow ¶
func LoadResourcesShallow(ps ProviderService, bt []byte) (ResourceRegister, error)
func NewResourceRegister ¶
func NewResourceRegister() ResourceRegister
type ResourcesRef ¶
type ResourcesRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *standardResourceRegister
}
type ResponseKeys ¶
type SQLExternalColumn ¶
type SQLExternalConnection ¶
type SQLExternalConnection interface {
GetConnectionName() string
GetTables() map[string]SQLExternalTable
}
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{}
GetXMLALiasOrName() string
ExtractMediaTypeSynonym(mediaType string) string
GetSchemaAtPath(key string, mediaType string) (Schema, error)
// contains filtered or unexported methods
}
func NewStringSchema ¶
func NewStringSchema(svc OpenAPIService, key string, path string) Schema
type SelectPushdown ¶
type SelectPushdown interface {
GetDialect() string
GetParamName() string
GetDelimiter() string
GetSupportedColumns() []string
IsColumnSupported(column string) bool
}
SelectPushdown represents configuration for SELECT clause column projection pushdown
type Service ¶
type Service interface {
IsPreferred() bool
GetServers() (openapi3.Servers, bool) // Difficult to remove, not impossible.
GetResources() (map[string]Resource, error)
GetName() string
GetResource(resourceName string) (Resource, error)
GetSchema(key string) (Schema, error)
// contains filtered or unexported methods
}
func LoadServiceDocFromBytes ¶
func LoadServiceDocFromBytes(ps ProviderService, bytes []byte) (Service, error)
func LoadServiceDocFromFile ¶
func LoadServiceDocFromFile(ps ProviderService, fileName string) (Service, error)
func ReadService ¶
type ServiceRef ¶
type ServiceRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *standardService
}
type SimpleMockRegistryRoundTripper ¶
type SimpleMockRegistryRoundTripper struct {
// contains filtered or unexported fields
}
func NewSimpleMockRegistryRoundTripper ¶
func NewSimpleMockRegistryRoundTripper(fileRoot string, registryRoot *url.URL) *SimpleMockRegistryRoundTripper
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
// contains filtered or unexported methods
}
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
// contains filtered or unexported methods
}
func NewEmptyOperationStore ¶
func NewEmptyOperationStore() StandardOperationStore
type StandardTransformerLocator ¶
type StandardTransformerLocator struct{}
func (*StandardTransformerLocator) GetTransformer ¶
func (stl *StandardTransformerLocator) GetTransformer(tokenSemantic TokenSemantic) (TokenTransformer, error)
type Tabulation ¶
type Tabulation interface {
GetColumns() []ColumnDescriptor
GetSchema() Schema
PushBackColumn(col ColumnDescriptor)
GetName() string
RenameColumnsToXml() Tabulation
}
func GetTabulation ¶
func GetTabulation(name, arrayType string) Tabulation
type TokenSemantic ¶
type TokenSemanticArgs ¶
type TokenSemanticArgs map[string]interface{}
func (TokenSemanticArgs) GetRegex ¶
func (tsa TokenSemanticArgs) GetRegex() (string, bool)
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)
}
func NewStandardTransformerLocator ¶
func NewStandardTransformerLocator() TransformerLocator
type Variations ¶
type ViewContainer ¶
Source Files
¶
- address_space.go
- addressable.go
- auth_dto.go
- client.go
- concerted_action.go
- config.go
- const.go
- exec_context.go
- expectedRequest.go
- expectedResponse.go
- graphql.go
- http.go
- http_armoury.go
- http_armoury_params.go
- http_preparator_stream.go
- loader.go
- metadata.go
- methodSet.go
- methods.go
- mock_http.go
- operationSelector.go
- operation_inverse.go
- operation_store.go
- pagination.go
- param_stream.go
- params.go
- provider.go
- providerService.go
- query_param_pushdown.go
- refs.go
- registry.go
- request.go
- resource.go
- resourceRegister.go
- schema.go
- server.go
- service.go
- shims.go
- sql_external.go
- sqltypeutil.go
- suffix.go
- table.go
- token_semantic.go
- transform.go
- variations.go
- view.go
Click to show internal directories.
Click to hide internal directories.