recommender

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recommendation

type Recommendation struct {
	*recommenderpb.Recommendation
	Resource string
}

Recommendation model

func (*Recommendation) GetRecommendationCost added in v1.1.0

func (i *Recommendation) GetRecommendationCost() float64

GetRecommendationCost returns the cost

func (*Recommendation) GetRecommendationResource added in v1.1.0

func (i *Recommendation) GetRecommendationResource() string

GetRecommendationResource returns the resource type

type Recommendations

type Recommendations []*Recommendation

Recommendations model

func (Recommendations) GetRecommendationsCost added in v1.1.0

func (i Recommendations) GetRecommendationsCost() float64

GetRecommendationsCost returns sum cost of Recommendations

func (Recommendations) GetRecommendationsCount added in v1.1.0

func (i Recommendations) GetRecommendationsCount() int

GetRecommendationsCount returns length of Recommendation

type Service

type Service interface {
	Recommendation(ctx *context.Context, recommendation string) (Recommendations, error)
	Close() error
}

Service implements recommender service

func New

func New(ctx *context.Context, project string, options []*option.ClientOption) (Service, error)

New returns a new service

Jump to

Keyboard shortcuts

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