Versions in this module Expand all Collapse all v2 v2.0.0 Nov 4, 2021 Changes in this version + const ALLPAGES + const ASC + const DESC + const GoDataBinary + const GoDataBoolean + const GoDataDate + const GoDataDateTimeOffset + const GoDataDecimal + const GoDataInt16 + const GoDataInt32 + const GoDataInt64 + const GoDataString + const GoDataTimeOfDay + const NONE + const ODataFieldContext + const ODataFieldCount + const ODataFieldValue + const OpAssociationLeft + const OpAssociationNone + const OpAssociationRight + const RequestKindCollection + const RequestKindCount + const RequestKindEntity + const RequestKindMetadata + const RequestKindProperty + const RequestKindPropertyValue + const RequestKindRef + const RequestKindService + const RequestKindSingleton + const RequestKindUnknown + const TokenCloseParen + const TokenComma + const TokenListExpr + const TokenOpenParen + var GlobalExpandTokenizer = ExpandTokenizer() + var GlobalExpressionParser = NewExpressionParser() + var GlobalExpressionTokenizer = NewExpressionTokenizer() + var GlobalFilterParser = NewExpressionParser() + var GlobalFilterTokenizer = NewExpressionTokenizer() + var GlobalSearchParser = SearchParser() + var GlobalSearchTokenizer = SearchTokenizer() + func ParseExpandOption(queue *tokenQueue, item *ExpandItem) error + func ParseName(segment string) string + func ParseUrlPath(path string) (*GoDataSegment, *GoDataSegment, error) + func SemanticizeExpandQuery(expand *GoDataExpandQuery, service *GoDataService, entity *GoDataEntityType) error + func SemanticizeFilterQuery(filter *GoDataFilterQuery, service *GoDataService, entity *GoDataEntityType) error + func SemanticizeOrderByQuery(orderby *GoDataOrderByQuery, service *GoDataService, entity *GoDataEntityType) error + func SemanticizePathSegment(segment *GoDataSegment, service *GoDataService) error + func SemanticizeRequest(req *GoDataRequest, service *GoDataService) error + func SemanticizeSelectQuery(sel *GoDataSelectQuery, service *GoDataService, entity *GoDataEntityType) error + type DuplicateQueryParameterError struct + Parameter string + func (err *DuplicateQueryParameterError) Error() string + type ExpandItem struct + At *GoDataFilterQuery + Expand *GoDataExpandQuery + Filter *GoDataFilterQuery + Levels int + OrderBy *GoDataOrderByQuery + Path []*Token + Search *GoDataSearchQuery + Select *GoDataSelectQuery + Skip *GoDataSkipQuery + Top *GoDataTopQuery + func ParseExpandItem(input tokenQueue) (*ExpandItem, error) + type ExpandTokenType int + const ExpandTokenCloseParen + const ExpandTokenComma + const ExpandTokenEquals + const ExpandTokenLiteral + const ExpandTokenNav + const ExpandTokenOpenParen + const ExpandTokenSemicolon + func (e ExpandTokenType) Value() int + type ExpressionParser struct + ExpectBoolExpr bool + func NewExpressionParser() *ExpressionParser + func (p *ExpressionParser) ParseExpressionString(expression string) (*GoDataExpression, error) + func (p *ExpressionParser) ParseOrderByString(orderby string) (*GoDataOrderByQuery, error) + func (p *ExpressionParser) SemanticizeExpression(expression *GoDataExpression, service *GoDataService, entity *GoDataEntityType) error + type ExpressionTokenType int + const ExpressionTokenAssignement + const ExpressionTokenBoolean + const ExpressionTokenCloseParen + const ExpressionTokenColon + const ExpressionTokenComma + const ExpressionTokenDate + const ExpressionTokenDateTime + const ExpressionTokenDuration + const ExpressionTokenFloat + const ExpressionTokenFunc + const ExpressionTokenGeographyPolygon + const ExpressionTokenGeometryPolygon + const ExpressionTokenGuid + const ExpressionTokenInteger + const ExpressionTokenIt + const ExpressionTokenLambda + const ExpressionTokenLambdaNav + const ExpressionTokenLiteral + const ExpressionTokenLogical + const ExpressionTokenNav + const ExpressionTokenNull + const ExpressionTokenOp + const ExpressionTokenOpenParen + const ExpressionTokenRoot + const ExpressionTokenString + const ExpressionTokenTime + const ExpressionTokenWhitespace + func (e ExpressionTokenType) String() string + func (e ExpressionTokenType) Value() int + type Function struct + Params []int + Token string + type GoDataAction struct + EntitySetPath string + IsBound string + Name string + Parameters []*GoDataParameter + ReturnType *GoDataReturnType + XMLName xml.Name + type GoDataActionImport struct + Action string + EntitySet string + Name string + XMLName xml.Name + type GoDataAnnotation struct + Qualifier string + Term string + XMLName xml.Name + type GoDataAnnotations struct + Annotations []*GoDataAnnotation + Qualifier string + Target string + XMLName xml.Name + type GoDataApplyQuery string + func ParseApplyString(apply string) (*GoDataApplyQuery, error) + type GoDataComplexType struct + Abstract string + BaseType string + Name string + NavigationProperties []*GoDataNavigationProperty + OpenType string + Properties []*GoDataProperty + XMLName xml.Name + type GoDataCountQuery bool + func ParseCountString(count string) (*GoDataCountQuery, error) + type GoDataEntityContainer struct + ActionImports []*GoDataActionImport + EntitySets []*GoDataEntitySet + Extends string + FunctionImports []*GoDataFunctionImport + Name string + Singletons []*GoDataSingleton + XMLName xml.Name + type GoDataEntitySet struct + EntityType string + IncludeInServiceDocument string + Name string + NavigationPropertyBindings []*GoDataNavigationPropertyBinding + XMLName xml.Name + type GoDataEntityType struct + Abstract string + BaseType string + HasStream string + Key *GoDataKey + Name string + NavigationProperties []*GoDataNavigationProperty + OpenType string + Properties []*GoDataProperty + XMLName xml.Name + type GoDataEnumType struct + IsFlags string + Members []*GoDataMember + Name string + UnderlyingType string + XMLName xml.Name + type GoDataError struct + Cause error + Message string + ResponseCode int + func BadRequestError(message string) *GoDataError + func GoneError(message string) *GoDataError + func InternalServerError(message string) *GoDataError + func MethodNotAllowedError(message string) *GoDataError + func NotFoundError(message string) *GoDataError + func NotImplementedError(message string) *GoDataError + func PreconditionFailedError(message string) *GoDataError + func (err *GoDataError) Error() string + func (err *GoDataError) SetCause(e error) *GoDataError + func (err *GoDataError) Unwrap() error + type GoDataExpandQuery struct + ExpandItems []*ExpandItem + func ParseExpandString(expand string) (*GoDataExpandQuery, error) + type GoDataExpression struct + RawValue string + Tree *ParseNode + type GoDataFilterQuery struct + RawValue string + Tree *ParseNode + func ParseFilterString(filter string) (*GoDataFilterQuery, error) + type GoDataFormatQuery struct + type GoDataFunction struct + EntitySetPath string + IsBound string + IsComposable string + Name string + Parameters []*GoDataParameter + ReturnType *GoDataReturnType + XMLName xml.Name + type GoDataFunctionImport struct + EntitySet string + Function string + IncludeInServiceDocument string + Name string + XMLName xml.Name + type GoDataIdentifier map[string]string + func ParseIdentifiers(segment string) *GoDataIdentifier + func (id *GoDataIdentifier) Get() string + func (id *GoDataIdentifier) GetKey(key string) (string, bool) + func (id *GoDataIdentifier) HasMultiple() bool + type GoDataInclude struct + Alias string + Namespace string + XMLName xml.Name + type GoDataIncludeAnnotations struct + Qualifier string + TargetNamespace string + TermNamespace string + XMLName xml.Name + type GoDataInlineCountQuery string + func ParseInlineCountString(inlinecount string) (*GoDataInlineCountQuery, error) + type GoDataKey struct + PropertyRef *GoDataPropertyRef + XMLName xml.Name + type GoDataMember struct + Name string + Value string + XMLName xml.Name + type GoDataMetadata struct + DataServices *GoDataServices + References []*GoDataReference + Version string + XMLName xml.Name + XMLNamespace string + func (t *GoDataMetadata) Bytes() ([]byte, error) + func (t *GoDataMetadata) String() string + type GoDataNavigationProperty struct + ContainsTarget string + Name string + Nullable string + Partner string + ReferentialConstraints []*GoDataReferentialConstraint + Type string + XMLName xml.Name + type GoDataNavigationPropertyBinding struct + Path string + Target string + XMLName xml.Name + type GoDataOnDelete struct + Action string + XMLName xml.Name + type GoDataOrderByQuery struct + OrderByItems []*OrderByItem + RawValue string + func ParseOrderByString(orderby string) (*GoDataOrderByQuery, error) + type GoDataParameter struct + MaxLength int + Name string + Nullable string + Precision int + SRID string + Scale int + Type string + XMLName xml.Name + type GoDataProperty struct + DefaultValue string + MaxLength int + Name string + Nullable string + Precision int + SRID string + Scale int + Type string + Unicode string + XMLName xml.Name + type GoDataPropertyRef struct + Name string + XMLName xml.Name + type GoDataProvider interface + GetCount func(*GoDataRequest) (int, error) + GetEntity func(*GoDataRequest) (*GoDataResponseField, error) + GetEntityCollection func(*GoDataRequest) (*GoDataResponseField, error) + GetMetadata func() *GoDataMetadata + type GoDataQuery struct + Apply *GoDataApplyQuery + At *GoDataFilterQuery + Count *GoDataCountQuery + Expand *GoDataExpandQuery + Filter *GoDataFilterQuery + Format *GoDataFormatQuery + InlineCount *GoDataInlineCountQuery + OrderBy *GoDataOrderByQuery + Search *GoDataSearchQuery + Select *GoDataSelectQuery + Skip *GoDataSkipQuery + Top *GoDataTopQuery + func ParseUrlQuery(query url.Values, lenient bool) (*GoDataQuery, error) + type GoDataReference struct + IncludeAnnotations []*GoDataIncludeAnnotations + Includes []*GoDataInclude + Uri string + XMLName xml.Name + type GoDataReferentialConstraint struct + OnDelete *GoDataOnDelete + Property string + ReferencedProperty string + XMLName xml.Name + type GoDataRequest struct + FirstSegment *GoDataSegment + LastSegment *GoDataSegment + Query *GoDataQuery + RequestKind int + func ParseRequest(path string, query url.Values, lenient bool) (*GoDataRequest, error) + type GoDataResponse struct + Fields map[string]*GoDataResponseField + func (r *GoDataResponse) Json() ([]byte, error) + type GoDataResponseField struct + Value interface{} + func (f *GoDataResponseField) Json() ([]byte, error) + type GoDataReturnType struct + MaxLength int + Name string + Nullable string + Precision int + SRID string + Scale int + Type string + XMLName xml.Name + type GoDataSchema struct + Actions []*GoDataAction + Alias string + Annotation []*GoDataAnnotation + Annotations []*GoDataAnnotations + ComplexTypes []*GoDataComplexType + EntityContainers []*GoDataEntityContainer + EntityTypes []*GoDataEntityType + EnumTypes []*GoDataEnumType + Functions []*GoDataFunction + Namespace string + Terms []*GoDataTerm + TypeDefinitions []*GoDataTypeDefinition + XMLName xml.Name + type GoDataSearchQuery struct + RawValue string + Tree *ParseNode + func ParseSearchString(filter string) (*GoDataSearchQuery, error) + type GoDataSegment struct + Identifier *GoDataIdentifier + Name string + Next *GoDataSegment + Prev *GoDataSegment + RawValue string + SemanticReference interface{} + SemanticType SemanticType + type GoDataSelectQuery struct + RawValue string + SelectItems []*SelectItem + func ParseSelectString(sel string) (*GoDataSelectQuery, error) + type GoDataService struct + BaseUrl *url.URL + EntityContainerLookup map[string]map[string]*GoDataEntityContainer + EntitySetLookup map[string]map[string]map[string]*GoDataEntitySet + EntityTypeLookup map[string]map[string]*GoDataEntityType + Metadata *GoDataMetadata + NavigationPropertyLookup map[*GoDataEntityType]map[string]*GoDataNavigationProperty + PropertyLookup map[*GoDataEntityType]map[string]*GoDataProperty + Provider GoDataProvider + SchemaLookup map[string]*GoDataSchema + func BuildService(provider GoDataProvider, serviceUrl string) (*GoDataService, error) + func (service *GoDataService) GoDataHTTPHandler(w http.ResponseWriter, r *http.Request) + func (service *GoDataService) ListenAndServe(addr string) + func (service *GoDataService) LookupEntitySet(name string) (*GoDataEntitySet, error) + func (service *GoDataService) LookupEntityType(name string) (*GoDataEntityType, error) + type GoDataServices struct + Schemas []*GoDataSchema + XMLName xml.Name + type GoDataSingleton struct + Name string + NavigationPropertyBindings []*GoDataNavigationPropertyBinding + Type string + XMLName xml.Name + type GoDataSkipQuery int + func ParseSkipString(skip string) (*GoDataSkipQuery, error) + type GoDataTerm struct + AppliesTo string + BaseTerm string + DefaultValue string + Name string + Type string + XMLName xml.Name + type GoDataTopQuery int + func ParseTopString(top string) (*GoDataTopQuery, error) + type GoDataTypeDefinition struct + Annotations []*GoDataAnnotation + Name string + UnderlyingType string + XMLName xml.Name + type ListExprToken int + const TokenTypeArgCount + const TokenTypeListExpr + func (l ListExprToken) String() string + func (l ListExprToken) Value() int + type Operator struct + Association int + Operands int + Precedence int + PreferListExpr bool + Token string + func (o *Operator) WithListExprPreference(v bool) *Operator + type OrderByItem struct + Field *Token + Order string + Tree *GoDataExpression + type ParseNode struct + Children []*ParseNode + Parent *ParseNode + Token *Token + func (p *ParseNode) String() string + type Parser struct + Functions map[string]*Function + LiteralToken TokenType + Operators map[string]*Operator + func EmptyParser() *Parser + func SearchParser() *Parser + func (p *Parser) DefineFunction(token string, params []int) *Function + func (p *Parser) DefineOperator(token string, operands, assoc, precedence int) *Operator + func (p *Parser) InfixToPostfix(tokens []*Token) (*tokenQueue, error) + func (p *Parser) PostfixToTree(queue *tokenQueue) (*ParseNode, error) + func (p *Parser) WithLiteralToken(token TokenType) *Parser + type SearchTokenType int + const SearchTokenCloseParen + const SearchTokenLiteral + const SearchTokenOp + const SearchTokenOpenParen + const SearchTokenWhitespace + func (s SearchTokenType) Value() int + type SelectItem struct + Segments []*Token + type SemanticType int + const SemanticTypeAction + const SemanticTypeCount + const SemanticTypeDerivedEntity + const SemanticTypeEntity + const SemanticTypeEntitySet + const SemanticTypeFunction + const SemanticTypeMetadata + const SemanticTypeProperty + const SemanticTypePropertyValue + const SemanticTypeRef + const SemanticTypeUnknown + type Token struct + SemanticReference interface{} + SemanticType SemanticType + Type TokenType + Value string + type TokenHandler func(token *Token, stack tokenStack) error + type TokenMatcher struct + CaseInsensitive bool + Pattern string + Re *regexp.Regexp + Subst func(in string) string + Token TokenType + type TokenType interface + Value func() int + type Tokenizer struct + IgnoreMatchers []*TokenMatcher + TokenMatchers []*TokenMatcher + func ExpandTokenizer() *Tokenizer + func NewExpressionTokenizer() *Tokenizer + func SearchTokenizer() *Tokenizer + func (t *Tokenizer) Add(pattern string, token TokenType) + func (t *Tokenizer) AddWithSubstituteFunc(pattern string, token TokenType, subst func(string) string) + func (t *Tokenizer) Ignore(pattern string, token TokenType) + func (t *Tokenizer) Tokenize(target string) ([]*Token, error) + func (t *Tokenizer) TokenizeBytes(target []byte) ([]*Token, error) + type UnsupportedQueryParameterError struct + Parameter string + func (err *UnsupportedQueryParameterError) Error() string Other modules containing this package github.com/CiscoM31/godata