Documentation
¶
Index ¶
- func MigrateDB(ctx context.Context, cfg *config.Migrate) error
- type Note
- type NoteIDName
- type Postgres
- func (s *Postgres) Close()
- func (s *Postgres) Delete(ctx context.Context, id string) error
- func (s *Postgres) Get(ctx context.Context, id string) (*service.Note, error)
- func (s *Postgres) GetNotes(ctx context.Context) ([]service.IDName, error)
- func (s *Postgres) GetWithPath(ctx context.Context, path string) (*service.Note, error)
- func (s *Postgres) Save(ctx context.Context, note *service.Note) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Note ¶
type Note struct {
ID string `db:"id" goqu:"skipupdate"`
Name string `db:"name"`
Content types.JSON[service.Content] `db:"content"`
Path string `db:"path"`
UpdatedBy types.Null[string] `db:"updated_by"`
CreatedAt types.Null[types.Time] `db:"created_at" goqu:"skipupdate"`
UpdatedAt types.Null[types.Time] `db:"updated_at"`
}
type NoteIDName ¶
Click to show internal directories.
Click to hide internal directories.