Documentation
¶
Index ¶
- Variables
- func Close(c io.Closer, f func(err error))
- func EnsureNotNil[T any](v *T, def T) T
- func NewContext() context.Context
- func NewNullInt64(n int64) sql.NullInt64
- func NewNullString(s string) sql.NullString
- func NewSqliteDataStore(args Args) sqlcx.DataStore
- func Ptr[T any](a T) *T
- func WarnOnError(err error)
- type Args
- type SqliteDataStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAppNameMustNotBeEmpty = errors.New("app name must not be empty") ErrFailedToGetConfigPath = errors.New("failed to get config path") )
Functions ¶
func EnsureNotNil ¶
func EnsureNotNil[T any](v *T, def T) T
func NewContext ¶
func NewNullInt64 ¶
func NewNullString ¶
func NewNullString(s string) sql.NullString
func NewSqliteDataStore ¶
func WarnOnError ¶
func WarnOnError(err error)
Types ¶
type SqliteDataStore ¶
type SqliteDataStore struct {
AppName string
// contains filtered or unexported fields
}
func (*SqliteDataStore) DB ¶
func (ds *SqliteDataStore) DB() sqlcx.DBTX
func (*SqliteDataStore) Filepath ¶
func (ds *SqliteDataStore) Filepath() string
func (*SqliteDataStore) Initialize ¶
func (ds *SqliteDataStore) Initialize(ctx context.Context) (err error)
func (*SqliteDataStore) Open ¶
func (ds *SqliteDataStore) Open() (err error)
Click to show internal directories.
Click to hide internal directories.