Documentation ¶
Index ¶
- type PersistableSampleRepository
- type ReadWriteRepository
- type SampleModel
- type SampleRepository
- func (r *SampleRepository) Count(options ...rest.QueryOptions) (int64, error)
- func (r *SampleRepository) EntityName() string
- func (r *SampleRepository) NewInstance() interface{}
- func (r *SampleRepository) Read(id string) (interface{}, error)
- func (r *SampleRepository) ReadAll(options ...rest.QueryOptions) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PersistableSampleRepository ¶
type PersistableSampleRepository struct {
SampleRepository
}
func NewPersistableSampleRepository ¶
func NewPersistableSampleRepository(ctx context.Context, logger ...rest.Logger) *PersistableSampleRepository
func (*PersistableSampleRepository) Delete ¶
func (r *PersistableSampleRepository) Delete(id string) error
func (*PersistableSampleRepository) Save ¶
func (r *PersistableSampleRepository) Save(entity interface{}) (string, error)
type ReadWriteRepository ¶
type ReadWriteRepository interface { rest.Repository rest.Persistable }
type SampleModel ¶
type SampleRepository ¶
type SampleRepository struct { Context context.Context Error error // contains filtered or unexported fields }
SampleRepository is a simple in-memory repository implementation. NOTE: This repository does not handle QueryOptions
func NewSampleRepository ¶
func NewSampleRepository(ctx context.Context, logger ...rest.Logger) *SampleRepository
NewSampleRepository returns a new SampleRepository
func (*SampleRepository) Count ¶
func (r *SampleRepository) Count(options ...rest.QueryOptions) (int64, error)
func (*SampleRepository) EntityName ¶
func (r *SampleRepository) EntityName() string
func (*SampleRepository) NewInstance ¶
func (r *SampleRepository) NewInstance() interface{}
func (*SampleRepository) Read ¶
func (r *SampleRepository) Read(id string) (interface{}, error)
func (*SampleRepository) ReadAll ¶
func (r *SampleRepository) ReadAll(options ...rest.QueryOptions) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.