Documentation ¶
Index ¶
- Variables
- func ToWriter(srv *Service) execution.OutputWriter
- type DbContext
- type QueryResult
- type Record
- type RecordEntity
- type Repository
- type Service
- func (service *Service) CreateRecord(ctx context.Context, job execution.Job, data interface{}) (dal.Entity, error)
- func (service *Service) DeleteRecord(ctx context.Context, identity scripts.Identity, id string) error
- func (service *Service) FindProjectRecords(ctx context.Context, projectID string, q dal.Query) (QueryResult, error)
- func (service *Service) FindScriptRecords(ctx context.Context, identity scripts.Identity, q dal.Query) (QueryResult, error)
- func (service *Service) GetRecord(ctx context.Context, identity scripts.Identity, id string) (RecordEntity, error)
- func (service *Service) UpdateRecord(ctx context.Context, projectID string, record Record) (dal.Entity, error)
- type WriterFn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPersistence = errors.New("local persistence not available")
)
Functions ¶
func ToWriter ¶
func ToWriter(srv *Service) execution.OutputWriter
Types ¶
type DbContext ¶
type DbContext interface { GetScriptsRepository(projectID string) (scripts.Repository, error) GetDataRepository(projectID string) (Repository, error) }
type QueryResult ¶
type QueryResult struct { dal.QueryResult Data []RecordEntity }
type RecordEntity ¶
type Repository ¶
type Repository interface { Create(ctx context.Context, record Record) (dal.Entity, error) Update(ctx context.Context, record Record) (dal.Entity, error) Get(ctx context.Context, id string) (RecordEntity, error) Delete(ctx context.Context, id string) error Find(ctx context.Context, q dal.Query) (QueryResult, error) FindByScriptID(ctx context.Context, scriptID string, q dal.Query) (QueryResult, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateRecord ¶
func (*Service) DeleteRecord ¶
func (*Service) FindProjectRecords ¶
func (*Service) FindScriptRecords ¶
Click to show internal directories.
Click to hide internal directories.