Documentation
¶
Index ¶
- func CamelToSnakeCase(input string) string
- func GetCamelToSnakeCaseMapping(model interface{}) (map[string]string, error)
- func IsNumber(a interface{}) bool
- func NewImmutableRepository(db *gorm.DB) repository.ImmutableGenericRepositoryInterface
- func NewMutableRepository(db *gorm.DB) repository.MutableGenericRepositoryInterface
- func NewRepository(db *gorm.DB) repository.GenericRepositoryInterface
- type GenericRepository
- func (r *GenericRepository) BulkInsert(ctx context.Context, data interface{}) (interface{}, error)
- func (r *GenericRepository) BulkUpsert(ctx context.Context, data interface{}) (interface{}, error)
- func (r *GenericRepository) Delete(ctx context.Context, data interface{}) (interface{}, error)
- func (r *GenericRepository) FindAll(ctx context.Context, params map[string]interface{}, ...) (interface{}, error)
- func (r *GenericRepository) FindByID(ctx context.Context, id uuid.UUID, result interface{}) (interface{}, error)
- func (r *GenericRepository) FindOne(ctx context.Context, key string, value interface{}, result interface{}) (interface{}, error)
- func (r *GenericRepository) Insert(ctx context.Context, data interface{}) (interface{}, error)
- func (r *GenericRepository) Query(ctx context.Context, query string, params []interface{}, result interface{}) (interface{}, error)
- func (r *GenericRepository) Update(ctx context.Context, data interface{}) (interface{}, error)
- func (r *GenericRepository) Upsert(ctx context.Context, data interface{}) (interface{}, error)
- type ImmutableGenericRepository
- func (r *ImmutableGenericRepository) BulkInsert(ctx context.Context, data interface{}) (interface{}, error)
- func (r *ImmutableGenericRepository) FindAll(ctx context.Context, params map[string]interface{}, ...) (interface{}, error)
- func (r *ImmutableGenericRepository) FindByID(ctx context.Context, id uuid.UUID, result interface{}) (interface{}, error)
- func (r *ImmutableGenericRepository) FindOne(ctx context.Context, key string, value interface{}, result interface{}) (interface{}, error)
- func (r *ImmutableGenericRepository) Insert(ctx context.Context, data interface{}) (interface{}, error)
- func (r *ImmutableGenericRepository) Query(ctx context.Context, query string, params []interface{}, result interface{}) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnakeCase ¶
func NewImmutableRepository ¶
func NewImmutableRepository(db *gorm.DB) repository.ImmutableGenericRepositoryInterface
func NewMutableRepository ¶
func NewMutableRepository(db *gorm.DB) repository.MutableGenericRepositoryInterface
func NewRepository ¶
func NewRepository(db *gorm.DB) repository.GenericRepositoryInterface
Types ¶
type GenericRepository ¶
type GenericRepository struct {
// contains filtered or unexported fields
}
func (*GenericRepository) BulkInsert ¶
func (r *GenericRepository) BulkInsert(ctx context.Context, data interface{}) (interface{}, error)
func (*GenericRepository) BulkUpsert ¶
func (r *GenericRepository) BulkUpsert(ctx context.Context, data interface{}) (interface{}, error)
func (*GenericRepository) Delete ¶
func (r *GenericRepository) Delete(ctx context.Context, data interface{}) (interface{}, error)
func (*GenericRepository) FindAll ¶
func (r *GenericRepository) FindAll(ctx context.Context, params map[string]interface{}, conditionalOperations []repository.ConditionalOperation, relationalOperations []repository.RelationalOperation, page int, limit int, result interface{}) (interface{}, error)
func (*GenericRepository) FindOne ¶
func (r *GenericRepository) FindOne(ctx context.Context, key string, value interface{}, result interface{}) (interface{}, error)
func (*GenericRepository) Insert ¶
func (r *GenericRepository) Insert(ctx context.Context, data interface{}) (interface{}, error)
func (*GenericRepository) Query ¶
func (r *GenericRepository) Query(ctx context.Context, query string, params []interface{}, result interface{}) (interface{}, error)
type ImmutableGenericRepository ¶
type ImmutableGenericRepository struct {
// contains filtered or unexported fields
}
func (*ImmutableGenericRepository) BulkInsert ¶
func (r *ImmutableGenericRepository) BulkInsert(ctx context.Context, data interface{}) (interface{}, error)
func (*ImmutableGenericRepository) FindAll ¶
func (r *ImmutableGenericRepository) FindAll(ctx context.Context, params map[string]interface{}, conditionalOperations []repository.ConditionalOperation, relationalOperations []repository.RelationalOperation, page int, limit int, result interface{}) (interface{}, error)
func (*ImmutableGenericRepository) FindOne ¶
func (r *ImmutableGenericRepository) FindOne(ctx context.Context, key string, value interface{}, result interface{}) (interface{}, error)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
We create this empty file as the workaround for this bug: https://github.com/golang/go/issues/27333
|
We create this empty file as the workaround for this bug: https://github.com/golang/go/issues/27333 |
Click to show internal directories.
Click to hide internal directories.