SYMBOL INDEX (275 symbols across 60 files) FILE: cmd/app/main.go function main (line 10) | func main() { FILE: config/config.go type Config (line 11) | type Config struct type App (line 24) | type App struct type HTTP (line 30) | type HTTP struct type Log (line 36) | type Log struct type PG (line 41) | type PG struct type GRPC (line 47) | type GRPC struct type RMQ (line 52) | type RMQ struct type NATS (line 59) | type NATS struct type Metrics (line 65) | type Metrics struct type Swagger (line 70) | type Swagger struct function NewConfig (line 76) | func NewConfig() (*Config, error) { FILE: docs/docs.go constant docTemplate (line 6) | docTemplate = `{ function init (line 177) | func init() { FILE: docs/proto/v1/translation.history.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type GetHistoryRequest (line 25) | type GetHistoryRequest struct method Reset (line 31) | func (x *GetHistoryRequest) Reset() { method String (line 38) | func (x *GetHistoryRequest) String() string { method ProtoMessage (line 42) | func (*GetHistoryRequest) ProtoMessage() {} method ProtoReflect (line 44) | func (x *GetHistoryRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 57) | func (*GetHistoryRequest) Descriptor() ([]byte, []int) { type GetHistoryResponse (line 62) | type GetHistoryResponse struct method Reset (line 69) | func (x *GetHistoryResponse) Reset() { method String (line 76) | func (x *GetHistoryResponse) String() string { method ProtoMessage (line 80) | func (*GetHistoryResponse) ProtoMessage() {} method ProtoReflect (line 82) | func (x *GetHistoryResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 95) | func (*GetHistoryResponse) Descriptor() ([]byte, []int) { method GetHistory (line 99) | func (x *GetHistoryResponse) GetHistory() []*TranslationHistory { type TranslationHistory (line 107) | type TranslationHistory struct method Reset (line 117) | func (x *TranslationHistory) Reset() { method String (line 124) | func (x *TranslationHistory) String() string { method ProtoMessage (line 128) | func (*TranslationHistory) ProtoMessage() {} method ProtoReflect (line 130) | func (x *TranslationHistory) ProtoReflect() protoreflect.Message { method Descriptor (line 143) | func (*TranslationHistory) Descriptor() ([]byte, []int) { method GetSource (line 147) | func (x *TranslationHistory) GetSource() string { method GetDestination (line 154) | func (x *TranslationHistory) GetDestination() string { method GetOriginal (line 161) | func (x *TranslationHistory) GetOriginal() string { method GetTranslation (line 168) | func (x *TranslationHistory) GetTranslation() string { constant file_docs_proto_v1_translation_history_proto_rawDesc (line 177) | file_docs_proto_v1_translation_history_proto_rawDesc = "" + function file_docs_proto_v1_translation_history_proto_rawDescGZIP (line 197) | func file_docs_proto_v1_translation_history_proto_rawDescGZIP() []byte { function init (line 221) | func init() { file_docs_proto_v1_translation_history_proto_init() } function file_docs_proto_v1_translation_history_proto_init (line 222) | func file_docs_proto_v1_translation_history_proto_init() { FILE: docs/proto/v1/translation.history_grpc.pb.go constant _ (line 19) | _ = grpc.SupportPackageIsVersion9 constant Translation_GetHistory_FullMethodName (line 22) | Translation_GetHistory_FullMethodName = "/grpc.v1.Translation/GetHistory" type TranslationClient (line 30) | type TranslationClient interface type translationClient (line 35) | type translationClient struct method GetHistory (line 43) | func (c *translationClient) GetHistory(ctx context.Context, in *GetHis... function NewTranslationClient (line 39) | func NewTranslationClient(cc grpc.ClientConnInterface) TranslationClient { type TranslationServer (line 58) | type TranslationServer interface type UnimplementedTranslationServer (line 69) | type UnimplementedTranslationServer struct method GetHistory (line 71) | func (UnimplementedTranslationServer) GetHistory(context.Context, *Get... method mustEmbedUnimplementedTranslationServer (line 74) | func (UnimplementedTranslationServer) mustEmbedUnimplementedTranslatio... method testEmbeddedByValue (line 75) | func (UnimplementedTranslationServer) testEmbeddedByValue() ... type UnsafeTranslationServer (line 80) | type UnsafeTranslationServer interface function RegisterTranslationServer (line 84) | func RegisterTranslationServer(s grpc.ServiceRegistrar, srv TranslationS... function _Translation_GetHistory_Handler (line 95) | func _Translation_GetHistory_Handler(srv interface{}, ctx context.Contex... FILE: integration-test/integration_test.go constant host (line 24) | host = "app" constant attempts (line 25) | attempts = 20 constant httpURL (line 28) | httpURL = "http://" + host + ":8080" constant healthPath (line 29) | healthPath = httpURL + "/healthz" constant requestTimeout (line 30) | requestTimeout = 5 * time.Second constant basePathV1 (line 33) | basePathV1 = httpURL + "/v1" constant grpcURL (line 36) | grpcURL = host + ":8081" constant rpcServerExchange (line 39) | rpcServerExchange = "rpc_server" constant rpcClientExchange (line 40) | rpcClientExchange = "rpc_client" constant requests (line 41) | requests = 10 constant rmqURL (line 44) | rmqURL = "amqp://guest:guest@rabbitmq:5672/" constant natsURL (line 47) | natsURL = "nats://guest:guest@nats:4222/" constant expectedOriginal (line 50) | expectedOriginal = "текст для перевода" function doWebRequestWithTimeout (line 55) | func doWebRequestWithTimeout(ctx context.Context, method, url string, bo... function getHealthCheck (line 66) | func getHealthCheck(url string) (int, error) { function healthCheck (line 81) | func healthCheck(attempts int) error { function TestMain (line 102) | func TestMain(m *testing.M) { function TestHTTPDoTranslateV1 (line 115) | func TestHTTPDoTranslateV1(t *testing.T) { function TestHTTPHistoryV1 (line 171) | func TestHTTPHistoryV1(t *testing.T) { function TestClientGRPCV1 (line 207) | func TestClientGRPCV1(t *testing.T) { function TestClientRMQRPCV1 (line 239) | func TestClientRMQRPCV1(t *testing.T) { //nolint: dupl,gocritic,nolintlint function TestClientNATSRPCV1 (line 282) | func TestClientNATSRPCV1(t *testing.T) { //nolint: dupl,gocritic,nolintlint FILE: internal/app/app.go function Run (line 27) | func Run(cfg *config.Config) { //nolint: gocyclo,cyclop,funlen,gocritic,... FILE: internal/app/migrate.go constant _defaultAttempts (line 18) | _defaultAttempts = 20 constant _defaultTimeout (line 19) | _defaultTimeout = time.Second function init (line 22) | func init() { FILE: internal/controller/amqp_rpc/router.go function NewRouter (line 11) | func NewRouter(t usecase.Translation, l logger.Interface) map[string]ser... FILE: internal/controller/amqp_rpc/v1/controller.go type V1 (line 10) | type V1 struct FILE: internal/controller/amqp_rpc/v1/router.go function NewTranslationRoutes (line 11) | func NewTranslationRoutes(routes map[string]server.CallHandler, t usecas... FILE: internal/controller/amqp_rpc/v1/translation.go method getHistory (line 11) | func (r *V1) getHistory() server.CallHandler { FILE: internal/controller/grpc/router.go function NewRouter (line 12) | func NewRouter(app *pbgrpc.Server, t usecase.Translation, l logger.Inter... FILE: internal/controller/grpc/v1/controller.go type V1 (line 11) | type V1 struct FILE: internal/controller/grpc/v1/response/translation.history.go function NewTranslationHistory (line 9) | func NewTranslationHistory(translationHistory entity.TranslationHistory)... FILE: internal/controller/grpc/v1/router.go function NewTranslationRoutes (line 12) | func NewTranslationRoutes(app *pbgrpc.Server, t usecase.Translation, l l... FILE: internal/controller/grpc/v1/translation.go method GetHistory (line 11) | func (r *V1) GetHistory(ctx context.Context, _ *v1.GetHistoryRequest) (*... FILE: internal/controller/nats_rpc/router.go function NewRouter (line 11) | func NewRouter(t usecase.Translation, l logger.Interface) map[string]ser... FILE: internal/controller/nats_rpc/v1/controller.go type V1 (line 10) | type V1 struct FILE: internal/controller/nats_rpc/v1/router.go function NewTranslationRoutes (line 11) | func NewTranslationRoutes(routes map[string]server.CallHandler, t usecas... FILE: internal/controller/nats_rpc/v1/translation.go method getHistory (line 11) | func (r *V1) getHistory() server.CallHandler { FILE: internal/controller/restapi/middleware/logger.go function buildRequestMessage (line 11) | func buildRequestMessage(ctx *fiber.Ctx) string { function Logger (line 27) | func Logger(l logger.Interface) func(c *fiber.Ctx) error { FILE: internal/controller/restapi/middleware/recovery.go function buildPanicMessage (line 13) | func buildPanicMessage(ctx *fiber.Ctx, err any) string { function logPanic (line 27) | func logPanic(l logger.Interface) func(c *fiber.Ctx, err any) { function Recovery (line 33) | func Recovery(l logger.Interface) func(c *fiber.Ctx) error { FILE: internal/controller/restapi/router.go function NewRouter (line 25) | func NewRouter(app *fiber.App, cfg *config.Config, t usecase.Translation... FILE: internal/controller/restapi/v1/controller.go type V1 (line 10) | type V1 struct FILE: internal/controller/restapi/v1/error.go function errorResponse (line 8) | func errorResponse(ctx *fiber.Ctx, code int, msg string) error { FILE: internal/controller/restapi/v1/request/translate.go type Translate (line 3) | type Translate struct FILE: internal/controller/restapi/v1/response/error.go type Error (line 3) | type Error struct FILE: internal/controller/restapi/v1/router.go function NewTranslationRoutes (line 11) | func NewTranslationRoutes(apiV1Group fiber.Router, t usecase.Translation... FILE: internal/controller/restapi/v1/translation.go method history (line 20) | func (r *V1) history(ctx *fiber.Ctx) error { method doTranslate (line 42) | func (r *V1) doTranslate(ctx *fiber.Ctx) error { FILE: internal/entity/translation.go type Translation (line 6) | type Translation struct FILE: internal/entity/translation.history.go type TranslationHistory (line 6) | type TranslationHistory struct FILE: internal/repo/contracts.go type TranslationRepo (line 14) | type TranslationRepo interface type TranslationWebAPI (line 20) | type TranslationWebAPI interface FILE: internal/repo/persistent/translation_postgres.go constant _defaultEntityCap (line 11) | _defaultEntityCap = 64 type TranslationRepo (line 14) | type TranslationRepo struct method GetHistory (line 24) | func (r *TranslationRepo) GetHistory(ctx context.Context) ([]entity.Tr... method Store (line 56) | func (r *TranslationRepo) Store(ctx context.Context, t entity.Translat... function New (line 19) | func New(pg *postgres.Postgres) *TranslationRepo { FILE: internal/repo/webapi/translation_google.go type TranslationWebAPI (line 11) | type TranslationWebAPI struct method Translate (line 28) | func (t *TranslationWebAPI) Translate(translation entity.Translation) ... function New (line 16) | func New() *TranslationWebAPI { FILE: internal/usecase/contracts.go type Translation (line 14) | type Translation interface FILE: internal/usecase/mocks_repo_test.go type MockTranslationRepo (line 21) | type MockTranslationRepo struct method EXPECT (line 40) | func (m *MockTranslationRepo) EXPECT() *MockTranslationRepoMockRecorder { method GetHistory (line 45) | func (m *MockTranslationRepo) GetHistory(arg0 context.Context) ([]enti... method Store (line 60) | func (m *MockTranslationRepo) Store(arg0 context.Context, arg1 entity.... type MockTranslationRepoMockRecorder (line 28) | type MockTranslationRepoMockRecorder struct method GetHistory (line 54) | func (mr *MockTranslationRepoMockRecorder) GetHistory(arg0 any) *gomoc... method Store (line 68) | func (mr *MockTranslationRepoMockRecorder) Store(arg0, arg1 any) *gomo... function NewMockTranslationRepo (line 33) | func NewMockTranslationRepo(ctrl *gomock.Controller) *MockTranslationRepo { type MockTranslationWebAPI (line 74) | type MockTranslationWebAPI struct method EXPECT (line 93) | func (m *MockTranslationWebAPI) EXPECT() *MockTranslationWebAPIMockRec... method Translate (line 98) | func (m *MockTranslationWebAPI) Translate(arg0 entity.Translation) (en... type MockTranslationWebAPIMockRecorder (line 81) | type MockTranslationWebAPIMockRecorder struct method Translate (line 107) | func (mr *MockTranslationWebAPIMockRecorder) Translate(arg0 any) *gomo... function NewMockTranslationWebAPI (line 86) | func NewMockTranslationWebAPI(ctrl *gomock.Controller) *MockTranslationW... FILE: internal/usecase/mocks_usecase_test.go type MockTranslation (line 21) | type MockTranslation struct method EXPECT (line 40) | func (m *MockTranslation) EXPECT() *MockTranslationMockRecorder { method History (line 45) | func (m *MockTranslation) History(arg0 context.Context) (entity.Transl... method Translate (line 60) | func (m *MockTranslation) Translate(arg0 context.Context, arg1 entity.... type MockTranslationMockRecorder (line 28) | type MockTranslationMockRecorder struct method History (line 54) | func (mr *MockTranslationMockRecorder) History(arg0 any) *gomock.Call { method Translate (line 69) | func (mr *MockTranslationMockRecorder) Translate(arg0, arg1 any) *gomo... function NewMockTranslation (line 33) | func NewMockTranslation(ctrl *gomock.Controller) *MockTranslation { FILE: internal/usecase/translation/translation.go type UseCase (line 12) | type UseCase struct method History (line 26) | func (uc *UseCase) History(ctx context.Context) (entity.TranslationHis... method Translate (line 36) | func (uc *UseCase) Translate(ctx context.Context, t entity.Translation... function New (line 18) | func New(r repo.TranslationRepo, w repo.TranslationWebAPI) *UseCase { FILE: internal/usecase/translation_test.go type test (line 16) | type test struct function translationUseCase (line 23) | func translationUseCase(t *testing.T) (*translation.UseCase, *MockTransl... function TestHistory (line 37) | func TestHistory(t *testing.T) { //nolint:tparallel // data races here function TestTranslate (line 75) | func TestTranslate(t *testing.T) { //nolint:tparallel // data races here FILE: migrations/20210221023242_migrate_name.up.sql type history (line 1) | CREATE TABLE IF NOT EXISTS history( FILE: pkg/grpcserver/options.go type Option (line 8) | type Option function Port (line 11) | func Port(port string) Option { FILE: pkg/grpcserver/server.go constant _defaultAddr (line 15) | _defaultAddr = ":80" type Server (line 19) | type Server struct method Start (line 53) | func (s *Server) Start() { method Notify (line 82) | func (s *Server) Notify() <-chan error { method Shutdown (line 87) | func (s *Server) Shutdown() error { function New (line 31) | func New(l logger.Interface, opts ...Option) *Server { FILE: pkg/httpserver/options.go type Option (line 9) | type Option function Port (line 12) | func Port(port string) Option { function Prefork (line 19) | func Prefork(prefork bool) Option { function ReadTimeout (line 26) | func ReadTimeout(timeout time.Duration) Option { function WriteTimeout (line 33) | func WriteTimeout(timeout time.Duration) Option { function ShutdownTimeout (line 40) | func ShutdownTimeout(timeout time.Duration) Option { FILE: pkg/httpserver/server.go constant _defaultAddr (line 16) | _defaultAddr = ":80" constant _defaultReadTimeout (line 17) | _defaultReadTimeout = 5 * time.Second constant _defaultWriteTimeout (line 18) | _defaultWriteTimeout = 5 * time.Second constant _defaultShutdownTimeout (line 19) | _defaultShutdownTimeout = 3 * time.Second type Server (line 23) | type Server struct method Start (line 75) | func (s *Server) Start() { method Notify (line 93) | func (s *Server) Notify() <-chan error { method Shutdown (line 98) | func (s *Server) Shutdown() error { function New (line 40) | func New(l logger.Interface, opts ...Option) *Server { FILE: pkg/logger/logger.go type Interface (line 12) | type Interface interface type Logger (line 21) | type Logger struct method Debug (line 60) | func (l *Logger) Debug(message any, args ...any) { method Info (line 65) | func (l *Logger) Info(message string, args ...any) { method Warn (line 70) | func (l *Logger) Warn(message string, args ...any) { method Error (line 75) | func (l *Logger) Error(message any, args ...any) { method Fatal (line 84) | func (l *Logger) Fatal(message any, args ...any) { method log (line 90) | func (l *Logger) log(level zerolog.Level, message string, args ...any) { method msg (line 98) | func (l *Logger) msg(level zerolog.Level, message any, args ...any) { function New (line 28) | func New(level string) *Logger { FILE: pkg/logger/logger_test.go function newBufferedLogger (line 18) | func newBufferedLogger(level string) (*Logger, *bytes.Buffer) { function TestNewSetsGlobalLevel (line 29) | func TestNewSetsGlobalLevel(t *testing.T) { function TestInfoAndWarn_LogMessageWithAndWithoutArgs (line 56) | func TestInfoAndWarn_LogMessageWithAndWithoutArgs(t *testing.T) { function TestDebug_RespectsLevel (line 81) | func TestDebug_RespectsLevel(t *testing.T) { function TestError_LogsErrorAndDebugWhenDebugLevel (line 106) | func TestError_LogsErrorAndDebugWhenDebugLevel(t *testing.T) { function TestMsg_TypeSwitch (line 138) | func TestMsg_TypeSwitch(t *testing.T) { function TestFatal_ExitsAndLogs (line 170) | func TestFatal_ExitsAndLogs(t *testing.T) { FILE: pkg/nats/nats_rpc/client/client.go constant _defaultWaitTime (line 15) | _defaultWaitTime = 5 * time.Second constant _defaultAttempts (line 16) | _defaultAttempts = 10 constant _defaultTimeout (line 17) | _defaultTimeout = 2 * time.Second type Client (line 21) | type Client struct method Shutdown (line 61) | func (c *Client) Shutdown() error { method RemoteCall (line 68) | func (c *Client) RemoteCall(handler string, request, response any) err... function New (line 29) | func New( FILE: pkg/nats/nats_rpc/client/options.go type Option (line 6) | type Option function Timeout (line 9) | func Timeout(timeout time.Duration) Option { FILE: pkg/nats/nats_rpc/errors.go constant Success (line 15) | Success = "success" FILE: pkg/nats/nats_rpc/server/options.go type Option (line 6) | type Option function Timeout (line 9) | func Timeout(timeout time.Duration) Option { FILE: pkg/nats/nats_rpc/server/server.go constant _defaultWaitTime (line 18) | _defaultWaitTime = 5 * time.Second constant _defaultAttempts (line 19) | _defaultAttempts = 10 constant _defaultTimeout (line 20) | _defaultTimeout = 2 * time.Second type CallHandler (line 24) | type CallHandler type Server (line 27) | type Server struct method Start (line 85) | func (s *Server) Start() { method Notify (line 106) | func (s *Server) Notify() <-chan error { method Shutdown (line 111) | func (s *Server) Shutdown() error { method subscribe (line 142) | func (s *Server) subscribe() error { method handleMessage (line 153) | func (s *Server) handleMessage(msg *nats.Msg) { method publish (line 184) | func (s *Server) publish(msg *nats.Msg, body []byte, status string) { function New (line 44) | func New( FILE: pkg/postgres/options.go type Option (line 6) | type Option function MaxPoolSize (line 9) | func MaxPoolSize(size int) Option { function ConnAttempts (line 16) | func ConnAttempts(attempts int) Option { function ConnTimeout (line 23) | func ConnTimeout(timeout time.Duration) Option { FILE: pkg/postgres/postgres.go constant _defaultMaxPoolSize (line 15) | _defaultMaxPoolSize = 1 constant _defaultConnAttempts (line 16) | _defaultConnAttempts = 10 constant _defaultConnTimeout (line 17) | _defaultConnTimeout = time.Second type Postgres (line 21) | type Postgres struct method Close (line 73) | func (p *Postgres) Close() { function New (line 31) | func New(url string, opts ...Option) (*Postgres, error) { FILE: pkg/rabbitmq/rmq_rpc/client/client.go constant _defaultWaitTime (line 21) | _defaultWaitTime = 5 * time.Second constant _defaultAttempts (line 22) | _defaultAttempts = 10 constant _defaultTimeout (line 23) | _defaultTimeout = 2 * time.Second type Message (line 27) | type Message struct type pendingCall (line 36) | type pendingCall struct type Client (line 43) | type Client struct method Shutdown (line 96) | func (c *Client) Shutdown() error { method RemoteCall (line 118) | func (c *Client) RemoteCall(handler string, request, response any) err... method preRemoteCallWait (line 158) | func (c *Client) preRemoteCallWait() error { method remoteCallWait (line 172) | func (c *Client) remoteCallWait(call *pendingCall) error { method start (line 191) | func (c *Client) start() { method handleMessages (line 206) | func (c *Client) handleMessages() error { method reconnect (line 228) | func (c *Client) reconnect() error { method serveCall (line 232) | func (c *Client) serveCall(d *amqp.Delivery) { method getCall (line 245) | func (c *Client) getCall(corrID string) (*pendingCall, bool) { method addCall (line 254) | func (c *Client) addCall(corrID string, call *pendingCall) { method deleteCall (line 261) | func (c *Client) deleteCall(corrID string) { method ack (line 268) | func (c *Client) ack(d *amqp.Delivery, multiple bool) { method publish (line 272) | func (c *Client) publish(corrID, handler string, request any) error { function New (line 59) | func New(url, serverExchange, clientExchange string, opts ...Option) (*C... FILE: pkg/rabbitmq/rmq_rpc/client/options.go type Option (line 6) | type Option function Timeout (line 9) | func Timeout(timeout time.Duration) Option { function ConnWaitTime (line 16) | func ConnWaitTime(timeout time.Duration) Option { function ConnAttempts (line 23) | func ConnAttempts(attempts int) Option { FILE: pkg/rabbitmq/rmq_rpc/connection.go type Config (line 12) | type Config struct type Connection (line 19) | type Connection struct method AttemptConnect (line 38) | func (c *Connection) AttemptConnect() error { method connect (line 56) | func (c *Connection) connect() error { function New (line 28) | func New(consumerExchange string, cfg Config) *Connection { FILE: pkg/rabbitmq/rmq_rpc/errors.go constant Success (line 15) | Success = "success" FILE: pkg/rabbitmq/rmq_rpc/server/options.go type Option (line 6) | type Option function Timeout (line 9) | func Timeout(timeout time.Duration) Option { function ConnWaitTime (line 16) | func ConnWaitTime(timeout time.Duration) Option { function ConnAttempts (line 23) | func ConnAttempts(attempts int) Option { FILE: pkg/rabbitmq/rmq_rpc/server/server.go constant _defaultWaitTime (line 18) | _defaultWaitTime = 5 * time.Second constant _defaultAttempts (line 19) | _defaultAttempts = 10 constant _defaultTimeout (line 20) | _defaultTimeout = 2 * time.Second type CallHandler (line 24) | type CallHandler type Server (line 27) | type Server struct method Start (line 77) | func (s *Server) Start() { method Notify (line 95) | func (s *Server) Notify() <-chan error { method Shutdown (line 100) | func (s *Server) Shutdown() error { method handleMessages (line 127) | func (s *Server) handleMessages() error { method reconnect (line 149) | func (s *Server) reconnect() error { method serveCall (line 153) | func (s *Server) serveCall(d *amqp.Delivery) { method ack (line 180) | func (s *Server) ack(d *amqp.Delivery, multiple bool) { method publish (line 187) | func (s *Server) publish(d *amqp.Delivery, body []byte, status string) { function New (line 42) | func New(url, serverExchange string, router map[string]CallHandler, l lo...