Documentation ¶
Index ¶
- type Configurator
- type Storage
- func (storage *Storage) CreateSchema(ctx context.Context, tokenID domain.ID, data query.CreateSchema) (types.Schema, error)
- func (storage *Storage) CreateTemplate(ctx context.Context, tokenID domain.ID, data query.CreateTemplate) (types.Template, error)
- func (storage *Storage) Database() *sql.DB
- func (storage *Storage) DeleteSchema(ctx context.Context, tokenID domain.ID, data query.DeleteSchema) (types.Schema, error)
- func (storage *Storage) DeleteTemplate(ctx context.Context, tokenID domain.ID, data query.DeleteTemplate) (types.Template, error)
- func (storage *Storage) Dialect() string
- func (storage *Storage) LogInput(ctx context.Context, event domain.InputEvent) error
- func (storage *Storage) ReadInputByFilter(ctx context.Context, tokenID domain.ID, filter query.InputFilter) ([]types.Input, error)
- func (storage *Storage) ReadInputByID(ctx context.Context, tokenID domain.ID, id domain.ID) (types.Input, error)
- func (storage *Storage) ReadSchema(ctx context.Context, tokenID domain.ID, data query.ReadSchema) (types.Schema, error)
- func (storage *Storage) ReadTemplate(ctx context.Context, tokenID domain.ID, data query.ReadTemplate) (types.Template, error)
- func (storage *Storage) Schema(ctx context.Context, id domain.ID) (domain.Schema, error)
- func (storage *Storage) StoreInput(ctx context.Context, schemaID domain.ID, verified domain.InputData) (*types.Input, error)
- func (storage *Storage) Template(ctx context.Context, id domain.ID) (domain.Template, error)
- func (storage *Storage) UpdateSchema(ctx context.Context, tokenID domain.ID, data query.UpdateSchema) (types.Schema, error)
- func (storage *Storage) UpdateTemplate(ctx context.Context, tokenID domain.ID, data query.UpdateTemplate) (types.Template, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurator ¶
Configurator defines a function which can use to configure the Storage.
func Database ¶
func Database(cnf config.DatabaseConfig) Configurator
Database returns database configurator.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is an implementation of Data Access Object.
func Must ¶
func Must(configs ...Configurator) *Storage
Must returns a new instance of the Storage or panics if it cannot configure it.
func New ¶
func New(configs ...Configurator) (*Storage, error)
New returns a new instance of the Storage or an error if it cannot configure it.
func (*Storage) CreateSchema ¶
func (storage *Storage) CreateSchema(ctx context.Context, tokenID domain.ID, data query.CreateSchema) (types.Schema, error)
CreateSchema TODO issue#173
func (*Storage) CreateTemplate ¶
func (storage *Storage) CreateTemplate(ctx context.Context, tokenID domain.ID, data query.CreateTemplate) (types.Template, error)
CreateTemplate TODO issue#173
func (*Storage) DeleteSchema ¶
func (storage *Storage) DeleteSchema(ctx context.Context, tokenID domain.ID, data query.DeleteSchema) (types.Schema, error)
DeleteSchema TODO issue#173
func (*Storage) DeleteTemplate ¶
func (storage *Storage) DeleteTemplate(ctx context.Context, tokenID domain.ID, data query.DeleteTemplate) (types.Template, error)
DeleteTemplate TODO issue#173
func (*Storage) ReadInputByFilter ¶
func (storage *Storage) ReadInputByFilter(ctx context.Context, tokenID domain.ID, filter query.InputFilter) ([]types.Input, error)
ReadInputByFilter TODO issue#173
func (*Storage) ReadInputByID ¶
func (storage *Storage) ReadInputByID(ctx context.Context, tokenID domain.ID, id domain.ID) (types.Input, error)
ReadInputByID TODO issue#173
func (*Storage) ReadSchema ¶
func (storage *Storage) ReadSchema(ctx context.Context, tokenID domain.ID, data query.ReadSchema) (types.Schema, error)
ReadSchema TODO issue#173
func (*Storage) ReadTemplate ¶
func (storage *Storage) ReadTemplate(ctx context.Context, tokenID domain.ID, data query.ReadTemplate) (types.Template, error)
ReadTemplate TODO issue#173
func (*Storage) StoreInput ¶
func (storage *Storage) StoreInput(ctx context.Context, schemaID domain.ID, verified domain.InputData) (*types.Input, error)
StoreInput stores an user input data.
Click to show internal directories.
Click to hide internal directories.