db

package
v0.0.0-...-120aaed Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	HealthCheck() error
	Start() error
	Db() *sqlx.DB
	Log() *logger.Service
}

func New

func New(i di.Injector) (Service, error)

type ServiceImpl

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

func (*ServiceImpl) Db

func (s *ServiceImpl) Db() *sqlx.DB

func (*ServiceImpl) HealthCheck

func (s *ServiceImpl) HealthCheck() error

func (*ServiceImpl) Log

func (s *ServiceImpl) Log() *logger.Service

func (*ServiceImpl) Shutdown

func (s *ServiceImpl) Shutdown() error

func (*ServiceImpl) Start

func (s *ServiceImpl) Start() error

type User

type User struct {
	ID        int    `db:"id" goqu:"skipinsert"`
	FirstName string `db:"tex"`
	Age       int    `db:"myint"`
}

Jump to

Keyboard shortcuts

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