model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Country

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

Country - Country storage

func NewCountry

func NewCountry(db *gorm.DB) *Country

NewCountry - Create a country storage instance

func (*Country) Create

func (a *Country) Create(ctx context.Context, item schema.Country) error

Create - Create data

func (*Country) Delete

func (a *Country) Delete(ctx context.Context, code string) error

Delete - delete data

func (*Country) Get

func (a *Country) Get(ctx context.Context, code string, opts ...schema.CountryQueryOptions) (*schema.Country, error)

Get - Query specified data

func (*Country) Query

Query - Query data

func (*Country) Update

func (a *Country) Update(ctx context.Context, code string, item schema.Country) error

Update - Update data

func (*Country) UpdateStatus

func (a *Country) UpdateStatus(ctx context.Context, code string, status int) error

UpdateStatus - update status

type Language

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

Language - Language storage

func NewLanguage

func NewLanguage(db *gorm.DB) *Language

NewLanguage - Create a language storage instance

func (*Language) Create

func (a *Language) Create(ctx context.Context, item schema.Language) error

Create - Create data

func (*Language) Delete

func (a *Language) Delete(ctx context.Context, code string) error

Delete - delete data

func (*Language) Get

Get - Query specified data

func (*Language) Query

Query - Query data

func (*Language) Update

func (a *Language) Update(ctx context.Context, code string, item schema.Language) error

Update - Update data

func (*Language) UpdateStatus

func (a *Language) UpdateStatus(ctx context.Context, code string, status int) error

UpdateStatus - update status

Jump to

Keyboard shortcuts

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