server

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

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	api.UnimplementedApiServer
	// contains filtered or unexported fields
}

Server is the main implementation of api.ApiServer.

func New

func New(config *configuration.Config, manager *models.Manager, logger zerolog.Logger) *Server

New creates a new Server.

func (*Server) Run

func (s *Server) Run() error

Run runs the server according to the configuration.

func (*Server) TranslateText

func (s *Server) TranslateText(_ context.Context, req *api.TranslateTextRequest) (resp *api.TranslateTextResponse, _ error)

TranslateText translates a text.

Jump to

Keyboard shortcuts

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