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 GetTestingView() standardView
- 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 BodyParamPair
- type ColumnDescriptor
- type DiscoveryDoc
- type EncodableString
- type ExpectedRequest
- type ExpectedResponse
- type GraphQL
- type GraphQLElement
- type HttpParameters
- type ITable
- type Loader
- type MetadataStore
- type MethodSet
- type Methods
- 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
- type OperationStoreRef
- type Pagination
- type ParamMap
- type ParamPair
- type ParameterBinding
- type ParameterSuffixMap
- type Params
- type PathItemRef
- type Provider
- type ProviderDescription
- type ProviderInfo
- type ProviderService
- 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
- 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
- type ServiceRef
- type SimpleMockRegistryRoundTripper
- type StackQLConfig
- 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 GetTestingView ¶
func GetTestingView() standardView
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 NewParameter ¶
func NewParameter(param *openapi3.Parameter, svc Service) Addressable
func NewRequiredAddressableRequestBodyProperty ¶
func NewRequiredAddressableRequestBodyProperty(name string, s Schema) Addressable
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 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 GraphQLElement ¶
type GraphQLElement map[string]interface{}
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)
}
func NewHttpParameters ¶
func NewHttpParameters(method OperationStore) HttpParameters
type Loader ¶
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]standardOperationStore
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 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 ¶
func NewOperationSelector ¶
func NewOperationSelector(slqVerb string, params map[string]interface{}) OperationSelector
type OperationStore ¶
type OperationStore interface {
ITable
GetMethodKey() string
GetSQLVerb() string
GetGraphQL() GraphQL
GetStackQLConfig() StackQLConfig
GetParameters() map[string]Addressable
GetPathItem() *openapi3.PathItem
GetAPIMethod() string
GetOperationRef() *OperationRef
GetPathRef() *PathItemRef
GetRequest() (ExpectedRequest, bool)
GetResponse() (ExpectedResponse, bool)
GetServers() *openapi3.Servers
GetParameterizedPath() string
GetProviderService() ProviderService
GetProvider() Provider
GetService() Service
GetResource() Resource
ParameterMatch(params map[string]interface{}) (map[string]interface{}, bool)
GetOperationParameter(key string) (Addressable, bool)
GetQueryTransposeAlgorithm() string
GetSelectSchemaAndObjectPath() (Schema, string, error)
ProcessResponse(response *http.Response) (*response.Response, error)
Parameterize(prov Provider, parentDoc Service, inputParams HttpParameters, requestBody interface{}) (*openapi3filter.RequestValidationInput, error)
GetSelectItemsKey() string
GetResponseBodySchemaAndMediaType() (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) ([]byte, error)
GetRequestBodySchema() (Schema, error)
GetNonBodyParameters() map[string]Addressable
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
// contains filtered or unexported methods
}
func NewEmptyOperationStore ¶
func NewEmptyOperationStore() OperationStore
type OperationStoreRef ¶
type OperationStoreRef struct {
Ref string `json:"$ref" yaml:"$ref"`
Value *standardOperationStore
}
type Pagination ¶
type Pagination interface {
JSONLookup(token string) (interface{}, error)
GetRequestToken() TokenSemantic
GetResponseToken() TokenSemantic
}
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 NewstandardParameterBinding ¶
func NewstandardParameterBinding(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 Service) Params
type PathItemRef ¶
type Provider ¶
type Provider interface {
Debug() string
GetAuth() (AuthDTO, bool)
GetDeleteItemsKey() string
GetName() string
GetProviderServices() map[string]ProviderService
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
GetProviderService(key string) (ProviderService, error)
GetQueryTransposeAlgorithm() string
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
GetQueryTransposeAlgorithm() string
GetProvider() (Provider, bool)
GetService() (Service, error)
GetRequestTranslateAlgorithm() string
GetResourcesShallow() (ResourceRegister, error)
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, 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
// 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 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 interface {
ITable
GetQueryTransposeAlgorithm() string
GetID() string
GetTitle() string
GetDescription() string
GetSelectorAlgorithm() string
GetMethods() Methods
GetServiceDocPath() *ServiceRef
GetRequestTranslateAlgorithm() string
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
FindMethod(key string) (OperationStore, error)
GetFirstMethodFromSQLVerb(sqlVerb string) (OperationStore, string, bool)
GetFirstMethodMatchFromSQLVerb(sqlVerb string, parameters map[string]interface{}) (OperationStore, map[string]interface{}, bool)
GetService() (Service, bool)
GetViewBodyDDLForSQLDialect(sqlDialect string) (string, bool)
GetMethodsMatched() Methods
ToMap(extended bool) map[string]interface{}
// 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 {
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 interface {
GetT() *openapi3.T
GetQueryTransposeAlgorithm() string
IsPreferred() bool
GetRequestTranslateAlgorithm() string
GetPaginationRequestTokenSemantic() (TokenSemantic, bool)
GetPaginationResponseTokenSemantic() (TokenSemantic, bool)
GetServers() []*openapi3.Server
GetResources() (map[string]Resource, error)
GetComponents() openapi3.Components
GetName() string
GetResource(resourceName string) (Resource, error)
GetSchema(key string) (Schema, error)
GetContactURL() string
// 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 LoadServiceSubsetDocFromBytes ¶
func LoadServiceSubsetDocFromBytes(rr ResourceRegister, resourceKey string, bytes []byte) (Service, error)
func NewService ¶
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)
GetViewBodyDDLForSQLDialect(sqlDialect string, viewName string) (string, bool)
GetQueryTranspose() (Transform, bool)
GetRequestTranslate() (Transform, bool)
GetPagination() (Pagination, bool)
GetVariations() (Variations, bool)
GetViews() map[string]View
GetExternalTables() map[string]SQLExternalTable
// contains filtered or unexported methods
}
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 interface {
JSONLookup(token string) (interface{}, error)
GetAlgorithm() string
GetArgs() TokenSemanticArgs
GetKey() string
GetLocation() string
GetTransformer() (TokenTransformer, 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 TransformerLocator ¶
type TransformerLocator interface {
GetTransformer(tokenSemantic TokenSemantic) (TokenTransformer, error)
}
func NewStandardTransformerLocator ¶
func NewStandardTransformerLocator() TransformerLocator
type Variations ¶
Source Files
¶
- addressable.go
- auth_dto.go
- config.go
- const.go
- expectedRequest.go
- expectedResponse.go
- graphql.go
- http.go
- loader.go
- metadata.go
- methodSet.go
- methods.go
- mock_http.go
- operationSelector.go
- operation_store.go
- pagination.go
- params.go
- provider.go
- providerService.go
- refs.go
- registry.go
- resource.go
- resourceRegister.go
- schema.go
- server.go
- service.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.