Documentation ¶
Index ¶
- type OperationRepository
- func (r *OperationRepository) Create(ctx context.Context, operations ...*domain.Operation) error
- func (r *OperationRepository) DeleteByResourceID(ctx context.Context, id int64) (int64, error)
- func (r *OperationRepository) FindByNumber(ctx context.Context, number string, limit uint64, order string) ([]domain.Operation, error)
- type ResourceRepository
- func (r *ResourceRepository) All(ctx context.Context) ([]domain.Resource, error)
- func (r *ResourceRepository) Create(ctx context.Context, resource *domain.Resource) error
- func (r *ResourceRepository) FindByUID(ctx context.Context, uid string) (*domain.Resource, error)
- func (r *ResourceRepository) Update(ctx context.Context, resource *domain.Resource) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationRepository ¶
type OperationRepository struct {
// contains filtered or unexported fields
}
OperationRepository is responsible for operations data.
func (*OperationRepository) Create ¶
Create adds new records to the operations table. TODO: Benchmark & Speed Up (Batch INSERT).
func (*OperationRepository) DeleteByResourceID ¶
DeleteByResourceID removes records with specified resource_id from operations table.
type ResourceRepository ¶
type ResourceRepository struct {
// contains filtered or unexported fields
}
ResourceRepository is responsible for resources data.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an implementation of domain.Store interface based on SQL.
func (*Store) Operation ¶
func (s *Store) Operation() domain.OperationRepository
Operation returns repository, who is responsible for operations.
func (*Store) Resource ¶
func (s *Store) Resource() domain.ResourceRepository
Resource returns repository, who is responsible for resources.
Click to show internal directories.
Click to hide internal directories.