Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultLinkHeaderTransformer(input interface{}) (interface{}, error)
- func DefaultRequestBodyAttributeRename(k string) string
- func GetDescribeHeader(extended bool) []string
- func GetProviderDocBytes(prov string) ([]byte, error)
- func GetResourcesHeader(extended bool) []string
- func GetResourcesRegisterDocBytes(url string) ([]byte, error)
- func GetServiceDocBytes(url string) ([]byte, error)
- func GetServicesHeader(extended bool) []string
- func InterfaceToSQLType(val interface{}) (sqltypes.Value, error)
- 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 Addressable
- type AuthDTO
- type AuthMetadata
- type BodyMap
- type BodyParamPair
- type ColumnDescriptor
- type DiscoveryDoc
- type EncodableString
- type ExpectedRequest
- type ExpectedResponse
- type GraphQL
- type GraphQLElement
- type HttpParameters
- func (hp *HttpParameters) Encode() string
- func (hp *HttpParameters) GetParameter(paramName, paramIn string) (*ParameterBinding, bool)
- func (hp *HttpParameters) GetRemainingQueryParamsFlatMap(keysRemaining map[string]interface{}) (map[string]interface{}, error)
- func (hp *HttpParameters) GetServerParameterFlatMap() (map[string]interface{}, error)
- func (hp *HttpParameters) IngestMap(m map[string]interface{}) error
- func (hp *HttpParameters) StoreParameter(param Addressable, val interface{})
- func (hp *HttpParameters) ToFlatMap() (map[string]interface{}, error)
- type ITable
- type Loader
- type MetadataStore
- type MethodSet
- type Methods
- type NamedSchema
- type OperationRef
- func (opr OperationRef) ExtractMethodItem() string
- func (opr OperationRef) ExtractPathItem() string
- func (opr OperationRef) ExtractServiceDocPath() 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
- func (op *OperationStore) DeprecatedProcessResponse(response *http.Response) (map[string]interface{}, error)
- func (m *OperationStore) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
- func (m *OperationStore) GetColumnOrder(extended bool) []string
- func (m *OperationStore) GetKey(lhs string) (interface{}, error)
- func (m *OperationStore) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
- func (m *OperationStore) GetName() string
- func (m *OperationStore) GetNonBodyParameters() map[string]Addressable
- func (op *OperationStore) GetOperationParameter(key string) (*Parameter, bool)
- func (op *OperationStore) GetOperationParameters() Parameters
- func (op *OperationStore) GetOptimalResponseMediaType() string
- func (m *OperationStore) GetOptionalParameters() map[string]Addressable
- func (op *OperationStore) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
- func (op *OperationStore) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
- func (m *OperationStore) GetParameter(paramKey string) (Addressable, bool)
- func (op *OperationStore) GetParameterizedPath() string
- func (m *OperationStore) GetParameters() map[string]Addressable
- func (op *OperationStore) GetQueryTransposeAlgorithm() string
- func (op *OperationStore) GetRequestBodyRequiredProperties() ([]string, error)
- func (op *OperationStore) GetRequestBodySchema() (Schema, error)
- func (op *OperationStore) GetRequestTranslateAlgorithm() string
- func (m *OperationStore) GetRequiredParameters() map[string]Addressable
- func (op *OperationStore) GetResponseBodySchemaAndMediaType() (Schema, string, error)
- func (m *OperationStore) GetSelectItemsKey() string
- func (op *OperationStore) GetSelectSchemaAndObjectPath() (Schema, string, error)
- func (m *OperationStore) GetUnionRequiredParameters() (map[string]Addressable, error)
- func (op *OperationStore) GetViewBodyDDLForSQLDialect(sqlDialect string) (string, bool)
- func (m *OperationStore) IsAwaitable() bool
- func (op *OperationStore) IsNullary() bool
- func (op *OperationStore) IsRequiredRequestBodyProperty(key string) bool
- func (m *OperationStore) KeyExists(lhs string) bool
- func (op *OperationStore) MarshalBody(body interface{}, expectedRequest *ExpectedRequest) ([]byte, error)
- func (op *OperationStore) ParameterMatch(params map[string]interface{}) (map[string]interface{}, bool)
- func (op *OperationStore) Parameterize(prov *Provider, parentDoc *Service, inputParams *HttpParameters, ...) (*openapi3filter.RequestValidationInput, error)
- func (op *OperationStore) ProcessResponse(response *http.Response) (*response.Response, error)
- func (m *OperationStore) ToPresentationMap(extended bool) map[string]interface{}
- type OperationStoreRef
- type Pagination
- type ParamMap
- type ParamPair
- type Parameter
- type ParameterBinding
- type ParameterSuffixMap
- type Parameters
- type PathItemRef
- type Provider
- func (pr *Provider) Debug() string
- func (pr *Provider) GetAuth() (*AuthDTO, bool)
- func (pr *Provider) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
- func (pr *Provider) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
- func (pr *Provider) GetProviderService(key string) (*ProviderService, error)
- func (pr *Provider) GetQueryTransposeAlgorithm() string
- func (pr *Provider) GetRequestTranslateAlgorithm() string
- func (pr *Provider) GetResourcesShallow(serviceKey string) (*ResourceRegister, error)
- func (pr *Provider) GetService(key string) (*Service, error)
- func (prov Provider) JSONLookup(token string) (interface{}, error)
- func (pr *Provider) MarshalJSON() ([]byte, error)
- func (pr *Provider) ToJson() ([]byte, error)
- func (pr *Provider) ToYaml() ([]byte, error)
- func (pr *Provider) ToYamlFile(filePath string) error
- func (pr *Provider) UnmarshalJSON(data []byte) error
- type ProviderDescription
- type ProviderInfo
- type ProviderService
- func (sv *ProviderService) ConditionIsValid(lhs string, rhs interface{}) bool
- func (ps *ProviderService) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
- func (ps *ProviderService) GetKey(lhs string) (interface{}, error)
- func (ps *ProviderService) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
- func (ps *ProviderService) GetName() string
- func (sv *ProviderService) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
- func (sv *ProviderService) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
- func (sv *ProviderService) GetQueryTransposeAlgorithm() string
- func (sv *ProviderService) GetRequestTranslateAlgorithm() string
- func (ps *ProviderService) GetRequiredParameters() map[string]Addressable
- func (ps *ProviderService) GetResourcesShallow() (*ResourceRegister, error)
- func (ps *ProviderService) GetService() (*Service, error)
- func (ps *ProviderService) GetServiceFragment(resourceKey string) (*Service, error)
- func (ps *ProviderService) KeyExists(lhs string) bool
- func (pr *ProviderService) MarshalJSON() ([]byte, error)
- func (ps *ProviderService) PeekServiceFragment(resourceKey string) (*Service, bool)
- func (ps *ProviderService) ToMap() map[string]interface{}
- func (pr *ProviderService) UnmarshalJSON(data []byte) error
- type ProvidersList
- type Registry
- 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) 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)
- type RegistryAPI
- type RegistryConfig
- type Resource
- func (r *Resource) ConditionIsValid(lhs string, rhs interface{}) bool
- func (r *Resource) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
- func (r *Resource) FindMethod(key string) (*OperationStore, error)
- func (rs *Resource) FindOperationStore(sel OperationSelector) (*OperationStore, error)
- func (rs *Resource) GetDefaultMethodKeysForSQLVerb(sqlVerb string) []string
- func (rs *Resource) GetFirstMethodFromSQLVerb(sqlVerb string) (*OperationStore, string, bool)
- func (rs *Resource) GetFirstMethodMatchFromSQLVerb(sqlVerb string, parameters map[string]interface{}) (*OperationStore, map[string]interface{}, bool)
- func (rs *Resource) GetKey(lhs string) (interface{}, error)
- func (rs *Resource) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
- func (rs *Resource) GetMethodsMatched() Methods
- func (rs *Resource) GetName() string
- func (r *Resource) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
- func (r *Resource) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
- func (r *Resource) GetQueryTransposeAlgorithm() string
- func (r *Resource) GetRequestTranslateAlgorithm() string
- func (rs *Resource) GetRequiredParameters() map[string]Addressable
- func (rs *Resource) GetSelectableObject() string
- func (r *Resource) GetViewBodyDDLForSQLDialect(sqlDialect string) (string, bool)
- func (rsc Resource) JSONLookup(token string) (interface{}, error)
- func (rs *Resource) KeyExists(lhs string) bool
- func (rs *Resource) ToMap(extended bool) map[string]interface{}
- type ResourceRegister
- type ResourcesRef
- type ResponseKeys
- type SQLExternalColumn
- type SQLExternalConnection
- type SQLExternalTable
- type Schema
- type Schemas
- type Service
- func LoadServiceDocFromBytes(ps *ProviderService, bytes []byte) (*Service, error)
- func LoadServiceDocFromFile(ps *ProviderService, fileName string) (*Service, error)
- func LoadServiceSubsetDocFromBytes(rr *ResourceRegister, resourceKey string, bytes []byte) (*Service, error)
- func NewService(t *openapi3.T) *Service
- func (sv *Service) ConditionIsValid(lhs string, rhs interface{}) bool
- func (sv *Service) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
- func (sv *Service) GetKey(lhs string) (interface{}, error)
- func (sv *Service) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
- func (svc *Service) GetName() string
- func (svc *Service) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
- func (svc *Service) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
- func (svc *Service) GetQueryTransposeAlgorithm() string
- func (svc *Service) GetRequestTranslateAlgorithm() string
- func (rs *Service) GetRequiredParameters() map[string]Addressable
- func (svc *Service) GetResource(resourceName string) (*Resource, error)
- func (svc *Service) GetResources() (map[string]*Resource, error)
- func (svc *Service) GetSchema(key string) (Schema, error)
- func (svc *Service) GetSchemas() (map[string]Schema, error)
- func (sv *Service) GetT() *openapi3.T
- func (svc *Service) IsPreferred() bool
- func (sv *Service) KeyExists(lhs string) bool
- func (svc *Service) ToJson() ([]byte, error)
- func (svc *Service) ToMap() map[string]interface{}
- func (svc *Service) ToYaml() ([]byte, error)
- func (svc *Service) ToYamlFile(filePath string) error
- type ServiceRef
- type SimpleMockRegistryRoundTripper
- type StackQLConfig
- func (cfg *StackQLConfig) GetAuth() (*AuthDTO, bool)
- func (cfg *StackQLConfig) GetView(viewName string) (*View, bool)
- func (cfg *StackQLConfig) GetViewBodyDDLForSQLDialect(sqlDialect string, viewName string) (string, bool)
- func (cfg *StackQLConfig) GetViews(viewName string) (*View, bool)
- func (qt StackQLConfig) JSONLookup(token string) (interface{}, error)
- type StandardTransformerLocator
- type Tabulation
- type TokenSemantic
- type TokenSemanticArgs
- type TokenTransformer
- type Transform
- type TransformerLocator
- type Variations
- type View
Constants ¶
View Source
const ( MethodDescription string = "description" MethodName string = "MethodName" RequiredParams string = "RequiredParams" SQLVerb string = "SQLVerb" )
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" )
View Source
const ( RequestBodyKeyPrefix string = "data" RequestBodyKeyDelimiter string = "__" RequestBodyBaseKey string = RequestBodyKeyPrefix + RequestBodyKeyDelimiter )
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 DefaultLinkHeaderTransformer ¶
func DefaultLinkHeaderTransformer(input interface{}) (interface{}, error)
func GetDescribeHeader ¶
func GetProviderDocBytes ¶
func GetResourcesHeader ¶
func GetServiceDocBytes ¶
func GetServicesHeader ¶
func InterfaceToSQLType ¶
func ResourceKeyExists ¶
func ServiceConditionIsValid ¶
func ServiceKeyExists ¶
Types ¶
type Addressable ¶
type Addressable interface {
ConditionIsValid(lhs string, rhs interface{}) bool
GetLocation() string
GetName() string
GetSchema() (Schema, bool)
GetType() string
IsRequired() bool
}
func NewOptionalAddressableRequestBodyProperty ¶
func NewOptionalAddressableRequestBodyProperty(name string, s Schema) Addressable
func NewRequiredAddressableRequestBodyProperty ¶
func NewRequiredAddressableRequestBodyProperty(name string, s Schema) Addressable
type AuthDTO ¶
type AuthDTO struct {
Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"`
Type string `json:"type" yaml:"type"`
ValuePrefix string `json:"valuePrefix" yaml:"valuePrefix"`
KeyID string `json:"keyID" yaml:"keyID"`
KeyIDEnvVar string `json:"keyIDenvvar" yaml:"keyIDenvvar"`
KeyFilePath string `json:"credentialsfilepath" yaml:"credentialsfilepath"`
KeyEnvVar string `json:"credentialsenvvar" yaml:"credentialsenvvar"`
}
func (AuthDTO) JSONLookup ¶
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 struct {
Key string
Val interface{}
}
type ColumnDescriptor ¶
type ColumnDescriptor struct {
Alias string
Name string
Qualifier string
Schema Schema
DecoratedCol string
Val *sqlparser.SQLVal
Node sqlparser.SQLNode
}
func NewColumnDescriptor ¶
func (ColumnDescriptor) GetIdentifier ¶
func (cd ColumnDescriptor) GetIdentifier() string
func (ColumnDescriptor) GetRepresentativeSchema ¶
func (cd ColumnDescriptor) GetRepresentativeSchema() Schema
type DiscoveryDoc ¶
type DiscoveryDoc interface {
// contains filtered or unexported methods
}
type EncodableString ¶
type EncodableString string
type ExpectedRequest ¶
type ExpectedResponse ¶
type GraphQL ¶
type GraphQL struct {
ID string `json:"id" yaml:"id"`
Query string `json:"query,omitempty" yaml:"query,omitempty"` // Required
Cursor GraphQLElement `json:"cursor,omitempty" yaml:"cursor,omitempty"`
ReponseSelection GraphQLElement `json:"responseSelection,omitempty" yaml:"responseSelection,omitempty"`
URL string `json:"url" yaml:"url"`
HTTPVerb string `json:"httpVerb" yaml:"httpVerb"`
}
func (*GraphQL) GetCursorJSONPath ¶
func (*GraphQL) GetResponseJSONPath ¶
func (GraphQL) JSONLookup ¶
type GraphQLElement ¶
type GraphQLElement map[string]interface{}
type HttpParameters ¶
type HttpParameters struct {
CookieParams ParamMap
HeaderParams ParamMap
PathParams ParamMap
QueryParams ParamMap
RequestBody BodyMap
ResponseBody BodyMap
ServerParams ParamMap
Unassigned ParamMap
Region EncodableString
// contains filtered or unexported fields
}
func NewHttpParameters ¶
func NewHttpParameters(method *OperationStore) *HttpParameters
func (*HttpParameters) Encode ¶
func (hp *HttpParameters) Encode() string
func (*HttpParameters) GetParameter ¶
func (hp *HttpParameters) GetParameter(paramName, paramIn string) (*ParameterBinding, bool)
func (*HttpParameters) GetRemainingQueryParamsFlatMap ¶
func (hp *HttpParameters) GetRemainingQueryParamsFlatMap(keysRemaining map[string]interface{}) (map[string]interface{}, error)
func (*HttpParameters) GetServerParameterFlatMap ¶
func (hp *HttpParameters) GetServerParameterFlatMap() (map[string]interface{}, error)
func (*HttpParameters) IngestMap ¶
func (hp *HttpParameters) IngestMap(m map[string]interface{}) error
func (*HttpParameters) StoreParameter ¶
func (hp *HttpParameters) StoreParameter(param Addressable, val interface{})
func (*HttpParameters) ToFlatMap ¶
func (hp *HttpParameters) ToFlatMap() (map[string]interface{}, error)
type Loader ¶
func (*Loader) LoadFromBytesAndResources ¶
type MetadataStore ¶
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() ([]*Service, error)
type MethodSet ¶
type MethodSet []*OperationStore
func (MethodSet) GetFirstMatch ¶
func (ms MethodSet) GetFirstMatch(params map[string]interface{}) (*OperationStore, map[string]interface{}, bool)
type Methods ¶
type Methods map[string]OperationStore
func (Methods) FindFromSelector ¶
func (ms Methods) FindFromSelector(sel OperationSelector) (*OperationStore, error)
func (Methods) FindMethod ¶
func (ms Methods) FindMethod(key string) (*OperationStore, error)
func (Methods) OrderMethods ¶
func (ms Methods) OrderMethods() ([]OperationStore, error)
type NamedSchema ¶
type NamedSchema struct {
// contains filtered or unexported fields
}
func (*NamedSchema) ConditionIsValid ¶
func (ns *NamedSchema) ConditionIsValid(lhs string, rhs interface{}) bool
func (*NamedSchema) GetLocation ¶
func (ns *NamedSchema) GetLocation() string
func (*NamedSchema) GetName ¶
func (ns *NamedSchema) GetName() string
func (*NamedSchema) GetSchema ¶
func (ns *NamedSchema) GetSchema() (Schema, bool)
func (*NamedSchema) GetType ¶
func (ns *NamedSchema) GetType() string
func (*NamedSchema) IsRequired ¶
func (ns *NamedSchema) IsRequired() bool
type OperationRef ¶
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) 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 ¶
type OperationSelector struct {
SQLVerb string `json:"sqlVerb" yaml:"sqlVerb"` // Required
// Optional parameters.
Parameters map[string]interface{} `json:"parameters,omitempty" yaml:"parameters,omitempty"`
}
func NewOperationSelector ¶
func NewOperationSelector(slqVerb string, params map[string]interface{}) OperationSelector
type OperationStore ¶
type OperationStore struct {
MethodKey string `json:"-" yaml:"-"`
SQLVerb string `json:"-" yaml:"-"`
GraphQL *GraphQL `json:"-" yaml:"-"`
StackQLConfig *StackQLConfig `json:"-" yaml:"-"`
// Optional parameters.
Parameters map[string]interface{} `json:"parameters,omitempty" yaml:"parameters,omitempty"`
PathItem *openapi3.PathItem `json:"-" yaml:"-"` // Required
APIMethod string `json:"apiMethod" yaml:"apiMethod"` // Required
OperationRef *OperationRef `json:"operation" yaml:"operation"` // Required
PathRef *PathItemRef `json:"path" yaml:"path"` // Deprecated
Request *ExpectedRequest `json:"request" yaml:"request"`
Response *ExpectedResponse `json:"response" yaml:"response"`
Servers *openapi3.Servers `json:"servers" yaml:"servers"`
ProviderService *ProviderService `json:"-" yaml:"-"` // upwards traversal
Provider *Provider `json:"-" yaml:"-"` // upwards traversal
Service *Service `json:"-" yaml:"-"` // upwards traversal
Resource *Resource `json:"-" yaml:"-"` // upwards traversal
// contains filtered or unexported fields
}
func (*OperationStore) DeprecatedProcessResponse ¶
func (op *OperationStore) DeprecatedProcessResponse(response *http.Response) (map[string]interface{}, error)
func (*OperationStore) FilterBy ¶
func (m *OperationStore) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
func (*OperationStore) GetColumnOrder ¶
func (m *OperationStore) GetColumnOrder(extended bool) []string
func (*OperationStore) GetKey ¶
func (m *OperationStore) GetKey(lhs string) (interface{}, error)
func (*OperationStore) GetKeyAsSqlVal ¶
func (m *OperationStore) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
func (*OperationStore) GetName ¶
func (m *OperationStore) GetName() string
func (*OperationStore) GetNonBodyParameters ¶
func (m *OperationStore) GetNonBodyParameters() map[string]Addressable
func (*OperationStore) GetOperationParameter ¶
func (op *OperationStore) GetOperationParameter(key string) (*Parameter, bool)
func (*OperationStore) GetOperationParameters ¶
func (op *OperationStore) GetOperationParameters() Parameters
func (*OperationStore) GetOptimalResponseMediaType ¶
func (op *OperationStore) GetOptimalResponseMediaType() string
func (*OperationStore) GetOptionalParameters ¶
func (m *OperationStore) GetOptionalParameters() map[string]Addressable
This method needs to incorporate request body parameters
func (*OperationStore) GetPaginationRequestTokenSemantic ¶
func (op *OperationStore) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
func (*OperationStore) GetPaginationResponseTokenSemantic ¶
func (op *OperationStore) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
func (*OperationStore) GetParameter ¶
func (m *OperationStore) GetParameter(paramKey string) (Addressable, bool)
func (*OperationStore) GetParameterizedPath ¶
func (op *OperationStore) GetParameterizedPath() string
func (*OperationStore) GetParameters ¶
func (m *OperationStore) GetParameters() map[string]Addressable
func (*OperationStore) GetQueryTransposeAlgorithm ¶
func (op *OperationStore) GetQueryTransposeAlgorithm() string
func (*OperationStore) GetRequestBodyRequiredProperties ¶
func (op *OperationStore) GetRequestBodyRequiredProperties() ([]string, error)
func (*OperationStore) GetRequestBodySchema ¶
func (op *OperationStore) GetRequestBodySchema() (Schema, error)
func (*OperationStore) GetRequestTranslateAlgorithm ¶
func (op *OperationStore) GetRequestTranslateAlgorithm() string
func (*OperationStore) GetRequiredParameters ¶
func (m *OperationStore) GetRequiredParameters() map[string]Addressable
This method needs to incorporate request body parameters
func (*OperationStore) GetResponseBodySchemaAndMediaType ¶
func (op *OperationStore) GetResponseBodySchemaAndMediaType() (Schema, string, error)
func (*OperationStore) GetSelectItemsKey ¶
func (m *OperationStore) GetSelectItemsKey() string
func (*OperationStore) GetSelectSchemaAndObjectPath ¶
func (op *OperationStore) GetSelectSchemaAndObjectPath() (Schema, string, error)
func (*OperationStore) GetUnionRequiredParameters ¶
func (m *OperationStore) GetUnionRequiredParameters() (map[string]Addressable, error)
func (*OperationStore) GetViewBodyDDLForSQLDialect ¶
func (op *OperationStore) GetViewBodyDDLForSQLDialect(sqlDialect string) (string, bool)
func (*OperationStore) IsAwaitable ¶
func (m *OperationStore) IsAwaitable() bool
func (*OperationStore) IsNullary ¶
func (op *OperationStore) IsNullary() bool
func (*OperationStore) IsRequiredRequestBodyProperty ¶
func (op *OperationStore) IsRequiredRequestBodyProperty(key string) bool
func (*OperationStore) KeyExists ¶
func (m *OperationStore) KeyExists(lhs string) bool
func (*OperationStore) MarshalBody ¶
func (op *OperationStore) MarshalBody(body interface{}, expectedRequest *ExpectedRequest) ([]byte, error)
func (*OperationStore) ParameterMatch ¶
func (op *OperationStore) ParameterMatch(params map[string]interface{}) (map[string]interface{}, bool)
func (*OperationStore) Parameterize ¶
func (op *OperationStore) Parameterize(prov *Provider, parentDoc *Service, inputParams *HttpParameters, requestBody interface{}) (*openapi3filter.RequestValidationInput, error)
func (*OperationStore) ProcessResponse ¶
func (*OperationStore) ToPresentationMap ¶
func (m *OperationStore) ToPresentationMap(extended bool) map[string]interface{}
type OperationStoreRef ¶
type OperationStoreRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *OperationStore
}
type Pagination ¶
type Pagination struct {
RequestToken *TokenSemantic `json:"requestToken,omitempty" yaml:"requestToken,omitempty"`
ResponseToken *TokenSemantic `json:"responseToken,omitempty" yaml:"responseToken,omitempty"`
}
func (Pagination) JSONLookup ¶
func (qt Pagination) JSONLookup(token string) (interface{}, error)
type ParamMap ¶
type ParamMap map[string]ParameterBinding
type ParamPair ¶
type ParamPair struct {
Key string
Param ParameterBinding
}
type Parameter ¶
func (*Parameter) ConditionIsValid ¶
func (*Parameter) GetLocation ¶
func (*Parameter) IsRequired ¶
type ParameterBinding ¶
type ParameterBinding struct {
Param Addressable // may originally be *openapi3.Parameter or *openapi3.ServerVariable, latter will be co-opted
Val 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]*Parameter) *ParameterSuffixMap
func NewParameterSuffixMap ¶
func NewParameterSuffixMap() *ParameterSuffixMap
func (*ParameterSuffixMap) Delete ¶
func (psm *ParameterSuffixMap) Delete(k string) bool
func (*ParameterSuffixMap) GetAll ¶
func (psm *ParameterSuffixMap) GetAll() map[string]*Parameter
func (*ParameterSuffixMap) Put ¶
func (psm *ParameterSuffixMap) Put(k string, v Addressable)
func (*ParameterSuffixMap) Size ¶
func (psm *ParameterSuffixMap) Size() int
type Parameters ¶
type Parameters struct {
openapi3.Parameters
// contains filtered or unexported fields
}
func NewParameters ¶
func NewParameters(params openapi3.Parameters, svc *Service) Parameters
func (Parameters) GetParameter ¶
func (p Parameters) GetParameter(key string) (*Parameter, bool)
type PathItemRef ¶
type Provider ¶
type Provider struct {
openapi3.ExtensionProps
ResponseKeys
FilePath string `json:"-" yaml:"-"`
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Version string `json:"version" yaml:"version"`
Description string `json:"description,omitempty" yaml:"desription,omitempty"`
ProviderServices map[string]*ProviderService `json:"providerServices,omitempty" yaml:"providerServices,omitempty"`
StackQLConfig *StackQLConfig `json:"config,omitempty" yaml:"config,omitempty"`
}
func LoadProviderByName ¶
func LoadProviderDocFromFile ¶
func NewProvider ¶
func (*Provider) GetPaginationRequestTokenSemantic ¶
func (pr *Provider) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
func (*Provider) GetPaginationResponseTokenSemantic ¶
func (pr *Provider) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
func (*Provider) GetProviderService ¶
func (pr *Provider) GetProviderService(key string) (*ProviderService, error)
func (*Provider) GetQueryTransposeAlgorithm ¶
func (*Provider) GetRequestTranslateAlgorithm ¶
func (*Provider) GetResourcesShallow ¶
func (pr *Provider) GetResourcesShallow(serviceKey string) (*ResourceRegister, error)
func (Provider) JSONLookup ¶
func (*Provider) MarshalJSON ¶
func (*Provider) ToYamlFile ¶
func (*Provider) UnmarshalJSON ¶
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 struct {
openapi3.ExtensionProps
ID string `json:"id" yaml:"id"` // Required
Name string `json:"name" yaml:"name"` // Required
Title string `json:"title" yaml:"title"` // Required
Version string `json:"version" yaml:"version"` // Required
Description string `json:"description" yaml:"description"`
Preferred bool `json:"preferred" yaml:"preferred"`
ServiceRef *ServiceRef `json:"service,omitempty" yaml:"service,omitempty"` // will be lazy evaluated
ResourcesRef *ResourcesRef `json:"resources,omitempty" yaml:"resources,omitempty"` // will be lazy evaluated
Provider *Provider `json:"-" yaml:"-"` // upwards traversal
StackQLConfig *StackQLConfig `json:"config,omitempty" yaml:"config,omitempty"`
}
func (*ProviderService) ConditionIsValid ¶
func (sv *ProviderService) ConditionIsValid(lhs string, rhs interface{}) bool
func (*ProviderService) FilterBy ¶
func (ps *ProviderService) FilterBy(predicate func(interface{}) (ITable, error)) (ITable, error)
func (*ProviderService) GetKey ¶
func (ps *ProviderService) GetKey(lhs string) (interface{}, error)
func (*ProviderService) GetKeyAsSqlVal ¶
func (ps *ProviderService) GetKeyAsSqlVal(lhs string) (sqltypes.Value, error)
func (*ProviderService) GetName ¶
func (ps *ProviderService) GetName() string
func (*ProviderService) GetPaginationRequestTokenSemantic ¶
func (sv *ProviderService) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
func (*ProviderService) GetPaginationResponseTokenSemantic ¶
func (sv *ProviderService) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
func (*ProviderService) GetQueryTransposeAlgorithm ¶
func (sv *ProviderService) GetQueryTransposeAlgorithm() string
func (*ProviderService) GetRequestTranslateAlgorithm ¶
func (sv *ProviderService) GetRequestTranslateAlgorithm() string
func (*ProviderService) GetRequiredParameters ¶
func (ps *ProviderService) GetRequiredParameters() map[string]Addressable
func (*ProviderService) GetResourcesShallow ¶
func (ps *ProviderService) GetResourcesShallow() (*ResourceRegister, error)
func (*ProviderService) GetService ¶
func (ps *ProviderService) GetService() (*Service, error)
func (*ProviderService) GetServiceFragment ¶
func (ps *ProviderService) GetServiceFragment(resourceKey string) (*Service, error)
func (*ProviderService) KeyExists ¶
func (ps *ProviderService) KeyExists(lhs string) bool
func (*ProviderService) MarshalJSON ¶
func (pr *ProviderService) MarshalJSON() ([]byte, error)
func (*ProviderService) PeekServiceFragment ¶
func (ps *ProviderService) PeekServiceFragment(resourceKey string) (*Service, bool)
func (*ProviderService) ToMap ¶
func (ps *ProviderService) ToMap() map[string]interface{}
func (*ProviderService) UnmarshalJSON ¶
func (pr *ProviderService) UnmarshalJSON(data []byte) error
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 Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) GetLatestAvailableVersion ¶
func (*Registry) GetLatestPublishedVersion ¶
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)
}
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"`
VerfifyConfig *edcrypto.VerifierConfig `json:"verifyConfig" yaml:"verifyConfig"`
}
type Resource ¶
type Resource struct {
ID string `json:"id" yaml:"id"` // Required
Name string `json:"name" yaml:"name"` // Required
Title string `json:"title" yaml:"title"` // Required
Description string `json:"description,omitempty" yaml:"desription,omitempty"`
SelectorAlgorithm string `json:"selectorAlgorithm,omitempty" yaml:"selectorAlgorithm,omitempty"`
Methods Methods `json:"methods" yaml:"methods"`
ServiceDocPath *ServiceRef `json:"serviceDoc,omitempty" yaml:"serviceDoc,omitempty"`
SQLVerbs map[string][]OperationStoreRef `json:"sqlVerbs" yaml:"sqlVerbs"`
BaseUrl string `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty"` // hack
StackQLConfig *StackQLConfig `json:"config,omitempty" yaml:"config,omitempty"`
Service *Service `json:"-" yaml:"-"` // upwards traversal
ProviderService *ProviderService `json:"-" yaml:"-"` // upwards traversal
Provider *Provider `json:"-" yaml:"-"` // upwards traversal
}
func (*Resource) ConditionIsValid ¶
func (*Resource) FindMethod ¶
func (r *Resource) FindMethod(key string) (*OperationStore, error)
func (*Resource) FindOperationStore ¶
func (rs *Resource) FindOperationStore(sel OperationSelector) (*OperationStore, error)
func (*Resource) GetDefaultMethodKeysForSQLVerb ¶
func (*Resource) GetFirstMethodFromSQLVerb ¶
func (rs *Resource) GetFirstMethodFromSQLVerb(sqlVerb string) (*OperationStore, string, bool)
func (*Resource) GetFirstMethodMatchFromSQLVerb ¶
func (*Resource) GetKeyAsSqlVal ¶
func (*Resource) GetMethodsMatched ¶
func (*Resource) GetPaginationRequestTokenSemantic ¶
func (r *Resource) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
func (*Resource) GetPaginationResponseTokenSemantic ¶
func (r *Resource) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
func (*Resource) GetQueryTransposeAlgorithm ¶
func (*Resource) GetRequestTranslateAlgorithm ¶
func (*Resource) GetRequiredParameters ¶
func (rs *Resource) GetRequiredParameters() map[string]Addressable
func (*Resource) GetSelectableObject ¶
func (*Resource) GetViewBodyDDLForSQLDialect ¶
func (Resource) JSONLookup ¶
type ResourceRegister ¶
type ResourceRegister struct {
ServiceDocPath *ServiceRef `json:"serviceDoc,omitempty" yaml:"serviceDoc,omitempty"`
Resources map[string]*Resource `json:"resources,omitempty" yaml:"resources,omitempty"`
ProviderService *ProviderService `json:"-" yaml:"-"` // upwards traversal
Provider *Provider `json:"-" yaml:"-"` // upwards traversal
}
func LoadResourcesShallow ¶
func LoadResourcesShallow(ps *ProviderService, bt []byte) (*ResourceRegister, error)
func NewResourceRegister ¶
func NewResourceRegister() *ResourceRegister
func (*ResourceRegister) ObtainServiceDocUrl ¶
func (rr *ResourceRegister) ObtainServiceDocUrl(resourceKey string) string
type ResourcesRef ¶
type ResourcesRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *ResourceRegister
}
type ResponseKeys ¶
type SQLExternalColumn ¶
type SQLExternalConnection ¶
type SQLExternalConnection struct {
ConnectionName string `json:"alias" yaml:"alias"`
Tables map[string]SQLExternalTable `json:"tables" yaml:"tables"`
}
type SQLExternalTable ¶
type SQLExternalTable struct {
CatalogName string `json:"catalogName" yaml:"catalogName"`
SchemaName string `json:"schemaName" yaml:"schemaName"`
Name string `json:"name" yaml:"name"`
Columns []SQLExternalColumn `json:"columns" yaml:"columns"`
}
type Schema ¶
type Schema interface {
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
GetItemProperty(k string) (Schema, bool)
GetItems() (Schema, error)
GetItemsSchema() (Schema, error)
GetName() 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
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) (*response.Response, error)
SetProperties(openapi3.Schemas)
SetType(string)
SetKey(string)
Tabulate(omitColumns bool) *Tabulation
ToDescriptionMap(extended bool) map[string]interface{}
// contains filtered or unexported methods
}
type Service ¶
type Service struct {
*openapi3.T
StackQLConfig *StackQLConfig `json:"-" yaml:"-"`
ProviderService *ProviderService `json:"-" yaml:"-"` // upwards traversal
Provider *Provider `json:"-" yaml:"-"` // upwards traversal
// contains filtered or unexported fields
}
func LoadServiceDocFromBytes ¶
func LoadServiceDocFromBytes(ps *ProviderService, bytes []byte) (*Service, error)
func LoadServiceDocFromFile ¶
func LoadServiceDocFromFile(ps *ProviderService, fileName string) (*Service, error)
func LoadServiceSubsetDocFromBytes ¶
func LoadServiceSubsetDocFromBytes(rr *ResourceRegister, resourceKey string, bytes []byte) (*Service, error)
func NewService ¶
func (*Service) ConditionIsValid ¶
func (*Service) GetKeyAsSqlVal ¶
func (*Service) GetPaginationRequestTokenSemantic ¶
func (svc *Service) GetPaginationRequestTokenSemantic() (*TokenSemantic, bool)
func (*Service) GetPaginationResponseTokenSemantic ¶
func (svc *Service) GetPaginationResponseTokenSemantic() (*TokenSemantic, bool)
func (*Service) GetQueryTransposeAlgorithm ¶
func (*Service) GetRequestTranslateAlgorithm ¶
func (*Service) GetRequiredParameters ¶
func (rs *Service) GetRequiredParameters() map[string]Addressable
func (*Service) GetResource ¶
func (*Service) IsPreferred ¶
func (*Service) ToYamlFile ¶
type ServiceRef ¶
type SimpleMockRegistryRoundTripper ¶
type SimpleMockRegistryRoundTripper struct {
// contains filtered or unexported fields
}
func NewSimpleMockRegistryRoundTripper ¶
func NewSimpleMockRegistryRoundTripper(fileRoot string, registryRoot *url.URL) *SimpleMockRegistryRoundTripper
type StackQLConfig ¶
type StackQLConfig struct {
QueryTranspose *Transform `json:"queryParamTranspose,omitempty" yaml:"queryParamTranspose,omitempty"`
RequestTranslate *Transform `json:"requestTranslate,omitempty" yaml:"requestTranslate,omitempty"`
Pagination *Pagination `json:"pagination,omitempty" yaml:"pagination,omitempty"`
Variations *Variations `json:"variations,omitempty" yaml:"variations,omitempty"`
Views map[string]*View `json:"views" yaml:"views"`
ExternalTables map[string]SQLExternalTable `json:"sqlExternalTables" yaml:"sqlExternalTables"`
Auth *AuthDTO `json:"auth,omitempty" yaml:"auth,omitempty"`
}
func (*StackQLConfig) GetAuth ¶
func (cfg *StackQLConfig) GetAuth() (*AuthDTO, bool)
func (*StackQLConfig) GetViewBodyDDLForSQLDialect ¶
func (cfg *StackQLConfig) GetViewBodyDDLForSQLDialect(sqlDialect string, viewName string) (string, bool)
func (StackQLConfig) JSONLookup ¶
func (qt StackQLConfig) JSONLookup(token string) (interface{}, error)
type StandardTransformerLocator ¶
type StandardTransformerLocator struct{}
func (*StandardTransformerLocator) GetTransformer ¶
func (stl *StandardTransformerLocator) GetTransformer(tokenSemantic *TokenSemantic) (TokenTransformer, error)
type Tabulation ¶
type Tabulation struct {
// contains filtered or unexported fields
}
func GetTabulation ¶
func GetTabulation(name, arrayType string) Tabulation
func (*Tabulation) GetColumns ¶
func (t *Tabulation) GetColumns() []ColumnDescriptor
func (*Tabulation) GetName ¶
func (t *Tabulation) GetName() string
func (*Tabulation) GetSchema ¶
func (t *Tabulation) GetSchema() *standardSchema
func (*Tabulation) PushBackColumn ¶
func (t *Tabulation) PushBackColumn(col ColumnDescriptor)
func (*Tabulation) RenameColumnsToXml ¶
func (t *Tabulation) RenameColumnsToXml() *Tabulation
type TokenSemantic ¶
type TokenSemantic struct {
Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
Args TokenSemanticArgs `json:"args,omitempty" yaml:"args,omitempty"`
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Location string `json:"location,omitempty" yaml:"location,omitempty"`
}
func (*TokenSemantic) GetTransformer ¶
func (ts *TokenSemantic) GetTransformer() (TokenTransformer, error)
func (TokenSemantic) JSONLookup ¶
func (qt TokenSemantic) JSONLookup(token string) (interface{}, error)
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 Transform ¶
type Transform struct {
Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
}
func (Transform) JSONLookup ¶
type TransformerLocator ¶
type TransformerLocator interface {
GetTransformer(tokenSemantic *TokenSemantic) (TokenTransformer, error)
}
func NewStandardTransformerLocator ¶
func NewStandardTransformerLocator() TransformerLocator
type Variations ¶
type Variations struct {
IsObjectSchemaImplicitlyUnioned bool `json:"isObjectSchemaImplicitlyUnioned,omitempty" yaml:"isObjectSchemaImplicitlyUnioned,omitempty"`
}
func (Variations) JSONLookup ¶
func (qt Variations) JSONLookup(token string) (interface{}, error)
type View ¶
type View struct {
Predicate string `json:"predicate" yaml:"predicate"`
DDL string `json:"ddl" yaml:"ddl"`
Fallback *View `json:"fallback" yaml:"fallback"` // Future proofing for predicate failover
}
func (*View) GetDDLForSqlDialect ¶
func (View) JSONLookup ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.