faqs

package
v0.0.0-...-8f43f39 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFaqsResponse

type CreateFaqsResponse struct {
	StatusCode int                `json:"status"`
	Results    []CreateFaqsResult `json:"results"`
}

type CreateFaqsResult

type CreateFaqsResult struct {
	Response *Faq                `json:"faq"`
	Error    api_errors.ApiError `json:"error"`
}

type Faq

type Faq struct {
	Id        int64          `gorm:"primaryKey" json:"id"`
	UniqHash  string         `gorm:"unique" json:"uniq_hash"`
	Question  string         `gorm:"not null" json:"question"`
	Answer    string         `gorm:"not null" json:"answer"`
	CreatedAt time.Time      `gorm:"autoCreateTime" json:"created_at"`
	UpdatedAt time.Time      `gorm:"autoUpdateTime" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
}

func (*Faq) Delete

func (faq *Faq) Delete() api_errors.ApiError

func (*Faq) Get

func (faq *Faq) Get() api_errors.ApiError

func (*Faq) Save

func (faq *Faq) Save() api_errors.ApiError

func (*Faq) Update

func (faq *Faq) Update() api_errors.ApiError

func (*Faq) Validate

func (faq *Faq) Validate() api_errors.ApiError

type FaqCreateInput

type FaqCreateInput struct {
	Question string `json:"question" binding:"required"`
	Answer   string `json:"answer" binding:"required"`
}

type FaqDocument

type FaqDocument struct {
	Id        int64     `json:"id"`
	UniqHash  string    `json:"uniq_hash"`
	Question  string    `json:"question"`
	Answer    string    `json:"answer"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func NewDocFromFaq

func NewDocFromFaq(faq *Faq) *FaqDocument

func (*FaqDocument) Delete

func (f *FaqDocument) Delete(query *queries.EsQuery) api_errors.ApiError

func (*FaqDocument) GetStringId

func (f *FaqDocument) GetStringId() string

func (*FaqDocument) Save

func (f *FaqDocument) Save() api_errors.ApiError

func (*FaqDocument) Search

func (f *FaqDocument) Search(query *queries.EsQuery) ([]FaqDocument, api_errors.ApiError)

type FaqDocuments

type FaqDocuments []FaqDocument

type FaqRepositoryInterface

type FaqRepositoryInterface interface {
	Get() api_errors.ApiError
	Save() api_errors.ApiError
	Update() api_errors.ApiError
	Delete() api_errors.ApiError
}

type FaqUpdateInput

type FaqUpdateInput FaqCreateInput

type Faqs

type Faqs []Faq

func (*Faqs) GetAll

func (faqs *Faqs) GetAll() api_errors.ApiError

Jump to

Keyboard shortcuts

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