FAQ

package
v0.0.0-...-902682f Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFAQRepo

func CreateFAQRepo(conn *gorm.DB) FAQ.Repository

func ToListDomain

func ToListDomain(data []Faq) (result []FAQ.Domain)

Types

type FAQRepo

type FAQRepo struct {
	DB *gorm.DB
}

func (*FAQRepo) Create

func (rep *FAQRepo) Create(ctx context.Context, catC *FAQ.Domain) (FAQ.Domain, error)

func (*FAQRepo) Delete

func (rep *FAQRepo) Delete(ctx context.Context, id int) error

func (*FAQRepo) GetActive

func (rep *FAQRepo) GetActive(ctx context.Context) ([]FAQ.Domain, error)

func (*FAQRepo) GetAll

func (rep *FAQRepo) GetAll(ctx context.Context) ([]FAQ.Domain, error)

func (*FAQRepo) Update

func (rep *FAQRepo) Update(ctx context.Context, userU FAQ.Domain) (FAQ.Domain, error)

type Faq

type Faq struct {
	Id        int `gorm:"primaryKey"`
	Question  string
	Answer    string
	Status    int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func FromDomain

func FromDomain(domain FAQ.Domain) Faq

func (*Faq) ToDomain

func (user *Faq) ToDomain() FAQ.Domain

Jump to

Keyboard shortcuts

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