innovationv1

package
v0.0.0-...-d9662de Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayOfInnovationData

type ArrayOfInnovationData []models.Innovation

type ArrayOfInnovationDetailData

type ArrayOfInnovationDetailData []models.InnovationDetail

type Hit

type Hit struct {
	models.Innovation
	// URL        string        `json:"url"`
	Sort       []interface{} `json:"sort"`
	Highlights *struct {
		Title       []string `json:"title"`
		Description []string `json:"descriptions"`
		Alt         []string `json:"alt"`
		Transcript  []string `json:"transcript"`
	} `json:"highlights,omitempty"`
}

Hit wraps the document returned in search response.

type InnovationDataArrayResult

type InnovationDataArrayResult httpsrv.ResultAnsw

type InnovationDataResult

type InnovationDataResult httpsrv.ResultAnsw

type InnovationV1

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

func NewInnovationV1

func NewInnovationV1(ctx *context.Context,
	profilev1 *profilev1.ProfileV1,
	orm *orm.ORM,
	userV1 *userv1.UserV1,
) (*InnovationV1, error)

func (*InnovationV1) CreateImages

func (inn *InnovationV1) CreateImages(actID string, multipartForm *multipart.Form) error

func (*InnovationV1) CreateInnovation

func (inn *InnovationV1) CreateInnovation(request *models.Innovation) (*models.Innovation, error)

func (*InnovationV1) GetExpertByInnovationID

func (inn *InnovationV1) GetExpertByInnovationID(id int64) (data *models.InnovationExperts, err error)

func (*InnovationV1) GetImage

func (inn *InnovationV1) GetImage(actID, imageID string) (*bytes.Buffer, int64, error)

func (*InnovationV1) GetInnovationByID

func (inn *InnovationV1) GetInnovationByID(id int64) (data *models.Innovation, err error)

func (*InnovationV1) GetInnovationByUserID

func (inn *InnovationV1) GetInnovationByUserID(id int64) (data *ArrayOfInnovationData, err error)

func (*InnovationV1) Search

func (inn *InnovationV1) Search(query string, after ...string) (*SearchResults, error)

Search returns results matching a query, paginated by after.

func (*InnovationV1) SearchTitle

func (inn *InnovationV1) SearchTitle(query string, after ...string) (*SearchResults, error)

Search returns results matching a query, paginated by after.

func (*InnovationV1) SelectAllInnovation

func (inn *InnovationV1) SelectAllInnovation() (data *ArrayOfInnovationData, err error)

func (*InnovationV1) UpdateInnovationByID

func (inn *InnovationV1) UpdateInnovationByID(id int64, patch *[]byte) (writeData *models.Innovation, err error)

type SearchDataResult

type SearchDataResult httpsrv.ResultAnsw

type SearchResults

type SearchResults struct {
	Total int    `json:"total"`
	Hits  []*Hit `json:"hits"`
}

SearchResults wraps the Elasticsearch search response.

Jump to

Keyboard shortcuts

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