Documentation ¶
Index ¶
- Constants
- func AggregatorInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- type AggregatorService
- type AggregatorServiceClient
- type AggregatorServiceImpl
- func (a *AggregatorServiceImpl) CreateNewEntry(stream pb.Aristarchos_CreateNewEntryServer) error
- func (a *AggregatorServiceImpl) Health(context.Context, *pb.HealthRequest) (*pb.HealthResponse, error)
- func (a *AggregatorServiceImpl) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
- func (a *AggregatorServiceImpl) RetrieveRootFromGrammarForm(ctx context.Context, request *pb.AggregatorRequest) (*pb.FormsResponse, error)
- func (a *AggregatorServiceImpl) RetrieveSearchWords(ctx context.Context, request *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
- type ClientAggregator
- func (c *ClientAggregator) CreateNewEntry(ctx context.Context) (pb.Aristarchos_CreateNewEntryClient, error)
- func (c *ClientAggregator) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)
- func (c *ClientAggregator) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
- func (c *ClientAggregator) RetrieveRootFromGrammarForm(ctx context.Context, request *pb.AggregatorRequest) (*pb.FormsResponse, error)
- func (c *ClientAggregator) RetrieveSearchWords(ctx context.Context, request *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
- func (c *ClientAggregator) WaitForHealthyState() bool
- type GrammaticalCategory
- type GrammaticalForm
- type MockAggregatorService
- func (m *MockAggregatorService) CreateNewEntry(ctx context.Context) (pb.Aristarchos_CreateNewEntryClient, error)
- func (m *MockAggregatorService) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)
- func (m *MockAggregatorService) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
- func (m *MockAggregatorService) RetrieveRootFromGrammarForm(ctx context.Context, in *pb.AggregatorRequest) (*pb.FormsResponse, error)
- func (m *MockAggregatorService) RetrieveSearchWords(ctx context.Context, in *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
- func (m *MockAggregatorService) WaitForHealthyState() bool
- type RootWordEntry
- type Variant
Constants ¶
View Source
const (
DEFAULTADDRESS string = "localhost:50060"
)
View Source
const (
ROOTWORD = "rootWord"
)
Variables ¶
This section is empty.
Functions ¶
func AggregatorInterceptor ¶ added in v0.0.4
func AggregatorInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
type AggregatorService ¶
type AggregatorService interface { WaitForHealthyState() bool CreateNewEntry(ctx context.Context) (pb.Aristarchos_CreateNewEntryClient, error) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error) RetrieveRootFromGrammarForm(ctx context.Context, in *pb.AggregatorRequest) (*pb.FormsResponse, error) RetrieveSearchWords(ctx context.Context, in *pb.AggregatorRequest) (*pb.SearchWordResponse, error) }
type AggregatorServiceClient ¶
type AggregatorServiceClient struct {
Impl AggregatorService
}
type AggregatorServiceImpl ¶
type AggregatorServiceImpl struct { Elastic aristoteles.Client Index string pb.UnimplementedAristarchosServer }
func CreateNewConfig ¶
func CreateNewConfig(ctx context.Context) (*AggregatorServiceImpl, error)
func (*AggregatorServiceImpl) CreateNewEntry ¶
func (a *AggregatorServiceImpl) CreateNewEntry(stream pb.Aristarchos_CreateNewEntryServer) error
func (*AggregatorServiceImpl) Health ¶
func (a *AggregatorServiceImpl) Health(context.Context, *pb.HealthRequest) (*pb.HealthResponse, error)
func (*AggregatorServiceImpl) RetrieveEntry ¶
func (a *AggregatorServiceImpl) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
func (*AggregatorServiceImpl) RetrieveRootFromGrammarForm ¶ added in v0.0.11
func (a *AggregatorServiceImpl) RetrieveRootFromGrammarForm(ctx context.Context, request *pb.AggregatorRequest) (*pb.FormsResponse, error)
func (*AggregatorServiceImpl) RetrieveSearchWords ¶
func (a *AggregatorServiceImpl) RetrieveSearchWords(ctx context.Context, request *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
type ClientAggregator ¶
type ClientAggregator struct {
// contains filtered or unexported fields
}
func NewClientAggregator ¶
func NewClientAggregator(address string) (*ClientAggregator, error)
func (*ClientAggregator) CreateNewEntry ¶
func (c *ClientAggregator) CreateNewEntry(ctx context.Context) (pb.Aristarchos_CreateNewEntryClient, error)
func (*ClientAggregator) Health ¶
func (c *ClientAggregator) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)
func (*ClientAggregator) RetrieveEntry ¶
func (c *ClientAggregator) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
func (*ClientAggregator) RetrieveRootFromGrammarForm ¶ added in v0.0.11
func (c *ClientAggregator) RetrieveRootFromGrammarForm(ctx context.Context, request *pb.AggregatorRequest) (*pb.FormsResponse, error)
func (*ClientAggregator) RetrieveSearchWords ¶
func (c *ClientAggregator) RetrieveSearchWords(ctx context.Context, request *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
func (*ClientAggregator) WaitForHealthyState ¶
func (c *ClientAggregator) WaitForHealthyState() bool
type GrammaticalCategory ¶ added in v0.0.3
type GrammaticalCategory struct {
Forms []GrammaticalForm `json:"forms"`
}
type GrammaticalForm ¶ added in v0.0.3
type MockAggregatorService ¶ added in v0.0.11
MockAggregatorService is a mock implementation of the AggregatorService interface
func (*MockAggregatorService) CreateNewEntry ¶ added in v0.0.11
func (m *MockAggregatorService) CreateNewEntry(ctx context.Context) (pb.Aristarchos_CreateNewEntryClient, error)
CreateNewEntry is a mock implementation of the CreateNewEntry method
func (*MockAggregatorService) Health ¶ added in v0.0.11
func (m *MockAggregatorService) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)
Health is a mock implementation of the Health method
func (*MockAggregatorService) RetrieveEntry ¶ added in v0.0.11
func (m *MockAggregatorService) RetrieveEntry(ctx context.Context, request *pb.AggregatorRequest) (*pb.RootWordResponse, error)
RetrieveEntry is a mock implementation of the RetrieveEntry method
func (*MockAggregatorService) RetrieveRootFromGrammarForm ¶ added in v0.0.11
func (m *MockAggregatorService) RetrieveRootFromGrammarForm(ctx context.Context, in *pb.AggregatorRequest) (*pb.FormsResponse, error)
RetrieveRootFromGrammarForm is a mock implementation of the RetrieveRootFromGrammarForm method
func (*MockAggregatorService) RetrieveSearchWords ¶ added in v0.0.11
func (m *MockAggregatorService) RetrieveSearchWords(ctx context.Context, in *pb.AggregatorRequest) (*pb.SearchWordResponse, error)
RetrieveSearchWords is a mock implementation of the RetrieveSearchWords method
func (*MockAggregatorService) WaitForHealthyState ¶ added in v0.0.11
func (m *MockAggregatorService) WaitForHealthyState() bool
WaitForHealthyState checks the health of the service within a timeout period
type RootWordEntry ¶
type RootWordEntry struct { RootWord string `json:"rootWord"` PartOfSpeech string `json:"partOfSpeech"` // E.g., "verb", "noun", "participle" Translations []string `json:"translations"` UnaccentedWord string `json:"unaccented"` Variants []Variant `json:"variants"` Categories []GrammaticalCategory `json:"categories"` }
func UnmarshalRootWordEntry ¶
func UnmarshalRootWordEntry(data []byte) (RootWordEntry, error)
Click to show internal directories.
Click to hide internal directories.