Documentation
¶
Index ¶
- type DbContext
- type Execution
- type Identity
- type Persistence
- type QueryResult
- type Repository
- type Script
- type ScriptEntity
- type Service
- func (service *Service) CreateScript(ctx context.Context, projectID string, script Script) (dal.Entity, error)
- func (service *Service) DeleteScript(ctx context.Context, projectID, id string) error
- func (service *Service) FindScripts(ctx context.Context, projectID string, q dal.Query) (QueryResult, error)
- func (service *Service) GetScript(ctx context.Context, projectID, id string) (ScriptEntity, error)
- func (service *Service) UpdateScript(ctx context.Context, projectID string, script UpdateScript) (dal.Entity, error)
- type UpdateScript
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbContext ¶
type DbContext interface {
GetScriptsRepository(projectID string) (Repository, error)
}
type Persistence ¶
type Persistence struct {
Enabled bool `json:"enabled"`
}
type QueryResult ¶
type QueryResult struct {
dal.QueryResult
Data []ScriptEntity
}
type Repository ¶
type Repository interface {
Get(ctx context.Context, id string) (ScriptEntity, error)
Find(ctx context.Context, query dal.Query) (QueryResult, error)
Create(ctx context.Context, script Script) (dal.Entity, error)
Update(ctx context.Context, script UpdateScript) (dal.Entity, error)
Delete(ctx context.Context, id string) error
}
type Script ¶
type Script struct {
dal.Definition
Execution Execution `json:"execution"`
Persistence Persistence `json:"persistence"`
}
type ScriptEntity ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateScript ¶
func (*Service) DeleteScript ¶
func (*Service) FindScripts ¶
func (*Service) UpdateScript ¶
type UpdateScript ¶
Click to show internal directories.
Click to hide internal directories.