Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFieldTwice = errors.New("arcah/acquery: some field was found twice")
View Source
var ErrInvalidFirstChar = errors.New("arcah/acquery: OrderField first char must be '+' or '-' (either asc or desc ordering)")
View Source
var ErrInvalidOrderFields = errors.New("arcah/acquery: invalid order fields provided")
View Source
var NoLimitPagination = Pagination{ Offset: 0, Limit: ^uint32(0), }
Functions ¶
This section is empty.
Types ¶
type MongoEngine ¶
type OrderField ¶
func (*OrderField) MarshalText ¶
func (f *OrderField) MarshalText() ([]byte, error)
func (*OrderField) UnmarshalText ¶
func (f *OrderField) UnmarshalText(data []byte) (err error)
type OrderFields ¶
type OrderFields []OrderField
func (OrderFields) GetFields ¶
func (fields OrderFields) GetFields() bson.D
func (*OrderFields) MarshalText ¶
func (fields *OrderFields) MarshalText() (res []byte, err error)
func (*OrderFields) UnmarshalText ¶
func (fields *OrderFields) UnmarshalText(data []byte) (err error)
type OrderSchema ¶
func (*OrderSchema) AddField ¶
func (schema *OrderSchema) AddField(userAlias, dbName string) *OrderSchema
func (*OrderSchema) Process ¶
func (schema *OrderSchema) Process(fields OrderFields) (res OrderFields)
Processes fields, and applies aliases
func (*OrderSchema) Validate ¶
func (schema *OrderSchema) Validate(fields OrderFields) (err error)
type OrderSchemaFactory ¶
type OrderSchemaFactory interface {
CreateOrderSchema(ctx context.Context, ty reflect.Type) (schema *OrderSchema, err error)
}
func NewMongoOrderSchemaFactory ¶
func NewMongoOrderSchemaFactory() OrderSchemaFactory
type Pagination ¶
type Pagination struct { Offset uint32 `json:"offset" schema:"offset"` Limit uint32 `json:"limit" schema:"limit"` }
Base type of pagination used in acquery.
func (*Pagination) WithMaxLimit ¶
func (p *Pagination) WithMaxLimit(limit uint32) Pagination
Click to show internal directories.
Click to hide internal directories.