Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { FilterField string `json:"filter_field" form:"filter_field" validate:"required,ne="` Operator string `json:"operate" form:"operator" validate:"required,oneof=== != > >= < <= in not-in like between"` Value interface{} `json:"value" form:"value" validate:"required"` }
Filter -.
type ICRUDRepository ¶
type ICRUDRepository interface { GetByID(ctx context.Context, e IEntity) (IEntity, error) GetAll(ctx context.Context, sq *SearchQuery, e IEntity) (*List, error) Create(ctx context.Context, e IEntity) (IEntity, error) Update(ctx context.Context, e IEntity) (IEntity, error) UpdateWithFields(ctx context.Context, e IEntity, keys []string) (IEntity, error) Delete(ctx context.Context, e IEntity) (IEntity, error) CreateTx(context.Context, IEntity, ITransactionEvent) (IEntity, error) UpdateTx(context.Context, IEntity, ITransactionEvent) (IEntity, error) UpdateWithFieldsTx(context.Context, IEntity, []string, ITransactionEvent) (IEntity, error) DeleteTx(context.Context, IEntity, ITransactionEvent) (IEntity, error) }
type ICacheUpdateRepository ¶
type ITransactionEvent ¶
type ITransactionEvent interface {
GetTx() interface{}
}
type ITransactionRepo ¶
type ITransactionRepo interface {
RunTransaction(ctx context.Context, f TransactionEventFunc) error
}
type Order ¶
type Order struct { OrderField string `json:"order_field" form:"order_field" validate:"required,ne="` Dir string `json:"dir" form:"dir" validate:"omitempty,oneof=asc desc"` }
Sort -.
type SearchQuery ¶
type SearchQuery struct { Page Page `json:"page" binding:"required" form:"page" validate:"required"` Filters []Filter `json:"filters" form:"filters"` Orders []Order `json:"orders" form:"orders"` }
func (*SearchQuery) GetArgs ¶
func (sq *SearchQuery) GetArgs() []interface{}
func (*SearchQuery) GetKey ¶
func (sq *SearchQuery) GetKey() string
func (*SearchQuery) GetOrder ¶
func (sq *SearchQuery) GetOrder() string
func (*SearchQuery) GetWhere ¶
func (sq *SearchQuery) GetWhere() string
type TransactionEventFunc ¶
type TransactionEventFunc func(context.Context, ITransactionEvent) error
Click to show internal directories.
Click to hide internal directories.