Documentation ¶
Index ¶
- type Address
- type DAO
- type JdbcImpl
- func (impl *JdbcImpl) CreateAddress(ctx context.Context, address *Address) error
- func (impl *JdbcImpl) DeleteAddress(ctx context.Context, id uint) error
- func (impl *JdbcImpl) GetAddressById(ctx context.Context, id uint) (*Address, error)
- func (impl *JdbcImpl) GetAddressesByUserId(ctx context.Context, userId uint) (addrs []*Address, err error)
- func (impl *JdbcImpl) UpdateAddress(ctx context.Context, address *Address) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { global.Model UserId uint `json:"userId" gorm:"column:userId;type:uint;size:32;not null"` Country string `json:"country" gorm:"column:country;type:varchar(255);not null;index:country"` Province string `json:"province" gorm:"column:province;type:varchar(255);not null;index:province"` City string `json:"city" gorm:"column:city;type:varchar(255);not null;index:city"` Distinct string `json:"distinct" gorm:"column:distinct;type:varchar(255);not null;index:distinct"` Street string `json:"street" gorm:"column:street;type:varchar(255);not null;index:street"` Detail string `json:"detail" gorm:"column:detail;type:varchar(255);not null"` Tag string `json:"tag" gorm:"column:tag;type:varchar(255);default:'';index:tag"` }
type DAO ¶
type DAO interface { GetAddressById(ctx context.Context, id uint) (*Address, error) GetAddressesByUserId(ctx context.Context, userId uint) ([]*Address, error) CreateAddress(ctx context.Context, address *Address) error UpdateAddress(ctx context.Context, address *Address) error DeleteAddress(ctx context.Context, id uint) error }
type JdbcImpl ¶
type JdbcImpl struct {
// contains filtered or unexported fields
}
func NewJdbcImpl ¶
func (*JdbcImpl) CreateAddress ¶
func (*JdbcImpl) DeleteAddress ¶
func (*JdbcImpl) GetAddressById ¶
func (*JdbcImpl) GetAddressesByUserId ¶
Click to show internal directories.
Click to hide internal directories.