data

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseName = "ship.db"
)

Variables

ProviderSet is data providers.

Functions

func NewCloudRepo

func NewCloudRepo(data *Data, logger log.Logger) biz.CloudRepo

func NewSystemRepo

func NewSystemRepo(data *Data, logger log.Logger) biz.SystemRepo

Types

type DBDriver

type DBDriver string
const (
	DBDriverSQLite DBDriver = "sqlite"
)

func (DBDriver) String

func (d DBDriver) String() string

type Data

type Data struct {
	// contains filtered or unexported fields
}

func NewData

func NewData(logger log.Logger) (*Data, func(), error)

NewData .

func (*Data) Error

func (d *Data) Error(ctx context.Context, msg string, args ...interface{})

func (*Data) Info

func (d *Data) Info(ctx context.Context, msg string, args ...interface{})

func (*Data) LogMode

func (d *Data) LogMode(level gormLogger.LogLevel) gormLogger.Interface

func (*Data) Trace

func (d *Data) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*Data) Warn

func (d *Data) Warn(ctx context.Context, msg string, args ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL