Versions in this module Expand all Collapse all v0 v0.1.1 May 26, 2019 Changes in this version + var ErrNoParamsInContext = errors.New("No parameters in the request Context.") + var ErrNoValue = errors.New("No value provided within the scope.") + var MaxPermissibleDuplicates = 3 + func AddFilterField(s *Scope, filter *filters.FilterField) error + func AddselectedFields(s *Scope, fields ...string) error + func DeleteselectedFields(s *Scope, fields ...*models.StructField) error + func Fieldset(s *Scope) map[string]*models.StructField + func FiltersAttributes(s *Scope) []*filters.FilterField + func FiltersForeigns(s *Scope) []*filters.FilterField + func FiltersKeys(s *Scope) []*filters.FilterField + func FiltersPrimary(s *Scope) []*filters.FilterField + func FiltersRelationFields(s *Scope) []*filters.FilterField + func GetFieldValue(s *Scope, sField *models.StructField) (interface{}, error) + func GetLangtagValue(s *Scope) (string, error) + func GetPrimaryFieldValues(s *Scope) ([]interface{}, error) + func GetTotalIncludeFieldCount(s *Scope) int + func IsRoot(s *Scope) bool + func SelectedFieldValues(s *Scope, dialectNamer dialect.FieldNamer) (map[string]interface{}, error) + func SetAllFields(s *Scope) + func SetFields(s *Scope, fields ...interface{}) error + func SetLangTagValue(s *Scope, langtag string) error + func SetPagination(s *Scope, p *paginations.Pagination) error + type IncludeField struct + NotInFieldset bool + RelatedScope *Scope + Scope *Scope + func (i *IncludeField) GetMissingPrimaries() ([]interface{}, error) + type Kind int + const IncludedKind + const RelatedKind + const RelationshipKind + const RootKind + const SubscopeKind + type Processor interface + Create func(ctx context.Context, s *Scope) error + Delete func(ctx context.Context, s *Scope) error + Get func(ctx context.Context, s *Scope) error + List func(ctx context.Context, s *Scope) error + Patch func(ctx context.Context, s *Scope) error + type Scope struct + Store map[interface{}]interface{} + Value interface{} + func CopyScope(s *Scope, root *Scope, isRoot bool) *Scope + func GetCollectionScope(s *Scope) *Scope + func GetRelatedScope(s *Scope) (*Scope, error) + func New(model *models.ModelStruct) *Scope + func NewRootScope(modelStruct *models.ModelStruct) *Scope + func (s *Scope) AddChainSubscope(sub *Scope) + func (s *Scope) AddFilterField(filter *filters.FilterField) error + func (s *Scope) AddSelectedField(field *models.StructField) + func (s *Scope) AddToFieldset(fields ...interface{}) error + func (s *Scope) AddToSelectedFields(fields ...interface{}) error + func (s *Scope) AppendSortFields(fromStart bool, sortFields ...*sorts.SortField) + func (s *Scope) AttributeFilters() []*filters.FilterField + func (s *Scope) AutoSelectFields() error + func (s *Scope) BuildFieldset(fields ...string) (errs []*aerrors.ApiError) + func (s *Scope) BuildIncludeList(includedList ...string) (errs []*aerrors.ApiError) + func (s *Scope) BuildSortFields(sortFields ...string) (errs []*aerrors.ApiError) + func (s *Scope) Chain() []*Scope + func (s *Scope) ClearRelationshipFilters() + func (s *Scope) CopyIncludedBoundaries() + func (s *Scope) CreateModelsRootScope(mStruct *models.ModelStruct) *Scope + func (s *Scope) CurrentErrorCount() int + func (s *Scope) CurrentIncludedField() (*IncludeField, error) + func (s *Scope) Fieldset() []*models.StructField + func (s *Scope) FieldsetDialectNames(dialectNamer dialect.FieldNamer) []string + func (s *Scope) FillFieldsetIfNotSet() + func (s *Scope) FilterKeyFilters() []*filters.FilterField + func (s *Scope) Flags() *flags.Container + func (s *Scope) GetCollection() string + func (s *Scope) GetFieldValue(sField *models.StructField) (reflect.Value, error) + func (s *Scope) GetForeignKeyValues(foreign *models.StructField) (values []interface{}, err error) + func (s *Scope) GetModelsRootScope(mStruct *models.ModelStruct) (collRootScope *Scope) + func (s *Scope) GetOrCreateAttributeFilter(sField *models.StructField) (filter *filters.FilterField) + func (s *Scope) GetOrCreateFilterKeyFilter(sField *models.StructField) (filter *filters.FilterField) + func (s *Scope) GetOrCreateForeignKeyFilter(sField *models.StructField) (filter *filters.FilterField) + func (s *Scope) GetOrCreateIDFilter() *filters.FilterField + func (s *Scope) GetOrCreateIncludeField(field *models.StructField) (includeField *IncludeField) + func (s *Scope) GetOrCreateLanguageFilter() (filter *filters.FilterField) + func (s *Scope) GetOrCreateRelationshipFilter(sField *models.StructField) (filter *filters.FilterField) + func (s *Scope) GetPrimaryFieldValue() (reflect.Value, error) + func (s *Scope) GetPrimaryFieldValues() (values []interface{}, err error) + func (s *Scope) GetRelationshipScope() (relScope *Scope, err error) + func (s *Scope) GetScopeValueString() string + func (s *Scope) ID() uuid.UUID + func (s *Scope) InFieldset(field string) (*models.StructField, bool) + func (s *Scope) IncludeScopeByStruct(mStruct *models.ModelStruct) (*Scope, bool) + func (s *Scope) IncludedFields() []*IncludeField + func (s *Scope) IncludedFieldsChan() <-chan *IncludeField + func (s *Scope) IncludedScopes() []*Scope + func (s *Scope) IncludedValues() *safemap.SafeHashMap + func (s *Scope) IncreaseErrorCount(count int) + func (s *Scope) InitializeIncluded(maxNestedLevel int) + func (s *Scope) IsMany() bool + func (s *Scope) IsPrimaryFieldSelected() bool + func (s *Scope) IsRoot() bool + func (s *Scope) IsSubscope() bool + func (s *Scope) Kind() Kind + func (s *Scope) LanguageFilter() *filters.FilterField + func (s *Scope) NewValueMany() + func (s *Scope) NewValueSingle() + func (s *Scope) NextIncludedField() bool + func (s *Scope) NonRootScope(mStruct *models.ModelStruct) *Scope + func (s *Scope) NotSelectedFields(foreignKeys ...bool) []*models.StructField + func (s *Scope) Pagination() *paginations.Pagination + func (s *Scope) PreparePaginatedValue(key, value string, index paginations.Parameter) *aerrors.ApiError + func (s *Scope) PrimaryFilters() []*filters.FilterField + func (s *Scope) Processor() Processor + func (s *Scope) QueryLanguage() language.Tag + func (s *Scope) RelationshipFilters() []*filters.FilterField + func (s *Scope) RemoveRelationshipFilter(at int) error + func (s *Scope) ResetIncludedField() + func (s *Scope) SelectedFields() []*models.StructField + func (s *Scope) SetAllFields() + func (s *Scope) SetBelongsToForeignKeyFields() error + func (s *Scope) SetCollectionScope(cs *Scope) + func (s *Scope) SetCollectionValues() error + func (s *Scope) SetEmptyFieldset() + func (s *Scope) SetFields(fields ...interface{}) error + func (s *Scope) SetFieldsetNoCheck(fields ...*models.StructField) + func (s *Scope) SetFlags(c *flags.Container) + func (s *Scope) SetFlagsFrom(flgs ...*flags.Container) + func (s *Scope) SetIDFilters(idValues ...interface{}) + func (s *Scope) SetIsMany(isMany bool) + func (s *Scope) SetKind(kind Kind) + func (s *Scope) SetLanguageFilter(languages ...interface{}) + func (s *Scope) SetNilFieldset() + func (s *Scope) SetPaginationNoCheck(p *paginations.Pagination) + func (s *Scope) SetPrimaryFilters(values ...interface{}) + func (s *Scope) SetProcessor(p Processor) + func (s *Scope) SetQueryLanguage(tag language.Tag) + func (s *Scope) SetRelationshipFilters(fs []*filters.FilterField) + func (s *Scope) SortFields() []*sorts.SortField + func (s *Scope) Struct() *models.ModelStruct + func (s *Scope) UseI18n() bool